From 16f4e0f8c37216b991db811ec15ab79da4481d12 Mon Sep 17 00:00:00 2001 From: Lucas Schnorr Date: Mon, 2 May 2011 12:34:53 +0200 Subject: [PATCH] [trace] new smpi tracing options details: - to activate the traditional gantt-chart visualization, pass -trace as parameter. Then, the tracefile can be visualized with Paje using $ Paje smpi_simgrid.trace - to activate the graph-view and resource utilization, pass -trace -trace-triva -trace-resource as parameters. Then, the tracefile can be visualization with Triva using $ Triva --graph --gc_conf smpi_uncat.plist smpi_simgrid.trace - other options include: - group mpi processes by where they are executed: -trace-grouped - specify a different trace filename: -trace-file --- src/smpi/smpirun.in | 52 +++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index aea4116b55..e9eea0fc4b 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -18,11 +18,16 @@ POWER="${DEFAULT_POWER}" SIMOPTS="--cfg=maxmin/precision:1e-9 --cfg=network/model:SMPI --cfg=TCP_gamma:4194304" - #usage to print the way this script should be called function usage () { echo "usage:" - echo "$0 [-quiet] [-keep-temps] [-trace ] [-np ] -platform -hostfile [-map] program [program-options]" + echo "$0 [-quiet] [-keep-temps]" + echo " [-np ] -platform -hostfile [-map] program [program-options]" + echo " [-trace] # activate tracing" + echo " [-trace-grouped] # group MPI processes by location" + echo " [-trace-resource] # trace resource utilization" + echo " [-trace-triva] # generate configuration for Triva's GraphView" + echo " [-trace-file ] # name of the tracefile (simgrid_smpi.trace)" echo "or (deprecated usage):" echo "$0 [-quiet] [-keep-temps] [-np ] [-bandwidth ] [-latency ] program [program-options]" echo @@ -35,7 +40,6 @@ then exit fi - while true; do case "$1" in "-np" | "-n") @@ -73,17 +77,27 @@ while true; do ;; "-trace") - TRACEOPT="$2" - shift 2 + TRACE_ACTIVE="true" + shift 1 + ;; + + "-trace-file") + TRACE_FILENAME="$2" + shift 2 ;; "-trace-grouped") - TRACE_GROUPED="true" + TRACE_GROUPED="true" shift 1 ;; - "-triva") - TRIVA="true" + "-trace-resource") + TRACE_RESOURCE="true" + shift 1 + ;; + + "-trace-triva") + TRACE_TRIVA="true" shift 1 ;; @@ -229,19 +243,25 @@ APPLICATIONFOOT ##-------------------------------- end DEFAULT APPLICATION -------------------------------------- ##---------------------- SMPI TRACING OPTIONS --------------------------------- - if [ -n "${TRACEOPT}" ]; then - TRACEOPTIONS="--cfg=tracing:1 --cfg=tracing/filename:${TRACEOPT} --cfg=tracing/smpi:1 --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1" - else - TRACEOPTIONS="" +if [ -n "${TRACE_ACTIVE}" ]; then + #define trace filename + if [ -z "${TRACE_FILENAME}" ]; then + TRACE_FILENAME="smpi_simgrid.trace" fi + TRACEOPTIONS="--cfg=tracing:1 --cfg=tracing/filename:${TRACE_FILENAME} --cfg=tracing/smpi:1" - if [ -n "${TRIVA}" ]; then - TRACEOPTIONS="$TRACEOPTIONS --cfg=triva/categorized:smpi_cat.plist --cfg=triva/uncategorized:smpi_uncat.plist" + if [ -n "${TRACE_GROUPED}" ]; then + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/smpi/group:1" fi - if [ -n "${TRACE_GROUPED}" ]; then - TRACEOPTIONS="$TRACEOPTIONS --cfg=tracing/smpi/group:1" + if [ -n "${TRACE_RESOURCE}" ]; then + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/categorized:1 --cfg=tracing/uncategorized:1" fi + + if [ -n "${TRACE_TRIVA}" ]; then + TRACEOPTIONS="${TRACEOPTIONS} --cfg=tracing/categorized:smpi_cat.plist --cfg=tracing/uncategorized:smpi_uncat.plist" + fi +fi ##---------------------- end SMPI TRACING OPTIONS --------------------------------- export SMPI_GLOBAL_SIZE=${NUMPROCS} -- 2.20.1