#!/bin/bash # a sample job submission script to submit an MPI job to the broadwl partition on Midway2 # set the job name to hello-mpi #SBATCH --job-name=hello-mpi # send output to hello-mpi.out #SBATCH --output=hello-mpi.out # receive an email when job starts, ends, and fails #SBATCH --mail-type=BEGIN,END,DAIL # this job requests 32 cores. Cores can be selected from various nodes. #SBATCH --ntasks=32 # there are a few partitions on Midway2 and it is important to specify which # partition you want to run your job on. Not having the following line, the # sandby partition on Midway1 will be selected as the default partition #SBATCH --partition=broadwl # the --constraint=fdr or --constraint=edr options (available on Midway2 only) # could be given to guarantee a job will be using nodes with the FDR or EDR # Infiniband interconnects. Without this option, the scheduler will select # available nodes without considering their interconnect types. #SBATCH --constraint=fdr # load the openmpi module module load openmpi # Run the process with mpirun. Notice -n is not required. mpirun will # automatically figure out how many processes to run from the slurm options mpirun ./hello-mpi