The Starting the build process section on the OpenIFS 48r1 Getting Started page introduces the basic build and test command

$OIFS_TEST/openifs-test.sh -cbt

In addition to the command line options defined above (-cbt) , openifs-test.sh invokes some default ecbuild options and allows a user to add ecbuild options from command line using the -- notation, e.g., $OIFS_TEST/openifs-test.sh -cbt --without-single-precision.

Default build options

There are 5 default build options that are defined directly in openifs-test.sh. Of the 5, 3 options cannot be negated by command line options, while 2 can be negated by selecting the opposite option from the command line.

The following build options cannot be negated

--openifs-only - ensures code for OpenIFS is included in the build

--with-scmec - builds the SCM executable alongside the OpenIFS 3D executable

--arch=$OIFS_ARCH - defines the path to the arch directory defined in $OIFS_HOME/oifs-config.edit_me.sh


The following default build options, can be negated from the command line by selecting the opposite option 

--with-single-precision - Ensures OpenIFS is built in single precision, as well as the default double precision

--init-snan - initialises uninitialised variables to nan

Command line build options

In addition to the default options, there is a range of command-line options defined in $OIFS_HOME/bundle.yml, which can be invoked when openifs-test.sh -b  is executed.

The main available options that most users may want to use are

--clean - force a clean build by removing the $OIFS_HOME/build  directory. This is particularly useful when changing cmake files or adding new functionality, but it does mean the build takes longer. If there is no --clean and there is a build, then the build will be incremental (and quicker). 

--arch=<add path of arch file> - Allows a user to over-ride $OIFS_ARCH loaded while sourcing oifs-config.edit_me.sh. The expected path structure for <add path of arch file>  is ./arch/<site>/<platform>/<compiler>/<compiler_version>. For example --arch=./arch/ecmwf/hpc2020/gnu , where the site is ecmwf, the platform is hpc2020 and the compiler is gnu. The compiler version is not stated because the path contains a default link.

--without-single-precision or --without-double-precision - By default both single and double precision executables are built. These options negate the default option by excluding double or single precision build, which speeds up the build

--build-type=DEBUG - Builds the executable in debug mode with bounds checking, some trapping and no compiler optimisation

--no-init-snan - negates the default init-snan  option. It is recommended that this should only be used for debugging issues and not for research simulations

The rest of the availalbe options can be found in the