Skip to content

ralna/GALAHAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7098219 · Apr 28, 2025
Apr 25, 2025
Apr 14, 2025
Mar 26, 2025
Apr 27, 2025
Jan 15, 2024
Apr 28, 2025
Dec 20, 2024
Jan 15, 2024
Dec 20, 2024
Apr 26, 2025
Jul 9, 2024
Jun 6, 2024
Feb 22, 2024
Feb 4, 2018
Feb 4, 2018
Feb 4, 2018
Feb 4, 2018
Feb 4, 2018
Apr 24, 2025
Apr 26, 2025
Feb 4, 2018
Feb 4, 2018
Feb 4, 2018
Feb 5, 2018
Apr 11, 2025
Apr 25, 2025
Mar 21, 2022
Feb 4, 2018

Repository files navigation

GALAHAD codecov

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:

meson setup builddir -Dlibcutest_path=/path/to/CUTEst/lib -Dlibcutest_modules=/path/to/CUTEst/modules -Dsingle=false
meson compile -C builddir
meson install -C builddir

GALAHAD can similarly be linked with the single or quadruple precision variants of CUTEst. For more details, refer to the file meson_options.txt.

Note: only the shared libraries of CUTEst are supported when compiling GALAHAD with Meson. Please follow the instructions to set up CUTEst accordingly.

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.