Deepthought2 Primer

Logging in

You should ssh to rhel8.deepthought2.umd.edu to login to a RHEL8 login node:


        ssh <username>@rhel8.deepthought2.umd.edu
        
You can change your shell by using the chsh command. It appears that you can only do this currently on a RHEL6 login node (ssh to rhel6.deepthought2.umd.edu).

Loading modules

Modules enable a user to load system installed software. To load mpi, you need to type:


        module load openmpi/gcc
        
Once you do this you'll notice that mpicc and mpicxx are in your path.

You can look for other installed software by typing: module avail <name>. module list lists your currently loaded modules.

Compiling your code

You need to use mpicc or mpicxx to compile your code. You can do this on the login node.


        mpicc -O3 -o myexe myprogram.c
        

Running your code

All programs should be run on compute nodes by submitting a job via a batch script. A sample batch script looks like this:


        #!/bin/bash

        #SBATCH -N 1
        #SBATCH -t 00:10
        #SBATCH --constraint=rhel8

        mpirun -np 4 ./mpi
        

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:


        sbatch submit.sh
        

You can check the status of your jobs by typing:


        squeue -u