Skip to content

Commit d3b73b5

Browse files
committed
grid_submit: support for production split
A production split level can now be provided via the --prodsplit n argument.
1 parent 6728896 commit d3b73b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

GRID/utils/grid_submit.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ while [ $# -gt 0 ] ; do
194194
--asuser) ASUSER=$2; shift 2 ;; #
195195
--label) JOBLABEL=$2; shift 2 ;; # label identifying the production (e.g. as a production identifier)
196196
--mattermost) MATTERMOSTHOOK=$2; shift 2 ;; # if given, status and metric information about the job will be sent to this hook
197-
--controlserver) CONTROLSERVER=$2; shift 2 ;; # if given
197+
--controlserver) CONTROLSERVER=$2; shift 2 ;; # allows to give a SERVER ADDRESS/IP which can act as controller for GRID jobs
198+
--prodsplit) PRODSPLIT=$2; shift 2 ;; # allows to set JDL production split level (useful to easily replicate workflows)
198199
-h) Usage ; exit ;;
199200
*) break ;;
200201
esac
@@ -203,6 +204,7 @@ export JOBTTL
203204
export JOBLABEL
204205
export MATTERMOSTHOOK
205206
export CONTROLSERVER
207+
export PRODSPLIT
206208

207209
# analyse options:
208210
# we should either run with --script or with -c
@@ -265,16 +267,18 @@ if [[ "${IS_ALIEN_JOB_SUBMITTER}" ]]; then
265267

266268
cd "${WORKDIR}"
267269

270+
QUOT='"'
268271
# ---- Generate JDL ----------------
269272
# TODO: Make this configurable or read from a preamble section in the jobfile
270273
cat > "${MY_JOBNAMEDATE}.jdl" <<EOF
271274
Executable = "${MY_BINDIR}/${MY_JOBNAMEDATE}.sh";
272275
Arguments = "${CONTINUE_WORKDIR:+"-c ${CONTINUE_WORKDIR}"} --local ${O2TAG:+--o2tag ${O2TAG}} --ttl ${JOBTTL} --label ${JOBLABEL:-label} ${MATTERMOSTHOOK:+--mattermost ${MATTERMOSTHOOK}} ${CONTROLSERVER:+--controlserver ${CONTROLSERVER}}";
273276
InputFile = "LF:${MY_JOBWORKDIR}/alien_jobscript.sh";
274-
OutputDir = "${MY_JOBWORKDIR}";
275277
Output = {
276278
"logs*.zip@disk=2"
277279
};
280+
${PRODSPLIT:+Split = ${QUOT}production:1-${PRODSPLIT}${QUOT};}
281+
OutputDir = "${MY_JOBWORKDIR}/${PRODSPLIT:+#alien_counter_03i#}";
278282
Requirements = member(other.GridPartitions,"${GRIDPARTITION:-multicore_8}");
279283
MemorySize = "60GB";
280284
TTL=${JOBTTL};

0 commit comments

Comments
 (0)