...
More information on the configuration file syntax for FCM can be found on the FCM Users Guide from the UK Met Office.
The first line above sets the build property 'fc.flags' (ie. fortran compiler flags) for the directory algor/internal/fourier
(under the 'src' directory). Note this sets compiler flags for all files in that directory.
...
Example: you need to reduce the optimisation and include array bound checking on a specific file for testing. We suggest you make a copy of the oifs.cfg and add the line:
Code Block | ||
---|---|---|
| ||
build.prop{fc.flags}[ifs/module/yomtrans.F90] = -g -O0 -m64 -C -fconvert=big-endian |
Using the 'include' statement
and then compile using this new file:
Code Block |
---|
fcm make -f fcmcfg/oifs_copy.cfg |
Info |
---|
As this is a new .cfg file for FCM it will do a full build of the code from scratch. Any subsequent builds will be incremental - only compiling changed files. |
Using the 'include' statement
FCM configuration files support an 'include' statement. The oifs.cfg file uses this to include architecture and compiler specific information. If you need to include several lines changing the options for multiple files then another option would be to add an additional 'include' statement to point to a new file containing the build.prop lines you need. For example:
Code Block | ||
---|---|---|
| ||
include = $HERE/debug.cfg |
and then create the file fcmcfg/debug.cfg with the 'build.prop' lines you need.
Info |
---|
The $HERE variable is a special FCM specific variable that expands to the directory name containing the file. In this example the oifs.cfg and your debug.cfg are in the same directory. |
Inherited build
A third way to customize at the file level is through FCM's 'inherited build' mechanism. This simple but powerful facility is described in more detail in the HowTo modify and add new code. In brief this allows you to leave the current configuration and source untouched and 'use' or 'inherit' the OpenIFS configuration in a completely separate directory. This makes it easier to update the OpenIFS code for new releases and keeps any changes you make completely separate.
The reader is referred to the separate HowTo modify and add new code for examples on how to use it.Inherited build
Recommendations
As described above, the build environment uses 3 types of build:
...