echo " [-np <numprocs>] # 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 <comment>]# put a comment on the top of the trace file"
+ echo " [-trace-comment-file <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"
;;
"-trace")
- TRACE_ACTIVE="true"
- shift 1
+ TRACE_ACTIVE="true"
+ shift 1
+ ;;
+
+ "-trace-comment")
+ TRACE_COMMENT="$2"
+ shift 2
+ ;;
+
+ "-trace-comment-file")
+ TRACE_COMMENT_FILE="$2"
+ shift 2
;;
"-trace-file")
NUMHOSTS=`cat ${HOSTFILE} | wc -l`
fi
+if [ ${EXEC} = "./smpi_replay" ]; then
+ APP_TRACES=$1;
+ if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then
+ hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`)
+ NUMTRACES=`cat ${APP_TRACES} | wc -l`
+ fi
+fi
+
##----------------------------------------------------------
## generate application.xml with hostnames from hostfile:
## the name of host_i (1<=i<=p, where -np p) is the line i
else
host="${hostnames[$j]}"
fi
- echo " <process host=\"${host}\" function=\"rank$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
+ echo " <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
echo " <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
- for ARG in $*; do
- echo " <argument value=\"${ARG}\"/>" >> ${APPLICATIONTMP}
- done
+ if [ ${EXEC} = "./smpi_replay" ]; then
+ if [ ${NUMTRACES} -gt 1 ]; then
+ echo " <argument value=\"${hosttraces[$j]}\"/>" >> ${APPLICATIONTMP}
+ else
+ echo " <argument value=\"${hosttraces[0]}\"/>" >> ${APPLICATIONTMP}
+ fi
+ else
+ for ARG in $*; do
+ echo " <argument value=\"${ARG}\"/>" >> ${APPLICATIONTMP}
+ done
+ fi
echo " </process>" >> ${APPLICATIONTMP}
done
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