#!/bin/tcsh ##### These lines are for Slurm #SBATCH -t 5:00 #SBATCH -N 4 #SBATCH -p pReserved #SBATCH -o output.mpithreads #SBATCH -J 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'