FMS
2024.03
Flexible Modeling System
|
This document describes the autotools-based build system for FMS.
Autoconf, automake, and libtool and the GNU/Linux standard build tools. When building a package based on autotools, the user does something like:
./configure && make check install
The configure step queries the system about many things, and contructs makefiles.
The make step uses the generated Makefiles to build, test, and install the software.
Standard environment variables and configure options can be used to control many aspects of the build. Custom configure options can easily be added to support additional needs.
Autotools creates many generated files, which should not be edited or checked into the repository. Simply ignore them. Do not try to edit generated Makefiles, do not move or rename any of the shell scripts that autoreconf puts in place to let autotools work. These files have been added to .gitignore and should never be added to the repo.
Previously, everyone built FMS by checking out code from git. However, with the new build system, only those who want to contribute to the code base need check out the code from git.
All FMS developers will need a reasobably reacent version of tools autoconf, automake, and libtool. These are available on package management systems. (Ex. yum install automake autoconf libtool).
The process of building FMS from the repo is:
Users start with a tarball, not the git repo. They do not have to have any of the autotools installed. Thier build process is:
Some environment variables are important to the autotools build system, these are known as "precious" variables. One example is CC, which should be set to the C compiler.
It's common to set some precious vars before the build. Commonly used ones include:
The configure script has some standard options, including:
Configure build options for FMS:
--with-yaml
: Build with support for yaml input files(requires the libyaml library and headers)--enable-mixed-mode
: Build in mixed precision mode, with default 4 byte reals and 8 byte real overloads--disable-setting-flags
: Build without automatically setting flags during configuration--with-mpi
: Build with MPI support, enabled by default--enable-overload-r4
: Compiles with 4 byte real routine overloads--enable-overload-c4
: Compiles with 4 byte complex routine overloads--enable-overload-c8
: Compiles with 8 byte complex routine overloads--disable-8byte-int
: Compiles with only 4 byte integer routinesSome of the useful make targets include: