X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fbb6b4556c347a1dec9e462574fdc2967f494002..9ba558e8b4fa1b132e834c1fbab074a3ac848169:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 861ed116ca..d53e7297ca 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -15,7 +15,7 @@ NETWORK_BANDWIDTH="${DEFAULT_NETWORK_BANDWIDTH}" NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}" POWER="${DEFAULT_POWER}" -SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304 --cfg=smpi/display_timing:1" +SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP_gamma:4194304" #usage to print the way this script should be called function usage () { @@ -23,6 +23,7 @@ cat < -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") -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. @@ -49,6 +50,7 @@ then fi EXTOPT="" +WRAPPER="" while true; do case "$1" in @@ -131,6 +133,11 @@ while true; do shift 1 ;; + "-wrapper") + WRAPPER="$2" + shift 2 + ;; + "-help" | "--help" | "-h") usage exit @@ -149,7 +156,11 @@ while true; do esac done -EXEC="$1" +if [ -n "$WRAPPER" ]; then + EXEC="$WRAPPER $1" +else + EXEC="$1" +fi shift ##----------------------------------- @@ -240,7 +251,7 @@ if [ "${EXTOPT}" = "smpi_replay" ]; then hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`) NUMTRACES=`cat ${APP_TRACES} | wc -l` else - printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES}}" >&2 + printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES\}}" >&2 exit 1 fi fi @@ -334,9 +345,9 @@ fi export SMPI_GLOBAL_SIZE=${NUMPROCS} if [ -n "${KEEP}" ] ; then - echo ${EXEC} ${SIMOPTS} ${TRACEOPTIONS} ${PLATFORMTMP} ${APPLICATIONTMP} + echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} fi -${EXEC} ${SIMOPTS} ${TRACEOPTIONS} ${PLATFORMTMP} ${APPLICATIONTMP} +${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} status=$? if [ -z "${KEEP}" ] ; then