Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define an additional parameter for the hack around smpi_replay in smpirun.
[simgrid.git] / src / smpi / smpirun.in
index 9145e70..d1d395e 100755 (executable)
@@ -33,6 +33,7 @@ Options:
   -trace-resource            # trace resource utilization
   -trace-triva               # generate configuration for Triva's GraphView
   -trace-file <tracefile>    # name of the tracefile (simgrid_smpi.trace)
+  -ext <value>               # additional parameter (reserved)
 
 or (deprecated usage):
   $0 [-keep-temps] [-np <numprocs>] [-bandwidth <bytes/sec>] [-latency <secs>] program [program-options]
@@ -47,6 +48,8 @@ then
     exit
 fi
 
+EXTOPT=""
+
 while true; do
   case "$1" in
    "-np" | "-n")
@@ -78,6 +81,11 @@ while true; do
        shift 2
     ;;
 
+   "-ext")
+      EXTOPT="$2"
+      shift 2
+   ;;
+
    "-map")
        MAPOPT="true"
       shift 1
@@ -226,7 +234,7 @@ if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then
       NUMHOSTS=`cat ${HOSTFILE} | wc -l`
 fi
 
-if [ "${EXEC}" = "./smpi_replay" ]; then
+if [ "${EXTOPT}" = "smpi_replay" ]; then
   APP_TRACES=$1;
   if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then
      hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`)
@@ -272,7 +280,7 @@ do
   fi
   echo "  <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
   echo "    <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
-  if [ "${EXEC}" = "./smpi_replay" ]; then
+  if [ "${EXTOPT}" = "smpi_replay" ]; then
     if  [ ${NUMTRACES} -gt 1 ]; then
       echo "    <argument value=\"${hosttraces[$j]}\"/>" >> ${APPLICATIONTMP}
     else