summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a0e18ab)
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.
NUMHOSTS=`cat ${HOSTFILE} | wc -l`
fi
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
##----------------------------------------------------------
## generate application.xml with hostnames from hostfile:
## the name of host_i (1<=i<=p, where -np p) is the line i
fi
echo " <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
echo " <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
fi
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} = "./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
echo " </process>" >> ${APPLICATIONTMP}
done