X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/22ad42bc0e39c33058fa8f47d3b41966a45ffa80..8d628b79ad8699f85bc5483891b6834161709c07:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 65b9c1b11f..ac444b7075 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -23,7 +23,7 @@ NETWORK_BANDWIDTH="${DEFAULT_NETWORK_BANDWIDTH}" NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}" SPEED="${DEFAULT_SPEED}" -PRIVATIZE="--cfg=smpi/privatize-global-variables:yes" +PRIVATIZE="--cfg=smpi/privatization:@HAVE_PRIVATIZATION@" SIMOPTS="--cfg=surf/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP-gamma:4194304" @@ -33,7 +33,7 @@ usage () { Usage: $0 [OPTIONS] -platform -hostfile program [program-options] Options: -keep-temps # don't remove the generated files after execution - -wrapper # use command to run the program (e.g. "valgrind") + -wrapper # use command to run the program (e.g. "valgrind" or "gdb --args") -map # display the machine on which each process rank is mapped -np # use that amount of processes from the hostfile. # By default, all processes of the hostfile are used. @@ -206,6 +206,7 @@ while true; do ;; "-keep-temps") KEEP="true" + SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" shift 1 ;; "-wrapper") @@ -249,11 +250,7 @@ then exit fi -if [ -n "$WRAPPER" ]; then - EXEC="$WRAPPER $1" -else - EXEC="$1" -fi +EXEC="$1" shift # steel --cfg and --logs options @@ -493,7 +490,7 @@ fi export SMPI_GLOBAL_SIZE=${NUMPROCS} if [ -n "${KEEP}" ] ; then - echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PRIVATIZE} ${PLATFORMTMP} ${APPLICATIONTMP} + echo ${EXEC} ${PRIVATIZE} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} if [ ${HOSTFILETMP} = 1 ] ; then echo "Generated hostfile ${HOSTFILE} kept." fi @@ -513,7 +510,7 @@ fi # * The FD 3 is used to temporarily store FD 1. This is because the shell connects FD 1 to /dev/null when the command # is launched in the background: this can be overriden in bash but not in standard bourne shell. exec 3<&0 -${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} <&3 3>&- & +${WRAPPER} "@SMPIMAIN@" ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} <&3 3>&- & pid=$! exec 3>&- wait $pid @@ -524,7 +521,7 @@ pid="" # if [ ${status} -ne 0 ] ; then if [ -z ${KEEP} ]; then - echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PRIVATIZE} ${PLATFORMTMP} ${APPLICATIONTMP} + echo ${EXEC} ${PRIVATIZE} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} if [ ${HOSTFILETMP} = 1 ] ; then echo "Generated hostfile ${HOSTFILE} kept." fi