CAMx Guide

From Storrs HPC Wiki
Revision as of 17:40, 19 February 2016 by Cdk10001 (talk | contribs)
Jump to: navigation, search

module file

To use CAMx with MPI and OMP, you need to load the modules from the HPC first.

module load intelics/2013.1.039-compiler zlib/1.2.8-ics hdf5/1.6.5 mpi/mvapich2/2.0a-ics camx/6.0-mpi

You can also add these modules to your initadd so that they will be auto loaded when you login:

module initadd intelics/2013.1.039-compiler zlib/1.2.8-ics hdf5/1.6.5 mpi/mvapich2/2.0a-ics camx/6.0-mpi

Executable script

Before running the CAMx, you should have CAMx.in as the input file. For more details of the CAMx.in please read the documentation of CAMx

Running MPI jobs

After you set up all the parameters for CAMx you can make a bash script to run CAMx as following (CAMx_run_MPI):

#!/bin/bash
#SBATCH -n 24 # number of cores you want. You can ask for at most 48 cores.
#SBATCH -o ./%J.out # the file that will record any output to stdout.
#SBATCH -e ./%J.err # the file that will record any output to stderr.

mpirun camx

Then submit the script by issuing:

$ sbatch CAMx_run_MPI

Running MPI+OMP jobs

CAMx supports MPI+OpenMP jobs which will be faster than running it with MPI only. To run CAMx with MPI+OMP, please use following script (CAMx_run_SLURM_MPI_OMP):

#!/bin/bash
#SBATCH -N 4 # number of mpi tasks
#SBATCH -o ./%J.out # the file that will record any output to stdout.
#SBATCH -e ./%J.err # the file that will record any output to stderr.
#SBATCH -c 20 # Set number of threads for each mpi task
#SBATCH --ntasks-per-node=1 # Set one mpi task per node. DO NOT CHANGE
#SBATCH --cpu_bind=no # disable the cpu bind to the tasks DO NOT CHANGE
#SBATCH --exclusive # Exclusive mode. DO NOT CHANGE

NUMPROCS=`expr $SLURM_NNODES + 1`
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
export MV2_ENABLE_AFFINITY=0
mpirun -np $NUMPROCS camx

For tcsh version:

#!/bin/tcsh
#SBATCH -N 4 # number of mpi tasks
#SBATCH -o ./%J.out # the file that will record any output to stdout.
#SBATCH -e ./%J.err # the file that will record any output to stderr.
#SBATCH -c 20 # Set number of threads for each mpi task
#SBATCH --ntasks-per-node=1 # Set one mpi task per node. DO NOT CHANGE
#SBATCH --cpu_bind=no # disable the cpu bind to the tasks DO NOT CHANGE
#SBATCH --exclusive # Exclusive mode. DO NOT CHANGE

set NUMPROCS = `expr $SLURM_NNODES + 1`
setenv OMP_NUM_THREADS $SLURM_CPUS_PER_TASK
setenv MV2_ENABLE_AFFINITY 0
mpirun -np $NUMPROCS camx

Then submit the script by issuing:

$ sbatch CAMx_run_SLURM_MPI_OMP