#!/bin/bash
# Invoke this as e.g. sbatch -n 8 -c 5 masterJob.sh atest
n=$SLURM_NODEID
id=$SLURM_LOCALID
#printenv | fgrep SLURM
task=$SLURM_PROCID
echo $(date) $(cat atest/$task.txt) start
echo I am host $(hostname) node $n, cpu "$PMI_FD", local $id, task $task
sleep 4
echo $(date) $(cat atest/$id.txt) end

