Rocky Slurm Basic Multi

From NIMBioS
Revision as of 20:45, 25 August 2022 by Jondale (talk | contribs) (Created page with "= About = = myscript.sh = <pre> #!/bin/bash H=`hostname -s` C=`ps -o cpuid -h -p ${BASHPID} | xargs` echo "${H} (${C})" </pre> For example purposes, we'll use a simple bash script. It's only purpose is to output the hostname of the node we're on and the cpuid the script is running. This will help illustrate that our script is being run on multiple nodes and/or multiple cores on each node.")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

About

myscript.sh

#!/bin/bash

H=`hostname -s`
C=`ps -o cpuid -h -p ${BASHPID} | xargs`

echo "${H} (${C})"

For example purposes, we'll use a simple bash script. It's only purpose is to output the hostname of the node we're on and the cpuid the script is running. This will help illustrate that our script is being run on multiple nodes and/or multiple cores on each node.