access_UMRoseExecs - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki

Building the UM within Rose

Rose has been designed not only to run the model but also build the model. au-aa054 is a simple rose suite that can be used for building the UM model (v8.5). To run the suite, login onto accessdev and run the following commands.

rosie checkout au-aa054
rose suite-run -C ~/roses/au-aa054

This will be build the executables for UM 8.5. After running the suite, the default exectuables are located on raijin in;

$HOME/cylc-run/au-aa054/share/fcm_make/build-atmos/bin/um-atmos.exe
$HOME/cylc-run/au-aa054/share/fcm_make/build-recon/bin/um-recon.exe

How FCM works within Rose

On NCI machines the model is built in two steps. The first step fcm_make extracts the source code on accessdev and mirrors it to raijin.nci.org.au. The second step fcm_make2 builds the model on the compute nodes on raijin. It's possible to do the extraction on raijin as an alternative location. Also, environment variables can be included in the make file such as $ROSE_SUITE_NAME or $HOME in the following example.

The file au-aa054/app/fcm_make/file/fcm-make.cfg is the make file for compiling the

In the case of the au-aa054. The fcm make file contains the following lines.

$keys_atmos_app = A03_9C=a03_9c A13_2A=a13_2a A19_1B=a19_1b \
                  C84_1A=c84_1a C95_2A=c95_2a C96_1C=c96_1c C97_3A=c97_3a \
                  C98_0A=c98_0a UM_JULES=um_jules L19_1A=l19_1a
$keys_recon_app = RECON=recon GRIB_API=grib_api C95_2A=c95_2a C98_0A=c98_0a UM_JULES=um_jules

$um_base = fcm:um-tr
$um_rev = vn8.5
$jules_rev = vn8.5
$fcflags_omp # $ldflags_omp

$steplist = extract mirror

$MIRROR_TARGET = raijin.nci.org.au:$HOME/cylc-run/$ROSE_SUITE_NAME/share/fcm_make
include = fcm:um_dev/vn8.5/local_changes/fcm-make/linux-ifort-nci/um-atmos-safe.cfg@HEAD


# Branches/working copies:
extract.location{diff}[um] = \
       branches/dev/vn8.5/GlobalAtmos6p0@7678  \
       fcm:um_dev/vn8.5/local_changes@HEAD
extract.location{diff}[jules] = \
       branches/dev/mrd599/um8.5_GlobalLand6p0@387

Definition of variables

$keys_atmos_app => defines the ifdefs for the UM model.

$keys_recon_app => defines the ifdefs for the reconfiguration executable.

$um_base => defines the source case base

$um_rev => defines which version of the um to compile

$jules_rev => defines which version of jules to compile

$fcflags_omp => Additional flags to the compiler at compile time

$ldflags_omp => Additional flags to the compiler at link time

$steplist => defines what steps do in the first fcm make step. "extract" extracts the code. "mirror" copies the source code the location specified in $MIRROR_TARGET.

$MIRROR_TARGET => Location of where the extracted source code should be sent to.

include => include any other fcm make files. This usually points to fcm files that are site specific. Should point to "fcm-make/linux-ifort-nci/um-atmos-safe.cfg" or similar fcm make file.

extract.location{diff}[um] => Apply any branches over the um base.

extract.location{diff}[jules] => Apply any branches over the jules base.

Other FCM variables

These variables are not included in the above example, but can be set by the user if desired.

$mirror_steplist => Changes the steps after mirroring. Can be modified to compile the reconfiguration or model only. (Default steps are 'preprocess-atmos build-atmos preprocess-recon build-recon')

$atmos_exec => Filename of the um excetuable (Default is 'um-atmos.exe')

$recon_exec => Filename of the reconfiugation executable (Default is 'um-recon.exe')

$jules_base => Location of the source base (Default is 'fcm:tr')

Log files

There are three types of log files that can be used for solving problems when compiling the UM.

Suite Logs

Suite log files contain top level information about what jobs failed and job submission. They are located on Accessdev in

$HOME/cylc-run/SUITENAME/suite/out

$HOME/cylc-run/SUITENAME/suite/log

$HOME/cylc-run/SUITENAME/suite/err

Job Logs

Job log files contain more specific infortion about running a task. They are located on both Accesdev and Raijin in

$HOME/cylc-run/SUITENAME/log/job/fcm-make.1.1.err

$HOME/cylc-run/SUITENAME/log/job/fcm-make.1.1.out

FCM Logs

FCM log file is a low level log that can information about about how specific files are compiled. They are located on Raijin

$HOME/cylc-run/SUITE/share/fcm_make/fcm-make.log