You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2020/12/24 00:24:21 UTC
[airavata] branch ultrascan-mainteinence updated: Prioritizing
external parameters when constructing the slurm script
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch ultrascan-mainteinence
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/ultrascan-mainteinence by this push:
new da70969 Prioritizing external parameters when constructing the slurm script
da70969 is described below
commit da70969e7a5abffab0e2bd9420a5da265cb231bb
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Wed Dec 23 19:24:04 2020 -0500
Prioritizing external parameters when constructing the slurm script
---
.../configuration/server/src/main/resources/SLURM_Groovy.template | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/configuration/server/src/main/resources/SLURM_Groovy.template b/modules/configuration/server/src/main/resources/SLURM_Groovy.template
index 457ceee..c09ae1b 100644
--- a/modules/configuration/server/src/main/resources/SLURM_Groovy.template
+++ b/modules/configuration/server/src/main/resources/SLURM_Groovy.template
@@ -8,25 +8,25 @@
def rmQueue = checkCommand(preJobCommands, 'RM #SBATCH -p')
preJobCommands = preJobCommands - extQueue
preJobCommands = preJobCommands - rmQueue
- if (queueName != null && queueName != "" && rmQueue == null) out.print extQueue ? extQueue + '\n' : '#SBATCH -p ' + queueName + '\n'
+ if (extQueue) out.print extQueue + '\n' else if (queueName != null && queueName != "" && rmQueue == null) out.print '#SBATCH -p ' + queueName + '\n'
def extNodes = checkCommand(preJobCommands, '#SBATCH -N')
def rmNodes = checkCommand(preJobCommands, 'RM #SBATCH -N')
preJobCommands = preJobCommands - extNodes
preJobCommands = preJobCommands - rmNodes
- if (nodes != null && nodes != "" && rmNodes == null) out.print extNodes? extNodes + '\n' : '#SBATCH -N ' + nodes + '\n'
+ if (extNodes) out.print extNodes + '\n' else if (nodes != null && nodes != "" && rmNodes == null) out.print '#SBATCH -N ' + nodes + '\n'
def extCpu = checkCommand(preJobCommands, '#SBATCH -n')
def rmCpu = checkCommand(preJobCommands, 'RM #SBATCH -n')
preJobCommands = preJobCommands - extCpu
preJobCommands = preJobCommands - rmCpu
- if (cpuCount != null && cpuCount != "" && rmCpu == null) out.print extCpu? extCpu + '\n' : '#SBATCH -n ' + cpuCount + '\n'
+ if (extCpu) out.print extCpu + '\n' else if (cpuCount != null && cpuCount != "" && rmCpu == null) out.print '#SBATCH -n ' + cpuCount + '\n'
def extMem = checkCommand(preJobCommands, '#SBATCH --mem=')
def rmMem = checkCommand(preJobCommands, 'RM #SBATCH --mem=')
preJobCommands = preJobCommands - extMem
preJobCommands = preJobCommands - rmMem
- if (usedMem != null && usedMem != "" && rmMem == null) out.print extMem ? extMem + '\n': '#SBATCH --mem=' + usedMem + 'M\n'
+ if (extMem) out.print extMem + '\n' else if (usedMem != null && usedMem != "" && rmMem == null) out.print '#SBATCH --mem=' + usedMem + 'M\n'
if (mailAddress != null && mailAddress != "") out.print '#SBATCH --mail-user=' + mailAddress + '\n'
if (accountString != null && accountString != "" ) out.print '#SBATCH -A ' + accountString + '\n'