Mercurial > hg > cc > cirrus_home
changeset 85:e5d5958bf3fe
minor
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 15 Mar 2021 14:20:00 +0000 |
parents | 2fc33145242b |
children | b5fef78cbb26 |
files | bin/masterMaster.sh masterJob.sh |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/masterMaster.sh Sun Mar 14 21:28:02 2021 +0000 +++ b/bin/masterMaster.sh Mon Mar 15 14:20:00 2021 +0000 @@ -1,10 +1,11 @@ #!/bin/bash -# This runs on login machine to launch the real task (named by $1) on two machines +# This runs on login machine to launch the real task (named by $1) on multiple machines # Any further args are passed to $task.sh echo $(date) Launching master workers for "$@" from $(hostname) task=$1 shift +srun $HOME/bin/$task.sh "$@" +echo $(date) $task "$@" workers done + #nodes=($(scontrol show hostname "$SLURM_JOB_NODELIST")) #seq 1 -1 0 | $HOME/gentoo/usr/bin/parallel --will-cite --joblog master_$task.log -S "ssh -o StrictHostKeyChecking=accept-new ${nodes[1]}" -S "ssh -o StrictHostKeyChecking=accept-new ${nodes[0]}" -N 1 --workdir /dev/shm --transferfile ${task}_'{}'.txt $* $HOME/bin/$task.sh '{}' "$@" -srun $HOME/bin/$task.sh "$@" -echo $(date) $task "$@" workers done
--- a/masterJob.sh Sun Mar 14 21:28:02 2021 +0000 +++ b/masterJob.sh Mon Mar 15 14:20:00 2021 +0000 @@ -5,11 +5,13 @@ # Use -n n -c c for to launch n 'parallel ...' jobs each of which spawns c actual workers which # divide up the job task file task file (see below) between them. # Implies that ~/taskName_{0..n}.txt or ~/taskName/{0..n}.txt contain the necessary parameterisation -#SBATCH --time=00:01:00 +#SBATCH --time=01:00:00 #SBATCH --partition=standard #SBATCH --qos=standard #SBATCH --account=dc007 -#SBATCH --job-name stest +#SBATCH --job-name master + +export SBATCH_JOB_NAME="$1" cd ${SLURM_SUBMIT_DIR}