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 2023/03/03 16:36:15 UTC
[airavata] branch develop updated: Merging transfer input files from pre job commands for HTCondor script
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/develop by this push:
new 5836029d0e Merging transfer input files from pre job commands for HTCondor script
5836029d0e is described below
commit 5836029d0e0237552afa1d2751e491aa734062b1
Author: DImuthuUpe <di...@gmail.com>
AuthorDate: Fri Mar 3 11:36:06 2023 -0500
Merging transfer input files from pre job commands for HTCondor script
---
.../server/src/main/resources/HTCONDOR_Groovy.template | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/configuration/server/src/main/resources/HTCONDOR_Groovy.template b/modules/configuration/server/src/main/resources/HTCONDOR_Groovy.template
index 3625d0b065..9e4cb974a9 100644
--- a/modules/configuration/server/src/main/resources/HTCONDOR_Groovy.template
+++ b/modules/configuration/server/src/main/resources/HTCONDOR_Groovy.template
@@ -1,5 +1,8 @@
# HTCondor job submission script generated by Apache Airavata
<%
+
+ def checkCommand = {items, prefix -> for (it in items) if (it.startsWith(prefix)) return it}
+
if (executablePath != null && executablePath != "") out.print 'executable = ' + executablePath + '\n'
if (inputs != null && inputs.size() > 0) out.print 'arguments = \"'
if (inputs != null && inputs.size() > 0) for(input in inputs) out.print input + ' '
@@ -19,9 +22,12 @@
out.print 'should_transfer_files = Yes\nwhen_to_transfer_output = ON_EXIT\n'
if (inputFiles != null && inputFiles.size() > 0) out.print 'transfer_input_files = '
if (inputFiles != null && inputFiles.size() > 0) for(file in inputFiles) out.print file + ', '
+ def preJobInputs = checkCommand(preJobCommands, 'transfer_input_files =')
+ if (preJobInputs) out.print ',' + preJobInputs.substring(22)
+
if (inputFiles != null && inputFiles.size() > 0) out.print '\n'
if (moduleCommands != null) for(mc in moduleCommands) out.print mc +'\n'
- if (preJobCommands != null) for(pjc in preJobCommands) out.print pjc +'\n'
+ if (preJobCommands != null) for(pjc in preJobCommands) if (!pjc.startsWith("transfer_input_files =")) out.print pjc +'\n'
out.print 'queue\n'
if (postJobCommands != null) for(pjc in postJobCommands) out.print pjc +'\n'
%>