Versions Compared

Key

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

 

Introduction

This short article describes how the compilation of the OpenIFS model is controlled and how to modify the compilation. There are a number of ways in which the compilation can be changed, which is chosen depends on personnel preference and the situation.

Various compiler are supported for OpenIFS and configuration files are supported which are known to work on systems we have access to. Specific optimisation options have generally been avoided because they often depend on specific compiler options and/or hardware. The supplied configurations can be edited or over-ridden as described below.

Compiling with FCM

The Flexible Configuration Management (FCM) software, from the UK Meteorological Office, is used to compile the model. FCM offers a number of advantages: configuration files are easy to understand, model object files are compiled 'out-of-source', source code changes can be 'out-of-source', fortran interface blocks can be generated automatically. FCM replaces the traditionally 'make' or 'gmake' command and is specifically written for compiling large fortran or mixed fortran/C codes like OpenIFS.

A quick introduction to FCM for OpenIFS users is available. A more detailed description of the 'fcm make' command is also available.

Build types

The supplied configuration files support 3 different build types:

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.

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 useful for trapping variables used before initialized.

Configuration files

The FCM software uses configuration files. These are identified by the suffix '.cfg'. They can be found in the directory oifs/make/fcmcfg. The naming convention for these files

...

 

 

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>

...