Skip to content

Commit e77837f

Browse files
authored
Merge pull request #37 from kpedro88/master
Condor script updates
2 parents 5f95038 + de67705 commit e77837f

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

bind_condor.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/bin/bash
22

3+
bind_if_exists(){
4+
for ITEM in "$@"; do
5+
TESTITEM="${ITEM%%:*}"
6+
if [ -e "$TESTITEM" ]; then
7+
export APPTAINER_BIND=${APPTAINER_BIND}${APPTAINER_BIND:+,}${ITEM}
8+
fi
9+
done
10+
}
11+
312
LPC_CONDOR_CONFIG=/etc/condor/config.d/01_cmslpc_interactive
413
LPC_CONDOR_LOCAL=/usr/local/bin/cmslpc-local-conf.py
514

@@ -12,18 +21,18 @@ if [ "$COMMAND_NAME" = "$(basename $LPC_CONDOR_LOCAL)" ]; then
1221
fi
1322

1423
OSG_CONDOR_CONFIG=/etc/condor/condor_config
15-
OSG_CONDOR_LOCAL=/usr/share/condor/config.d,/etc/condor/config.d
24+
OSG_CONDOR_LOCAL=(/usr/share/condor/config.d /etc/condor/config.d)
1625

1726
LXP_CONDOR_CONFIG=/etc/condor/condor_config
18-
LXP_CONDOR_LOCAL=/etc/condor/config.d,/usr/bin/myschedd.sh,/usr/bin/myschedd,/etc/myschedd
27+
LXP_CONDOR_LOCAL=(/etc/condor/config.d /usr/bin/myschedd.sh /usr/bin/myschedd /etc/myschedd)
1928

2029
if [[ "$(uname -a)" == *cms*.fnal.gov* ]]; then
21-
export APPTAINER_BIND=${APPTAINER_BIND}${APPTAINER_BIND:+,}${LPC_CONDOR_CONFIG},${LPC_CONDOR_LOCAL}:${LPC_CONDOR_LOCAL}.orig,${COMMAND_PATH}:${LPC_CONDOR_LOCAL}
30+
bind_if_exists ${LPC_CONDOR_CONFIG} ${LPC_CONDOR_LOCAL}:${LPC_CONDOR_LOCAL}.orig "${COMMAND_PATH}":${LPC_CONDOR_LOCAL}
2231
export APPTAINERENV_CONDOR_CONFIG=${LPC_CONDOR_CONFIG}
23-
elif [[ "$(uname -a)" == *.uscms.org* ]] || [[ "$(uname -a)" == *.osg-htc.org* ]]; then
24-
export APPTAINER_BIND=${APPTAINER_BIND}${APPTAINER_BIND:+,}${OSG_CONDOR_CONFIG},${OSG_CONDOR_LOCAL}
32+
elif [[ "$(uname -a)" == *.uscms.org* ]] || [[ "$(uname -a)" == *.osg-htc.org* ]] || [[ "$(uname -a)" == *cmscon.hep.wisc.edu* ]]; then
33+
bind_if_exists ${OSG_CONDOR_CONFIG} "${OSG_CONDOR_LOCAL[@]}"
2534
export APPTAINERENV_CONDOR_CONFIG=${OSG_CONDOR_CONFIG}
2635
elif [[ "$(uname -a)" == *lxplus*.cern.ch* ]]; then
27-
export APPTAINER_BIND=${APPTAINER_BIND}${APPTAINER_BIND:+,}${LXP_CONDOR_CONFIG},${LXP_CONDOR_LOCAL}
36+
bind_if_exists ${LXP_CONDOR_CONFIG} "${LXP_CONDOR_LOCAL[@]}"
2837
export APPTAINERENV_CONDOR_CONFIG=${LXP_CONDOR_CONFIG}
2938
fi

call_host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919
if [ -z "$CALL_HOST_DIR" ]; then
2020
if [[ "$(uname -a)" == *cms*.fnal.gov* ]]; then
2121
export CALL_HOST_DIR=~/nobackup/pipes
22-
elif [[ "$(uname -a)" == *.uscms.org* ]] || [[ "$(uname -a)" == *.osg-htc.org* ]] ; then
22+
elif [[ "$(uname -a)" == *.uscms.org* ]] || [[ "$(uname -a)" == *.osg-htc.org* ]] || [[ "$(uname -a)" == *cmscon.hep.wisc.edu* ]]; then
2323
export CALL_HOST_DIR=/scratch/$(whoami)/pipes
2424
elif [[ "$(uname -a)" == *lxplus*.cern.ch* ]]; then
2525
export CALL_HOST_DIR=/tmp/$(whoami)/pipes

0 commit comments

Comments
 (0)