From fcd1a1c2621f6d91150cc1e5e01e6ef929aeea64 Mon Sep 17 00:00:00 2001 From: suter Date: Thu, 6 Sep 2012 16:16:14 +0200 Subject: [PATCH 1/1] attach time-independent traces to processes when the executable is called replay. It takes only one argument that is a file listing the traces to attach. If there is only one trace in this file, all the processes try to find their own actions in it. Otherwise, they have their own trace to read. --- src/smpi/smpirun.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index aa962e271f..673d0cc45b 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -212,6 +212,14 @@ if [ -n "${HOSTFILE}" ] && [ -f ${HOSTFILE} ]; then NUMHOSTS=`cat ${HOSTFILE} | wc -l` fi +if [ ${EXEC} = "./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 @@ -250,9 +258,17 @@ do fi echo " " >> ${APPLICATIONTMP} echo " " >> ${APPLICATIONTMP} - for ARG in $*; do - echo " " >> ${APPLICATIONTMP} - done + if [ ${EXEC} = "./replay" ]; then + if [ ${NUMTRACES} -gt 1 ]; then + echo " " >> ${APPLICATIONTMP} + else + echo " " >> ${APPLICATIONTMP} + fi + else + for ARG in $*; do + echo " " >> ${APPLICATIONTMP} + done + fi echo " " >> ${APPLICATIONTMP} done -- 2.20.1