Skip to content

Commit

Permalink
remove tmp qsub script in EXIT trap
Browse files Browse the repository at this point in the history
  • Loading branch information
poquirion committed Jan 20, 2017
1 parent 6ec39fc commit 1bc6b8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions container/psom_console.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ finish () {
# Your cleanup code here
kill ${LOOP_ID} > /dev/null 2>&1
rm -r ${PSOM_FIFO_DIR} > /dev/null 2>&1
# rm -r /tmp/niak_worker_qsub.*
rm -r /tmp/psom_worker_qsub.*
## Could add a qdel cmd here to clean process when console is not running
}
trap finish EXIT

Expand All @@ -72,7 +73,7 @@ host_exec_loop () {
QSUB_OPT=(${line%SPLIT_LINE*})
if [[ ${QSUB_OPT[0]} == 'qsub_options' ]]; then
SINGULARITY=(${line#*SPLIT_LINE})
tmpfile=$(mktemp /tmp/niak_worker_qsub.XXXXXX)
tmpfile=$(mktemp /tmp/psom_worker_qsub.XXXXXX)
echo '#!/bin/bash' > ${tmpfile}
echo singularity exec ${PSOM_SINGULARITY_OPTIONS} ${SINGULARITY[@]:1} >> ${tmpfile}
qsub ${QSUB_OPT[@]:1} ${tmpfile}
Expand Down
2 changes: 1 addition & 1 deletion psom_gb_vars.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% PSOM version
gb_psom_version = '2.2.1'; % PSOM release number
gb_psom_version = '2.2.2'; % PSOM release number

% Is the environment Octave or Matlab ?
if exist('OCTAVE_VERSION','builtin')
Expand Down

0 comments on commit 1bc6b8b

Please sign in to comment.