#!/bin/tcsh ##### These lines are for Moab #MSUB -l walltime=5:00 #MSUB -l nodes=4 #MSUB -q pReserved #MSUB -o output.mpiarray #MSUB -N mpiarray ##### These are shell commands cd ~/slurmmoab echo -n 'This machine is '; hostname echo -n 'My jobid is '; echo $SLURM_JOBID echo 'My path is:' echo $PATH echo ' ' echo 'Compiling...' #### Intel C without warnings is the default - change if you want mpicc -w -o mpi_array mpi_array.c echo ' ' echo 'Starting job with the following nodes:' squeue|grep $SLURM_JOBID echo ' ' echo '--------------------- Job Output Below ---------------------' srun -n48 mpi_array sleep 120 echo ' ' echo 'Done'