PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for the late Professor Powell’s renowned derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means “Reference Implementation for Powell’s methods with Modernization and Amelioration”, “P” for Powell.
After almost three years of intensive coding, the modern Fortran version of PRIMA has been finished by December 2022.
Thanks to the great contribution of Julien Schueller, PRIMA now has a CMake building system and a C interface.
Fortran
To compile the Fortran library, do the following.
git clone --depth 1 https://github.com/libprima/prima.git
cd prima
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=OFF
cmake --build build --target install
This should create the primaf
library for Fortran usage, located in the install/lib
directory
to be used with the module files in install/include/prima/mod
.
Examples of how to use the library from an external code are available in fortran/examples
.
Below is an illustration with COBYLA.
cd fortran/examples/cobyla
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=$PWD/../../../install/lib/cmake/prima/
cmake --build build --target install
./install/bin/cobyla_example
C
The compilation of the Fortran library also produces the primac
library for C usage, located in install/lib
to be used with the prima.h
header in install/include/prima
.
Examples on how to use the library from an external code are available in c/examples
.
Below is an illustration with COBYLA.
cd c/examples/cobyla
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DPRIMA_DIR=$PWD/../../../install/lib/cmake/prima/
cmake --build build --target install
./install/bin/cobyla_example
Who was Powell?
Michael James David Powell FRS was “a British numerical analyst who was among the pioneers of computational mathematics”. He was the inventor/early contributor of quasi-Newton method, trust region method, augmented Lagrangian method, and SQP method. Each of them is a pillar of modern numerical optimization. He also made significant contributions to approximation theory and methods.
Among numerous honors, Powell was one of the first two recipients of the Dantzig Prize from the Mathematical Programming Society (MOS) and Society for Industrial and Applied Mathematics (SIAM). This is considered the highest award in optimization.