Submit a simple MPI job

INCD uses soSGE for job submission and schedulling. We currently planning a migration to a new batch system slurm

Quick syntax guide

Command Comments
qstat Standard queue status command (see man qstat for details )
qdel Delete your jobs from the queues. The jobid is returned by qsub at job submission time
qsub Submit jobs to the queues. (see man qsub for details)


Submit a simple MPI job

  • On this example we run a small MPI application doing the following steps:

    • Create a submission file
    • Submit the job to the default queue
    • Load the correct software
    • Execute a simple MPI code
  • Create a submission file

  • Edit the file


# Call the MPI environment, selecting two cores 
#$ -pe mpi 2

# Choose the queue hpc (OPTIONAL). If you leave this option empty system will assume the default queue
#$ -q hpc

# Load software modules (Open MPI 2.1.0 and GCC compiler 7.3). Please check session software for the details
source /etc/profile.d/
module load openmpi-2.1.0 
module load gcc-7.3

# Compile application 
echo "=== Compiling ===" 
mpicc -o cpi cpi.c

# Run application. Please note that the number of cores used by MPI must be same as the ones requested.
echo "=== Running ==="
mpirun -np $NSLOTS cpi

  • Submit the job

Your job 5076311 ("") has been submitted