# HG changeset patch # User Henry S. Thompson # Date 1614800036 0 # Node ID 6304d5c462291c805558d6fb38f11b03e364f160 # Parent fcb390b3ea553963a1fc83e4852fabd83202acfe trying to move to slurm diff -r fcb390b3ea55 -r 6304d5c46229 bin/masterMaster.sh --- a/bin/masterMaster.sh Sat May 09 16:16:28 2020 +0100 +++ b/bin/masterMaster.sh Wed Mar 03 19:33:56 2021 +0000 @@ -1,8 +1,9 @@ #!/bin/bash -# This runs on login machine to launch the real job (named by $1) on two machines -# Any further args are passed to parallel +# This runs on login machine to launch the real task (named by $1) on two machines +# Any further args are passed to $task.sh echo $(date) Launching master workers for "$@" task=$1 shift -seq 1 -1 0 | parallel --will-cite --joblog master_$task.log -S r1i5n1 -S r1i5n0 -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}' +nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) +seq 1 -1 0 | parallel --will-cite --joblog master_$task.log -S ${nodes[1]} -S ${nodes[0]} -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}' "$@" echo $(date) $task "$@" workers done diff -r fcb390b3ea55 -r 6304d5c46229 masterJob.sh --- a/masterJob.sh Sat May 09 16:16:28 2020 +0100 +++ b/masterJob.sh Wed Mar 03 19:33:56 2021 +0000 @@ -1,17 +1,20 @@ #!/bin/bash # Attempt at a master Master job -# Usage: qsub -v t=taskName[, x=extras] masterJob.sh +# Usage: sbatch [--nodes=n] [--tasks-per-node=n] masterJob.sh taskName [args...] # Implies that ~/taskName_{0,1}.txt contain the necessary parameterisation -#PBS -l select=2:ncpus=36 -#PBS -l place=exclhost -#PBS -l walltime=48:00:00 -#PBS -V -#PBS -A dc007 -#PBS -N master -# -#module load mpt +#SBATCH --nodes=2 +#SBATCH --exclusive +#SBATCH --tasks-per-node 36 +#SBATCH --cpus-per-task 1 +#SBATCH --time=00:01:00 +#SBATCH --partition=standard +#SBATCH --qos=short +#SBATCH --account=ec166-guest +#SBATCH --job-name stest -cd ${PBS_O_WORKDIR} +cd ${SLURM_SUBMIT_DIR} -bin/masterMaster.sh "$t" $x +module load gnu-parallel +bin/masterMaster.sh "$@" +