login.zaratan.umd.edu to login to a zaratan login node:
You can change your shell by using the chsh command.
Modules enable a user to load system installed software. To load mpi, you need to type:
Once you do this you'll notice that mpicc and mpicxx are in your path. You can view your path variable by typing:
module load openmpi/gcc
You can look for other installed software by typing: module avail <name>.
module list lists your currently loaded modules.
You need to use mpicc (for C programs) or mpicxx (for C++ programs) to compile your code. You can do this on the login node.
mpicc -O3 -o myexe myprogram.c
All programs should be run on compute nodes by submitting a job via a batch script. Below we show a sample batch script for launching the myexe executable on 2 compute nodes, with 8 processes per node.
#SBATCH -N 2
#SBATCH -t 00:10
mpirun -np 16 ./myexe
Jobs are submitted to the batch system using sbatch. Lets say you save the snippet above in a file called submit.sh. You can then type:
For a quicker turnaround time, you may use the debug queue. However, the maximum allowed wall clock time is 15 minutes.
sbatch -p debug submit.sh
You can check the status of your jobs by typing:
You can also request interactive sessions on Zaratan. In an interactive session, slurm (the job scheduler) will allocate a compute node for you for a specified amount of wall clock time. You can then ssh into this compute node and run your commands interactively on the shell. This is especially useful for debugging code.
You can request an interactive session in the following two ways:
Once your job is scheduled, you will be placed on a compute node automatically. Once there you can directly run your programs on the shell. See the cluster documentation on interactive jobs for more details on sinteractive here.
sinteractive -c 4 -t 60
Unlike before, salloc does not place you on the compute node directly. Once your job is scheduled, you should see the address of the compute node assigned to you (for example, compute-b8-21). Now you have to ssh into this node.
salloc -N 1 --time=01:00:00