X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5df5f1842ce179dc210b87f054ec6fec05b5550e..47c08390d2f3cee84c293760341ac34e86c5de94:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index b4ded8a409..ef6b063108 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -27,6 +27,8 @@ function usage () { echo " [-np ] # use that amount of processes from the hostfile." echo " # By default, all processes of the hostfile are used." echo " [-trace] # activate tracing" + echo " [-trace-comment ]# put a comment on the top of the trace file" + echo " [-trace-comment-file ] # put file contents on the top of the trace file as comment" echo " [-trace-grouped] # group MPI processes by location" echo " [-trace-resource] # trace resource utilization" echo " [-trace-triva] # generate configuration for Triva's GraphView" @@ -83,6 +85,15 @@ while true; do TRACE_ACTIVE="true" shift 1 ;; + + "-trace-comment") + TRACE_COMMENT="$2" + shift 2 + ;; + + "-trace-comment-file") + TRACE_COMMENT_FILE="$2" + shift 2 ;; "-trace-file") @@ -213,7 +224,7 @@ if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then NUMHOSTS=`cat ${HOSTFILE} | wc -l` fi -if [ ${EXEC} = "./replay" ]; then +if [ "${EXEC}" = "./smpi_replay" ]; then APP_TRACES=$1; if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`) @@ -259,7 +270,7 @@ do fi echo " " >> ${APPLICATIONTMP} echo " " >> ${APPLICATIONTMP} - if [ ${EXEC} = "./replay" ]; then + if [ "${EXEC}" = "./smpi_replay" ]; then if [ ${NUMTRACES} -gt 1 ]; then echo " " >> ${APPLICATIONTMP} else @@ -286,6 +297,14 @@ if [ -n "${TRACE_ACTIVE}" ]; then fi TRACEOPTIONS="--cfg=tracing:1 --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:1" + if [ -n "${TRACE_COMMENT}" ]; then + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment:${TRACE_COMMENT}" + fi + + if [ -n "${TRACE_COMMENT_FILE}" ]; then + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/comment_file:${TRACE_COMMENT_FILE}" + fi + if [ -n "${TRACE_GROUPED}" ]; then TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/smpi/group:1" fi