Difference between revisions of "Building and running MIMICAv5 on Tetralith"

From SNIC Documentation
Jump to: navigation, search
(Created page with "This page describes the building the [https://agupubs.onlinelibrary.wiley.com/doi/full/10.1002/2013MS000292 MIMICAv5] on NSC's [http://www.nsc.liu.se/systems/tetralith/ Tetralith...")
 
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:
 
;MIMICA modules
 
;MIMICA modules
  
A set of software modules have been installed on Tetralith specifically to try to mimic as closely as possible the environment used in the model development by Julien. It is recommended that these modules are used for building and running MIMICA on Tetralith to reduce porting problems.
+
A set of software modules have been installed on Tetralith specifically to try to match as closely as possible the environment used in the model development by Julien. It is recommended that these modules are used for building and running MIMICA on Tetralith to reduce porting problems.
  
 
:<code>$ module purge</code>
 
:<code>$ module purge</code>
Line 21: Line 21:
 
:<code>$ module load fftw/3.3.8-intel-2017.u7-bare</code>
 
:<code>$ module load fftw/3.3.8-intel-2017.u7-bare</code>
  
;Environment variables, Makefile and start file
+
;Environment variables and Makefile
  
 
Loading the modules above sets a number of environment variables (incl. <tt>NETCDF_DIR, FFTW_LIB, FFTW_INC</tt>). The <tt>MIMICA</tt> environment variable must be set to the root path of the MIMICAv5 download (see 'Getting the source code' above), e.g.
 
Loading the modules above sets a number of environment variables (incl. <tt>NETCDF_DIR, FFTW_LIB, FFTW_INC</tt>). The <tt>MIMICA</tt> environment variable must be set to the root path of the MIMICAv5 download (see 'Getting the source code' above), e.g.
  
 
:<code>$ export MIMICA=/home/my-tetralith-username/models/mimicav5</code>
 
:<code>$ export MIMICA=/home/my-tetralith-username/models/mimicav5</code>
 +
 +
A Tetralith specific <tt>Makefile</tt> associated with the above modules can be copied on Tetralith from (<tt>/proj/nsc/users/struthers/Public/MIMICA/Makefile-v5</tt>) to your working folder.
 +
 +
This <tt>Makefile</tt> uses the 'centrally' installed fftw (module fftw/3.3.8-intel-2017.u7-bare).
 +
 +
;The start file
 +
 +
Two environment variables have to be set in the 'start' file specifically for Tetralith + MIMICA modules/environment.
 +
 +
:<code>setenv NETCDF ${NETCDF_DIR}</code>
 +
 +
and
 +
 +
:<code>setenv CMPLER INTEL</code>
 +
 +
;Run file/SLURM settings
 +
 +
The resource request to Tetralith's SLURM batch system should match the domain decomposition defined in the 'start' file. Simply the number of cores (-n in SLURM) should = NPX*NPY from the start file, e.g. if the definitions of NPX and NPY in your start file are:
 +
 +
:<code>setenv NPX 4</code>
 +
:<code>setenv NPY 2</code>
 +
 +
then the number of cores requested in your run script should be:
 +
 +
:<code>#SBATCH -n 8</code>

Latest revision as of 13:54, 9 March 2020

This page describes the building the MIMICAv5 on NSC's Tetralith system.

MIMICA is a 3D high-resolution model designed for atmospheric applications and written entirely in fortran. The code has been originally developed by Chien Wang at MIT, and later updated and transformed into a true LES model by Julien Savre at Stockholm University. Today, MIMICA is developed under the git version control system and is hosted on the Bitbucket web-page

Getting the source code

Once you have a Bitbucket account with the correct permissions to access the MIMICA repository, the MIMICAv5 distribution can be cloned by executing, e.g.:

git clone https://my-username@bitbucket.org/matthiasbrakebusch/mimicav5.git mimicav5

If space permits, it is recommended that the source files be downloaded into the /home file system on Tetralith. This ensures that your code, and configuration files are backed up.

MIMICA modules

A set of software modules have been installed on Tetralith specifically to try to match as closely as possible the environment used in the model development by Julien. It is recommended that these modules are used for building and running MIMICA on Tetralith to reduce porting problems.

$ module purge
$ module load buildenv-intel/2017.u7-bare
$ module use /proj/bolinc/shared/software/modules
$ module load netCDF/4.4.1-intel-2017.u7-bare
$ module load fftw/3.3.8-intel-2017.u7-bare
Environment variables and Makefile

Loading the modules above sets a number of environment variables (incl. NETCDF_DIR, FFTW_LIB, FFTW_INC). The MIMICA environment variable must be set to the root path of the MIMICAv5 download (see 'Getting the source code' above), e.g.

$ export MIMICA=/home/my-tetralith-username/models/mimicav5

A Tetralith specific Makefile associated with the above modules can be copied on Tetralith from (/proj/nsc/users/struthers/Public/MIMICA/Makefile-v5) to your working folder.

This Makefile uses the 'centrally' installed fftw (module fftw/3.3.8-intel-2017.u7-bare).

The start file

Two environment variables have to be set in the 'start' file specifically for Tetralith + MIMICA modules/environment.

setenv NETCDF ${NETCDF_DIR}

and

setenv CMPLER INTEL
Run file/SLURM settings

The resource request to Tetralith's SLURM batch system should match the domain decomposition defined in the 'start' file. Simply the number of cores (-n in SLURM) should = NPX*NPY from the start file, e.g. if the definitions of NPX and NPY in your start file are:

setenv NPX 4
setenv NPY 2

then the number of cores requested in your run script should be:

#SBATCH -n 8