Skip to content

Latest commit

 

History

History
106 lines (79 loc) · 5.39 KB

README.md

File metadata and controls

106 lines (79 loc) · 5.39 KB

GALAHAD

GALAHAD is a library of modern Fortran packages for nonlinear optimization with C, Python, Julia and MATLAB interfaces. It contains packages for general constrained and unconstrained optimization, linear and quadratic programming, nonlinear least-squares fitting and global optimization, as well as those for solving a large variety of basic optimization subproblems.

Documentation

More information on the packages in GALAHAD can be found at https://www.galahad.rl.ac.uk.

All major GALAHAD packages are documented in Fortran, C, Python and Julia:

Help files are provided for MATLAB functions.

Installation

Precompiled Library

We provide a precompiled GALAHAD library in the releases tab for Linux, macOS (Intel & Silicon) and Windows.

Installation from Source

GALAHAD can be installed from source using the Meson build system (all commands below are to be run from the top of the source tree):

meson setup builddir -Dtests=true
meson compile -C builddir
meson install -C builddir
meson test -C builddir

For more comprehensive Meson options (-Doption=value), including how to specify paths to various libraries and packages, please see meson_options.txt and README.meson. We give some examples below for the most important Meson options.

GALAHAD supports a large number of optional software packages for enhanced functionality, the most important of these are:

BLAS/LAPACK

By default GALAHAD will build with OpenBLAS if it can locate it (otherwise you may need to pass the OpenBLAS paths via the libblas_path and liblapack_path options to meson setup). You may also wish to use a vendor-specific BLAS/LAPACK implementation such as one of the following:

Please see README.meson for instructions on how to tell Meson where to find these optional dependencies.

Linear Solvers

By default GALAHAD will build the SSIDS linear solver, other alternative linear solvers are:

Please see README.meson for instructions on how to tell Meson where to find these optional dependencies.

CUTEst Test Collection

GALAHAD can use optimization test problems from the CUTEst test collection. For example, to link GALAHAD with double precision CUTEst compiled with gfortran on a 64bit Linux machine:

meson setup builddir -Dlibcutest_double_path=/path/to/CUTEst/objects/pc64.lnx.gfo/double/ -Dlibcutest_double_modules=/path/to/CUTEst/modules/pc64.lnx.gfo/double/ -Dsingle=false
meson compile -C builddir
meson install -C builddir

One can similarly link GALAHAD with single precision CUTEst, please see meson_options.txt.

C Interface

To install the C interface using the Meson build system:

meson setup builddir -Dciface=true
meson compile -C builddir
meson install -C builddir
meson test -C builddir --suite=C

Python Interface

To install the Python interface using the Meson build system:

meson setup builddir -Dpythoniface=true -Dpython.install_env=auto
meson compile -C builddir
meson install -C builddir
meson test -C builddir --suite=Python

Julia Interface

Please see GALAHAD.jl and the associated documentation.

MATLAB Interface

Please see README.matlab and the instructions provided there.

Integrated installation via make

GALAHAD can also be installed via the "make" command as part of the Optrove optimization eco-system that also includes CUTEst, SIFDecode and ARCHDefs. This has the advantage of providing scripts to run CUTEst examples directly from GALAHAD and allowing calls from Matlab, but suffers from considerably longer build times.

To use this variant, follow the instructions in the GALAHAD wiki.