OPT++: An Object-Oriented Nonlinear Optimization Library


OPT++ is a library of nonlinear optimization algorithms written in C++. The motivation for this package is to build an environment for the rapid prototyping and development of new optimization algorithms. In particular, the focus is on robust and efficient algorithms for problems in which the function and constraint evaluations require the execution of an expensive computer simulation. Currently, OPT++ includes the classic Newton methods, a nonlinear interior-point method, parallel direct search, generating set search, a trust region - parallel direct search hybrid, and a wrapper to NPSOL. Between these methods, a wide range of problems can be solved, e.g. with or without constraints, with or without analytic gradients, simulation based, etc.


OPT++ 2.4 is now available on a variety of platforms under the GNU Lesser General Public License. New features include: If you have OPT++ 2.3, you can simply download a patchfile from the Bug Fixes and Updates section. If you would like to download a fresh copy of OPT++, we would like to ask that you that you please fill out the registration form on the Download Page first. This enables us to justify our work to management - we promise not to spam you unless you so desire. Key addresses to remember are:

Bug Fixes and Updates

This section contains patch files with bug fixes and updates for OPT++ 2.4. Once you have downloaded the patch file, place it in your OPT++ directory and issue the command "patch -p1 < {patch file name}". Please note that these patches must be applied in order. You should now be able to build OPT++ 2.4 by following the instructions in the Installation Documentation.


More detailed information on the OPT++ library can be found in any of the following places:

Known Issues

Alas, there a few issues that we are aware of:
  1. BLAS: The m4 macro that we obtained to detect BLAS libraries is a few years old, so there are a couple of cases where they are not detected correctly. We will work on correcting these issues.
  2. NPSOL: We had problems linking in NPSOL on the MAC platform. Try explicitly setting your FLIBS environment variable to "-L/sw/lib -lfrtbegin -lg2c -lm -lgcc". That may or may not do the trick. We also had problems linking NPSOL with the GNU 4.0.2 compilers. We will keep working on both these issues.
  3. XML/GUI: The XML and GUI interface has not been updated yet, so it is currently not available with this version. We will get this finished and distribute a patch file as quickly as we can.
  4. PGI Compilers: In our testing, we found that autotools was adding an invalid item to the list of libraries when using the PGI compilers. This causes the build of the test problems to break. We have not yet isolated the problem, but in the the meantime, it is an easy fix. If "make check" fails, go into the "Makefile" in each of the test directories (tests/constraints, tests/hock, tests/npsol, tests/parallel, and tests/uncon) and search for "FLIBS". Delete the first entry in the list, "-lm'"...it is that extra single quote that is the culprit. Then try "make check" again.


Juan Meza, Lawrence Berkeley National Laboratory
Patty Hough, Sandia National Laboratories
Pam Williams, LMI Government Consulting
Ricardo Oliva, Sabio Labs, Inc.


For questions, comments, or more information, please contact the OPT++ Developers. Please submit bug reports through Bugzilla.