Installation
This chapter discusses MSG installation in detail. If you just want to get up and running, have a look at the Quick Start chapter.
Pre-Requisites
To compile and run MSG, you’ll need the following software components:
A modern (2003+) Fortran compiler
The LAPACK linear algebra library
The LAPACK95 Fortran 95 interface to LAPACK
The fypp Fortran pre-processor
The HDF5 data management library
On Linux and MacOS platforms, these components are bundled together in the MESA Software Development Kit (SDK). Using this SDK is strongly recommended.
Building MSG
Download the MSG source code, and unpack it from the command line using the tar utility:
tar xf msg-1.0.tar.gz
Set the MSG_DIR
environment variable with the path to the
newly created source directory; this can be achieved e.g. using the
realpath command1:
export MSG_DIR=$(realpath msg-1.0)
Finally, compile MSG using the make utility:
make -j -C $MSG_DIR
(the -j flags tells make to use multiple cores, speeding up the build). If things go awry, consult the Troubleshooting chapter.
Custom Builds
Custom builds of MSG can be created by setting certain environment
variables, and/or variables in the file
$MSG_DIR/src/build/Makefile
, to the value yes
. The
following variables are currently supported:
- DEBUG
Enable debugging mode (default
no
)- OMP
Enable OpenMP parallelization (default
yes
)- FPE
Enable floating point exception checks (default
yes
)- PYTHON
Enable building of Python interface (default
yes
)- TEST
Enable building of testing tools (default
yes
)- TOOLS
Enable building of development tools (default
no
)
If a variable is not set, then its default value is assumed.
GitHub Access
Sometimes, you’ll want to try out new features in MSG that haven’t yet made it into a formal release. In such cases, you can check out MSG directly from the rhdtownsend/msg git repository on GitHub:
git clone --recurse-submodules https://github.com/rhdtownsend/msg.git
However, a word of caution: MSG is under constant development, and
features in the main
branch can change without warning.
footnote