Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception thrown in cobyla #399

Open
schweitzpgi opened this issue Jul 12, 2023 · 3 comments
Open

exception thrown in cobyla #399

schweitzpgi opened this issue Jul 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@schweitzpgi
Copy link
Collaborator

schweitzpgi commented Jul 12, 2023

Describe the bug

The generated executable terminates with an uncaught exception being thrown.

Steps to reproduce the bug

% nvq++ docs/sphinx/examples/cpp/other/gradients.cpp --target ionq
% ./a.out
Optimize with no gradients.
terminate called after throwing an instance of 'std::exception'
what(): std::exception
Aborted

Expected behavior

The example should run and produce a result.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA Quantum version:
  • Python version:
  • C++ compiler:
  • Operating system:

Suggestions

No response

@schweitzpgi schweitzpgi added the bug Something isn't working label Jul 12, 2023
@schweitzpgi
Copy link
Collaborator Author

From Alex: At some point, the nlopt package should be replaced with some other library.

@schweitzpgi
Copy link
Collaborator Author

Same issue with quantinuum target.

@zaikunzhang
Copy link

zaikunzhang commented Sep 20, 2023

Dear maintainers,

This is Dr. Zaikun Zhang from the Hong Kong Polytechnic University. Together with Professor N.I.M. Gould, I am responsible for maintaining the derivative-free optimization solvers of the late Professor M.J.D. Powell. I have developed PRIMA, which is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.

Thank you for making COBYLA available in your library. I note that the current version is provided by NLopt based on the original Fortran 77 implementation. However, The Fortran 77 code of COBYLA is not maintained anymore.

Although the Fortran 77 code is truly a masterpiece, it contains many bugs, most of which are due to the language itself. What you have encountered is totally expected. For more examples, see Section 4.4 of our recent paper and the GitHub issues / requests listed below.

To avoid the problems originating from the Fortran 77 code, I suggest you use the PRIMA implementation of Powell's solvers. PRIMA provides the modern implementation of the solvers in Fortran 2008. It fixes bugs in the original Fortran 77 code. In addition, it introduces improvements that boost the performance in terms of the number of function evaluations, which is the standard measure of computational costs in derivative-free optimization.

See the GitHub repo of PRIMA for more information. I will be glad to provide assistance if help is needed.

Thanks.

Best regards,
Zaikun Zhang, Ph.D. and Assistant Professor
Department of Applied Mathematics
The Hong Kong Polytechnic University
Hong Kong, China

@bettinaheim bettinaheim added this to the release 0.6.0 milestone Oct 26, 2023
@bettinaheim bettinaheim removed the needs triage Marks items that require a follow up for proper processing label Oct 26, 2023
@bettinaheim bettinaheim added the needs triage Marks items that require a follow up for proper processing label Jan 22, 2024
@bettinaheim bettinaheim removed this from the release 0.6.0 milestone Jan 22, 2024
@bettinaheim bettinaheim removed the needs triage Marks items that require a follow up for proper processing label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants