Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add -analyze to smpirun to activate both smpi/display-timing and smpi/display-allocs...
authorAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 28 Mar 2021 00:57:18 +0000 (01:57 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 28 Mar 2021 00:57:18 +0000 (01:57 +0100)
src/smpi/smpirun.in

index e1df53d..e18553b 100755 (executable)
@@ -34,6 +34,7 @@ usage () {
 Usage: $0 [OPTIONS] -platform <xmldesc> -hostfile <hostfile> program [program-options]
        $0 [OPTIONS] -platform <xmldesc> -hostfile <hostfile> -replay <tracefile> [program] [program-options]
 Options:
+  -analyze                   # show information about allocations and timings at the end of execution
   -keep-temps                # don't remove the generated files after execution
   -wrapper <command>         # use command to run the program (e.g. "valgrind" or "gdb --args")
   -gdb                       # run within GDB (-wrapper "gdb --args" -keep-temps)
@@ -146,35 +147,35 @@ while true; do
             shift 2
             ;;
         "-platform")
-           PLATFORM="$2"
+            PLATFORM="$2"
             if [ ! -f "${PLATFORM}" ]; then
                 die "the file '${PLATFORM}' does not exist"
             fi
-           shift 2
+            shift 2
             ;;
         "-hostfile" | "-machinefile")
-           HOSTFILE="$2"
+            HOSTFILE="$2"
             if [ ! -f "${HOSTFILE}" ]; then
                 die "the file '${HOSTFILE}' does not exist"
             fi
-           shift 2
+            shift 2
             ;;
         "-replay")
             APP_TRACES="$2"
             shift 2
             ;;
-       "-no-privatize")
-           PRIVATIZE="--cfg=smpi/privatization:no"
-           shift 1
-           ;;
+        "-no-privatize")
+            PRIVATIZE="--cfg=smpi/privatization:no"
+            shift 1
+            ;;
         "-map")
-           MAPOPT=1
+            MAPOPT=1
+            shift 1
+            ;;
+        "-tmpdir")
+            SMPITMPDIR="$2"
             shift 1
             ;;
-       "-tmpdir")
-           SMPITMPDIR="$2"
-           shift 1
-           ;;
         "-trace")
             TRACE_ACTIVE="true"
             shift 1
@@ -209,10 +210,10 @@ while true; do
             SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
             shift 1
             ;;
-       "-quiet")
-           QUIET="true"
-           shift 1
-           ;;
+        "-quiet")
+            QUIET="true"
+            shift 1
+            ;;
         "-wrapper")
             WRAPPER="$2"
             shift 2
@@ -235,6 +236,10 @@ while true; do
             SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes"
             shift 1
             ;;
+        "-analyze")
+            SIMOPTS="$SIMOPTS --cfg=smpi/display-timing:yes --cfg=smpi/display-allocs:yes"
+            shift 1
+            ;;
         "-help" | "--help" | "-h")
             usage
             exit 0