Compile MPAS on LANTA

Updated: 22 December 2023


1. Load required modules and set environment variables

Paste the below lines into your terminal. (Putting these in ~/.bashrc is not recommended.)

module purge module purge module load ParallelIO/2.6.2-cpeIntel-23.09 module load METIS/5.1.0-cpeIntel-23.09 export PIO=${EBROOTPARALLELIO} export NETCDF=${CRAY_NETCDF_HDF5PARALLEL_PREFIX} export PNETCDF=${CRAY_PARALLEL_NETCDF_PREFIX} export OPENMP=true ### Common mistake :: insert spaces before or after =

2. Download MPAS source code

An example for MPAS 8.0.1 is as shown below.

wget https://github.com/MPAS-Dev/MPAS-Model/archive/refs/tags/v8.0.1.tar.gz tar xzf v8.0.1.tar.gz mv MPAS-Model-8.0.1 MPAS cd MPAS

3. Compile MPAS

Compile each MPAS core with your desired floating-point precision; for example,

make -j4 intel-nersc CORE=init_atmosphere PRECISION=single AUTOCLEAN=true make -j4 intel-nersc CORE=atmosphere PRECISION=single AUTOCLEAN=true ...

User still has to use make clean CORE=XXX before recompiling each core.

Additional notes:

  1. CORE=ocean only supports double precision.

  2. CORE=seaice only supports double precision and only serial build (-j1) works.

  3. Users may have to add parentheses for the print function, i.e., print xxx → print(xxx), in

    • ./src/core_ocean/BGC/makedep.py

    • ./src/core_ocean/cvmix/makedep.py

    to make these files compatible with Python3.

4. Example: Job submission script


Contact Us
ThaiSC support service : thaisc-support@nstda.or.th