Usage: $0 [OPTIONS] -platform <xmldesc> -hostfile <hostfile> program [program-options]
Options:
-keep-temps # don't remove the generated files after execution
+ -wrapper <command> # use command to run the program (e.g. "valgrind")
-map # display the machine on which each process rank is mapped
-np <numprocs> # use that amount of processes from the hostfile.
# By default, all processes of the hostfile are used.
fi
EXTOPT=""
+WRAPPER=""
while true; do
case "$1" in
shift 1
;;
+ "-wrapper")
+ WRAPPER="$2"
+ shift 2
+ ;;
+
"-help" | "--help" | "-h")
usage
exit
esac
done
-EXEC="$1"
+if [ -n "$WRAPPER" ]; then
+ EXEC="$WRAPPER $1"
+else
+ EXEC="$1"
+fi
shift
##-----------------------------------
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
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