Skip to content

Commit

Permalink
Merge pull request #54 from JaimeFrey/HTCONDOR-526-extra-submit-args
Browse files Browse the repository at this point in the history
Make BatchExtraSubmitArgs more flexible. HTCONDOR-526
  • Loading branch information
timtheisen authored Jun 9, 2021
2 parents 52b6b0f + 9c580d7 commit df6dc07
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scripts/blah_common_submit_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,11 @@ function bls_set_up_local_and_extra_args ()
fi
if [ ! -z "$bls_opt_xtra_args" ] ; then
echo -e $bls_opt_xtra_args >> $bls_tmp_file 2> /dev/null
prefix=
if echo "$bls_opt_xtra_args" | grep -q -v "^$bls_submit_args_prefix" ; then
prefix="$bls_submit_args_prefix "
fi
echo -e ${prefix}${bls_opt_xtra_args} >> $bls_tmp_file 2> /dev/null
fi
}
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/lsf_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

. `dirname $0`/blah_common_submit_functions.sh

bls_submit_args_prefix="#BSUB"

conffile=$lsf_confpath/lsf.conf

lsf_base_path=`cat $conffile|grep LSB_SHAREDIR| awk -F"=" '{ print $2 }'`
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/pbs_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@

. `dirname $0`/blah_common_submit_functions.sh

bls_submit_args_prefix="#PBS"

logpath=${pbs_spoolpath}/server_logs
if [ ! -d $logpath -o ! -x $logpath ]; then
if [ -x "${pbs_binpath}/tracejob" ]; then
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/sge_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

. `dirname $0`/blah_common_submit_functions.sh

bls_submit_args_prefix='#$'

if [ -z "$sge_rootpath" ]; then sge_rootpath="/usr/local/sge/pro"; fi
if [ -r "$sge_rootpath/${sge_cellname:-default}/common/settings.sh" ]
then
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/slurm_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
slurm_std_storage=${slurm_std_storage:-/dev/null}
slurm_binpath=${slurm_binpath:-/usr/bin}

bls_submit_args_prefix="#SBATCH"

bls_parse_submit_options "$@"

bls_setup_all_files
Expand Down

0 comments on commit df6dc07

Please sign in to comment.