Skip to content
Snippets Groups Projects
Commit 38612bcd authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

COB-49: check for head node

parent 3c31a7f1
No related branches found
No related tags found
1 merge request!6Import cobalt2 into lofar4
......@@ -105,6 +105,9 @@ do
$NO_GPU_EXIT_CODE) echo "NO GPU ON THIS NODE"
NRNOTAPPLICABLE=$((NRNOTAPPLICABLE + 1))
;;
$NOT_ON_HEAD_EXIT_CODE) echo "CAN ONLY RUN ON HEADNODE"
NRNOTAPPLICABLE=$((NRNOTAPPLICABLE + 1))
;;
*) echo "ERROR (see $LOGFILE)"
NRFAILURE=$((NRFAILURE + 1))
NRAPPLICABLE=$((NRAPPLICABLE + 1))
......
......@@ -10,6 +10,7 @@ NEED_NON_ROOT_EXIT_CODE=43
INVALID_CLUSTER_EXIT_CODE=44
INVALID_NODE_EXIT_CODE=45
NO_GPU_EXIT_CODE=46
NOT_ON_HEAD_EXIT_CODE=47
check_root_privileges()
{
......@@ -41,6 +42,16 @@ check_running_on_cobalt2()
fi
}
check_running_on_cobalt2_head()
{
# early exit if not on cobalt2 cluster
check_running_on_cobalt2
if [[ `hostname -f` != "cbm299."* ]]; then
exit $NOT_ON_HEAD_EXIT_CODE
fi
}
check_has_nvidia_gpu()
{
lspci | grep -i nvidia
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment