diff bin/test.sh @ 167:3213a8bb2ed1

new style batch jobs, see cirrus_work repo for _xxx.sh
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Mon, 18 Jul 2022 19:16:20 +0100
parents 11d973ecff4e
children
line wrap: on
line diff
--- a/bin/test.sh	Mon Jul 18 19:15:20 2022 +0100
+++ b/bin/test.sh	Mon Jul 18 19:16:20 2022 +0100
@@ -1,18 +1,17 @@
 #!/usr/bin/bash
-# Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] -N 2 --ntasks-per-node 2 -c 2 masterJob.sh test
-# run doTest.sh in parallel on 2 nodes, 2 tasks each, with input from test/n.t.txt
-n=$SLURM_NTASKS
-c=$SLURM_CPUS_PER_TASK
-nodename=$SLURMD_NODENAME
-task=$SLURM_LOCALID
-node=$SLURM_NODEID
-echo $(date) $nodename:$node:$task start
+# Invoke this as e.g. sbatch --time=00:05:00 [--exclusive] --ntasks=6 -c 13 ~/bin/test.sh
+# run _test.sh in parallel on 3 nodes, 2 tasks each
 
-#type parallel
-#module load gnu-parallel
+#SBATCH --time=00:01:00
+#SBATCH --partition=standard
+#SBATCH --qos=standard
+#SBATCH --account=ec184-guest
+#SBATCH --job-name test
 
-export PYTHONPATH=$PYTHONPATH:$HOME/lib/python
-parallel --will-cite -j $c dotest.sh $node $task '{}' < test.$node.$task.txt
+export W=/work/dc007/dc007
+
+echo $(date) Launching $SLURM_JOB_NUM_NODES nodes for test "$@" from $(hostname) to do $SLURM_NTASKS tasks, $SLURM_CPUS_PER_TASK cpus each
 
-echo $(date) $nodename:$node:$task end
+srun -c $SLURM_CPUS_PER_TASK $W/shared/bin/sing $W/hst/bin/_test.sh "$@"
 
+