Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Optimized build ('opt') - this is uses higher optimization and will generate the faster running model. Note that we do not always recommend the very highest optimization levels as this can sometimes cause the model to fail. The optimizations options are chosen conservatively to ensure the model will run successfully on a wide range of hardware and compiler versions. OpenMP is enabled in this configuration only. The user is free to increase optimization levels once the model is running successfully and we welcome feedback on best choice of compiler options.

Non-optimized build ('noopt') - this is intended for development and debugging. Optimization is set to -O0 and OpenMP is disabled. The model will run significantly slower. We recommend that when compiling OpenIFS for the first time, this build configuration is used as it will compile faster and be more stable.

Full debugging ('nansC') - this configuration is intended for debugging only. As well as setting the lowest optimization, -O0, it also enables array bound checking and initialisation of variables with special values that will trigger 'not-a-number' errors exceptions useful for trapping variables used before initialized. This will cause the model to run very slowly and is normally only used for short runs for tracing bugs.

...

Compilation configuration files and variables

The FCM software uses configuration files . These are identified by the suffix '.cfg'. They can be found in the directory oifs/make/fcmcfg. The master configuration file for OpenIFS is in fcmcfg/oifs.cfg. It sets general configuration options for FCM, lets FCM know where the source code is and reads a single architecture and compiler specific configuration file.

The naming convention for these architecture specific files is: <architecture>-<compiler>-<build type>.cfg. For example, the file fcmcfg/x86_64-gnu-opt.cfg would be for Linux 64bit with the GNU compilers and the optimized build.

Before compiling the OpenIFS model, the build configuration must first be set by several environment variables:

OIFS_ARCH  - This sets the architecture of the computer. By default, the FCM build configuration assumes x86_64 (i.e. Linux).

OIFS_COMP - This sets the choice of compiler. The default is 'gnu' which means the gfortran/gcc compilers will be used.

OIFS_BUILD - This sets the type of build. The default is 'noopt'.

These variables and their defaults are set in the fcmcfg/oifs.cfg file. e.g.

Code Block
$OIFS_ARCH{?} = x86_64
$OIFS_COMP{?} = gnu
$OIFS_BUILD{?} = noopt

The {?} syntax (often seen in the configuration files) means that if an environment variable of the same name exists, that value will be used instead of the value assigned. This provides a way to change many of the settings in the configuration files. For example, using:

Code Block
export OIFS_BUILD=opt

changes the build type to the 'optimized' build. This means instead the file 'fcmcfg/x86_64-gnu-opt.cfg' will be included by fcmcfg/oifs.cfg instead of the file fcmcfg/x86_64-gnu-noopt.cfg.

Suppose we wanted to run the model on MacOS X with the intel compiler and a optimized setting. We could set:

Code Block
export OIFS_ARCH=darwin
export OIFS_COMP=intel
export OIFS_BUILD=opt

FCM would then read the file fcmcfg/oifs.cfg which would expect to find a file called: darwin-intel-opt.cfg. This file would need to be created by the user.

 

 

HTML
<script type="text/javascript" src="https://software.ecmwf.int/issues/s/en_UKet2vtj/787/12/1.2.5/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=5fd84ec6"></script>

...