This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch param-sweep
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/param-sweep by this push:
     new 4132478  Minor change to param sweep job template
4132478 is described below

commit 4132478b71ae0eb4b35721c082fb2cc894fe55e0
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Thu Jul 9 10:51:51 2020 -0400

    Minor change to param sweep job template
---
 .../server/src/main/resources/SLURM_Fork_Sweep_Groovy.template    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/modules/configuration/server/src/main/resources/SLURM_Fork_Sweep_Groovy.template
 
b/modules/configuration/server/src/main/resources/SLURM_Fork_Sweep_Groovy.template
index 6b8a607..a6aff76 100644
--- 
a/modules/configuration/server/src/main/resources/SLURM_Fork_Sweep_Groovy.template
+++ 
b/modules/configuration/server/src/main/resources/SLURM_Fork_Sweep_Groovy.template
@@ -23,14 +23,15 @@ if (queueName != null && queueName != "") out.print 
'#SBATCH -p ' + queueName +
    if (workingDirectory != null && workingDirectory != "")  out.print 'cd ' + 
workingDirectory +'\n'
 
    out.print 'array=( ' + sweepRange.join(' ') + ' )\n'
-   out.print 'NODES=( $(scontrol show hostnames) )\n'
+   out.print 'NODES=( $(scontrol show hostnames $SLURM_JOB_NODELIST) )\n'
+   out.print 'ncnt=0\n'
    out.print 'for i in "${array[@]}"\n'
    out.print 'do \n'
    out.print 'pushd $i \n'
 
    out.print '(\n'
-   out.print 'export SCRATCH_ID=${NODES[$i]}\n'
-   out.print 'export GMS_HOST=${NODES[$i]}\n'
+   out.print 'export SCRATCH_ID=${NODES[$ncnt]}\n'
+   out.print 'export GMS_HOST=${NODES[$ncnt]}\n'
 
    if (preJobCommands != null) for(pjc in preJobCommands)  out.print pjc +' 
;\n'
    if (jobSubmitterCommand != null && jobSubmitterCommand != "")  out.print 
jobSubmitterCommand + ' '
@@ -42,6 +43,7 @@ if (queueName != null && queueName != "") out.print '#SBATCH 
-p ' + queueName +
    out.print '\n)&\n'
 
    out.print 'popd\n'
+   out.print 'ncnt=$ncnt+1;\n'
    out.print 'done\n'
    out.print 'wait\n'
 %>

Reply via email to