Skip to content

Commit 9399914

Browse files
committed
ability to specify requirement for grid_submit
1 parent aaa5bde commit 9399914

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

GRID/utils/grid_submit.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,17 @@ if [[ "${IS_ALIEN_JOB_SUBMITTER}" ]]; then
313313
# -) Special singularity / Apptainer image
314314
[[ ! ${IMAGESPEC} ]] && IMAGESPEC=$(grep "^#JDL_IMAGE=" ${SCRIPT} | sed 's/#JDL_IMAGE=//')
315315
echo "Found Container Image to be ${IMAGESPEC}"
316+
317+
# -) Requirements-Spec
318+
REQUIRESPEC=$(grep "^#JDL_REQUIRE=" ${SCRIPT} | sed 's/#JDL_REQUIRE=//')
319+
if [ ! "${REQUIRESPEC}" ]; then
320+
echo "No Requirement setting found; Setting to default"
321+
REQUIRESPEC="{member(other.GridPartitions,"${GRIDPARTITION:-multicore_8}")};"
322+
echo "Requirement is ${REQUIRESPEC}"
323+
fi
324+
325+
echo "Requirements JDL entry is ${REQUIRESPEC}"
326+
316327
# -) PackageSpec
317328
[[ ! ${PACKAGESPEC} ]] && PACKAGESPEC=$(grep "^#JDL_PACKAGE=" ${SCRIPT} | sed 's/#JDL_PACKAGE=//')
318329
echo "Found PackagesSpec to be ${PACKAGESPEC}"
@@ -358,6 +369,8 @@ EOF
358369
echo "Packages = {"${PACKAGESPEC}"};" >> "${MY_JOBNAMEDATE}.jdl" # add package spec
359370
[ $ERROROUTPUTSPEC ] && echo "OutputErrorE = {"${ERROROUTPUTSPEC}"};" >> "${MY_JOBNAMEDATE}.jdl" # add error output files
360371
[ $IMAGESPEC ] && echo "DebugTag = {\"${IMAGESPEC}\"};" >> "${MY_JOBNAMEDATE}.jdl" # use special singularity image to run job
372+
# echo "Requirements = {"${REQUIREMENTSSPEC}"} >> "${MY_JOBNAMEDATE}.jdl"
373+
[ $REQUIRESPEC ] && echo "Requirements = ${REQUIRESPEC}" >> "${MY_JOBNAMEDATE}.jdl"
361374

362375
# "output_arch.zip:output/*@disk=2",
363376
# "checkpoint*.tar@disk=2"

0 commit comments

Comments
 (0)