Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 you want.

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.

  2. CORE=seaice only supports double 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

#!/bin/bash
#SBATCH -p compute             # Partition
#SBATCH -N 1                   # Number of nodes
#SBATCH --ntasks-per-node=64   # Number of MPI processes per node
#SBATCH --cpus-per-task=2      # Number of OpenMP threads per MPI process
#SBATCH -t 5-00:00:00          # Job runtime limit
#SBATCH -J MPAS                # Job name
#SBATCH -A ltxxxxxx            # Account *** {USER EDIT} ***

module purge
module load ParallelIO/2.6.2-cpeIntel-23.09
module load METIS/5.1.0-cpeIntel-23.09

export OMP_STACKSIZE="32M"
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}

ulimit -s unlimited

srun -n${SLURM_NTASKS} -c${SLURM_CPUS_PER_TASK} ./init_atmosphere_model
srun -n${SLURM_NTASKS} -c${SLURM_CPUS_PER_TASK} ./atmosphere_model


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

  • No labels