X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a8b29f2bc452ad2be0c7285e98f3bf7026d0ce6d..c810b409a11c5704ba8bace45aea7c4a197ef367:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index ad8aabe088..9e5689e5c1 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -414,7 +414,7 @@ set -- $hostnames ##---- generate tags------------------------------ #prepare arguments at once for ARG in $PROC_ARGS; do - ARGS="$ARGS"" + XML_ARGS="${XML_ARGS}"" " done @@ -438,7 +438,7 @@ do echo " " >> ${APPLICATIONTMP} fi else - echo ${ARGS} >> ${APPLICATIONTMP} + echo ${XML_ARGS} >> ${APPLICATIONTMP} fi echo " " >> ${APPLICATIONTMP} done @@ -513,6 +513,22 @@ wait $pid status=$? pid="" +# Keep temporary files on failures to help debugging +# +if [ ${status} -ne 0 ] ; then + if [ -z ${KEEP} ]; then + echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PRIVATIZE} ${PLATFORMTMP} ${APPLICATIONTMP} + if [ ${HOSTFILETMP} = 1 ] ; then + echo "Generated hostfile ${HOSTFILE} kept." + fi + if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then + echo "Generated unrolled hostfile ${UNROLLEDHOSTFILE} kept." + fi + fi + echo "Execution failed with code ${status}." + KEEP=true +fi + smpirun_cleanup exit $status