view bin/stest.sh @ 128:ababa631a10f

more focussed, better SLURM_... vars
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Fri, 09 Jul 2021 13:45:04 +0000
parents 464d2dfb99c9
children
line wrap: on
line source

#!/bin/bash
echo I am node "$SLURM_NODEID", cpu "$PMI_FD", task: "$SLURM_LOCALID", args "$@"
if [ $SLURM_LOCALID = 1 ]
then
  echo Node $SLURM_NODEID input: $(cat stest_$SLURM_NODEID.txt)
  if [ $SLURM_NODEID = 1 ]
  then
    lscpu | grep -E '^Thread|^Core|^Socket|^CPU\('
    echo cpu: $PMI_FD
    printenv
  fi
fi