Deepthought2 Primer

Logging in

You should ssh in to to login to a deepthought2 login node:

        ssh <username>
You can change your shell by using the chsh command.

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 (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

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:


        #SBATCH -N 1
        #SBATCH -t 00:10

        mpirun -np 4 ./myexe

Jobs are submitted to the batch system using sbatch. Lets say you save the snippet above in a file called You can then type:


You can check the status of your jobs by typing:

        squeue -u