# Get the nodes in the cobalt reservation. The reservation must be active.
RESVNODES=$(ssh $HEADNODE scontrol show res -o$SLURM_RESERVATION | perl -n-e'm/Nodes=(.*?) .*State=ACTIVE/ ? print STDOUT $1 : die "No active cobalt reservation found"')
if[$?-eq 0 ];then
echo"Active reservation '$SLURM_RESERVATION' found, get online nodes in the reservation"