#!/bin/tcsh ##### These lines are for Moab #MSUB -l walltime=5:00 #MSUB -l nodes=4 #MSUB -q pReserved #MSUB -o output.mpithreads #MSUB -N mpithreads ##### 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 -pthread -w -o mpithreads mpithreads.c echo ' ' echo 'Starting job with the following nodes:' squeue|grep $SLURM_JOBID echo ' ' echo '--------------------- Job Output Below ---------------------' srun -N4 mpithreads sleep 120 echo ' ' echo 'Done'