view bin/_test.sh @ 2:b4801f5696b2

compute node workers, see cirrus_home/bin repo for login node masters
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 18 Jul 2022 19:22:42 +0100
parents
children 4e1ecfa46bee
line wrap: on
line source

#!/bin/bash
# Usage: dotest

N=$SLURM_JOB_NUM_NODES
n=$SLURM_NTASKS
c=$SLURM_CPUS_PER_TASK
nodename=$SLURMD_NODENAME
local=$SLURM_LOCALID
node=$SLURM_NODEID

tPerN=$((n / N))

task=$((local + (node * tPerN)))


echo $(date) executing test on node $N:$nodename:$node task $n:$task:$SLURM_PROCID local:$local