Crates.io | ipopt-sys |
lib.rs | ipopt-sys |
version | 0.5.5 |
source | src |
created_at | 2018-03-01 22:12:04.208184 |
updated_at | 2020-11-26 02:34:52.545141 |
description | Raw unsafe Rust bindings to the Ipopt non-linear optimization library. |
homepage | https://github.com/elrnv/ipopt-rs |
repository | https://github.com/elrnv/ipopt-rs |
max_upload_size | |
id | 53369 |
size | 96,940 |
ipopt-sys
This package provides unsafe Rust bindings to the Ipopt non-linear optimization library. Unlike most other wrappers for Ipopt, we link against a custom C interface called CNLP, which mimics Ipopt's own C++ TNLP interface. This serves two purposes:
This also means that you will need a working C++ compiler and a C++ standard library implementation available since the CNLP shim currently uses it in the implementation.
Contributions are welcome!
We provide a number of options for building Ipopt from source as well as different methods for
retrieving binaries.
Building also requires the openssl
and libclang
system libraries.
Currently supported methods for getting the Ipopt library:
Using pkg-config to find a system installed static or dynamic library.
Manually check system lib directories for a dynamic library.
Build Ipopt from source. You will need fortran compiler libs installed (e.g. libgfortran
) and
one of the following options for linear solvers:
a. Linking against MKL. (set MKLROOT
environment variable to specify a custom MKL installation
path or if the system path is not found.)
b. Building with MUMPS/METIS and linking against a system installed OpenBLAS library (Linux) or Accelerate framework (macOS). If no system BLAS/LAPACK libraries are found, then the default netlib implementations will be pulled and built.
Download a prebuilt dynamic Ipopt library from JuliaOpt.
Each of these steps are at various levels of polish and currently tested on Linux and macOS systems only.
Since macOS doesn't ship with the fortran library, you would need to install it manually.
Using homebrew you may either install gcc
or gfortran
directly with
$ brew install gcc
or
$ brew cask install gfortran
respectively. Since homebrew doesn't link these automatically from /usr/local/lib
, you will have
to create the symlink manually with
$ ln -s /usr/local/Cellar/gcc/8.3.0_2/lib/gcc/8/libgfortran.dylib /usr/local/lib/libgfortran.dylib
if you have libgfortran
from the gcc set (mind the gcc version). Otherwise create the symlink with
$ ln -s /usr/local/gfortran/lib/libgfortran.dylib /usr/local/lib/libgfortran.dylib
if you installed gfortran
directly.
Ultimately, no matter which method you choose, libgfortran.dylib
must be available through the linker search paths.
This repository is licensed under either of
at your option.