IMA2

From HPCC Wiki
Jump to navigation Jump to search

IMa2 is a serial program that is currently installed on ANDY at the CUNY HPC Center. It requires an input file and potentially several additional data files to run. Here we provide a script that will run the test input program supplied by the authors, 'ima2_testinput.u'. Completing this run may also require the prior file ('ima2_priorfile_4pops.txt') and the nested models file ('ima2_all_nested_models_2_pops.txt'). All these files can be copied out of the IMa2 installation examples directory, as follows:

cp /share/apps/ima2/default/examples/ima2_testinput.u .

A working SLURM batch script that will complete an IMa2 run is presented here:

#!/bin/bash
#SBATCH --partition production
#SBATCH --job-name IMa2_serial
#SBATCH --nodes=1
#SBATCH --ntasks=1


# Find out name of master execution host (compute node)
echo -n ">>>> SLURM Master compute node is: "
hostname

# You must explicitly change to the working directory in SLURM
cd $SLURM_SUBMIT_DIR

# Point to the execution directory to run
echo ">>>> Begin IMa2 Serial Run ..."
echo ""
/share/apps/ima2/default/bin/IMa2 -i ima2_testinput.u -o ima2_testoutput.out -q2 -m1 -t3 -b10000 -l100
echo ""
echo ">>>> End   IMa2 Serial Run ..."

This script can be dropped into a file (say 'ima2_serial.job), and run with:

qsub ima2_serial.job

It should take less than a few minutes to run and will produce SLURM output and error files beginning with the job name 'IMA2_serial'. It also produces IMa2's own output files. Details on the meaning for the SLURM script are covered below in the SLURM section. The most important lines are the '#SBATCH --nodes=1 ntasks=1 mem=1920'. The first instructs SLURM to select 1 resource 'chunk' with 1 processor (core) and 1,920 MBs of memory in it for the job. The second instructs SLURM to place this job wherever the least used resources are found (freely). The compute node that it finally selects to run your job will be printed in the SLURM output file by the 'hostname' command.

Please take note of the IMa2 options used here. Details on each can be found in the IMa2 manual referenced above.