A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
propagate the network model tweaks to simgrid
[simgrid.git]
/
src
/
smpi
/
smpirun.in
diff --git
a/src/smpi/smpirun.in
b/src/smpi/smpirun.in
index
70c8fa9
..
cad450d
100755
(executable)
--- a/
src/smpi/smpirun.in
+++ b/
src/smpi/smpirun.in
@@
-43,25
+43,30
@@
while true; do
fi
shift 2
;;
fi
shift 2
;;
-
+
"-map")
"-map")
- MAPOPT="
on
"
+ MAPOPT="
true
"
shift 1
;;
shift 1
;;
- "-
quiet
")
-
QUIET
="true"
+ "-
keep-temps
")
+
KEEP
="true"
shift 1
;;
"-help" | "--help" | "-h")
echo "usage:"
shift 1
;;
"-help" | "--help" | "-h")
echo "usage:"
- echo "$0 [-quiet] [-np <numprocs>] -platform <xmldesc> -hostfile <hostfile> [-map] program [program-options]"
+ echo "$0 [-quiet] [-
keep-temps] [-
np <numprocs>] -platform <xmldesc> -hostfile <hostfile> [-map] program [program-options]"
echo "or (deprecated usage):"
echo "or (deprecated usage):"
- echo "$0 [-quiet] [-np <numprocs>] [-bandwidth <bytes/sec>] [-latency <secs>] program [program-options]"
+ echo "$0 [-quiet] [-
keep-temps] [-
np <numprocs>] [-bandwidth <bytes/sec>] [-latency <secs>] program [program-options]"
echo
exit
;;
echo
exit
;;
+
+ "--cfg="*|"--log="*|"--network_model="*)
+ SIMOPTS="$SIMOPTS $1"
+ shift 1
+ ;;
*)
break
;;
*)
break
;;
@@
-135,16
+140,29
@@
fi
## hostfile has less than i lines.
##----------------------------------------------------------
## hostfile has less than i lines.
##----------------------------------------------------------
+HAVE_SEQ="`which seq`"
+HAVE_JOT="`which jot`"
+
+if [ -n "${HAVE_SEQ}" ]; then
+ SEQ=`${HAVE_SEQ} 0 $((${NUMPROCS}-1))`
+else
+ cnt=0
+ while (( $cnt < ${NUMPROCS} )) ; do
+ SEQ="$SEQ $cnt"
+ cnt=$((cnt + 1));
+ done
+fi
+
##---- generate <process> tags------------------------------
##---- generate <process> tags------------------------------
-for i in
`seq 0 $((${NUMPROCS}-1))`
+for i in
${SEQ}
do
if [ -n "${HOSTFILE}" ]; then
j=$(( $i % ${NUMHOSTS} ))
fi
##---- optional display of ranks to process mapping
do
if [ -n "${HOSTFILE}" ]; then
j=$(( $i % ${NUMHOSTS} ))
fi
##---- optional display of ranks to process mapping
- if [ -n
${MAPOPT}
]; then
- echo "[rank $
j
] -> ${hostnames[$j]}"
+ if [ -n
"${MAPOPT}"
]; then
+ echo "[rank $
i
] -> ${hostnames[$j]}"
fi
if [ -z "${hostnames[$j]}" ]; then
fi
if [ -z "${hostnames[$j]}" ]; then
@@
-165,15
+183,14
@@
cat >> ${APPLICATIONTMP} <<APPLICATIONFOOT
APPLICATIONFOOT
##-------------------------------- end DEFAULT APPLICATION --------------------------------------
APPLICATIONFOOT
##-------------------------------- end DEFAULT APPLICATION --------------------------------------
-if [ -
z "${QUIET
}" ] ; then
- echo ${EXEC} ${PLATFORMTMP} ${APPLICATIONTMP}
+if [ -
n "${KEEP
}" ] ; then
+ echo ${EXEC} ${
SIMOPTS} ${
PLATFORMTMP} ${APPLICATIONTMP}
fi
fi
-${EXEC} ${PLATFORMTMP} ${APPLICATIONTMP}
+${EXEC} ${
SIMOPTS} ${
PLATFORMTMP} ${APPLICATIONTMP}
-if [ -z "${QUIET}" ] ; then
- echo "[$0] cleaning up temp files"
-fi
-if [ -z "${PLATFORM}" ]; then
+if [ -z "${KEEP}" ] ; then
+ if [ -z "${PLATFORM}" ]; then
rm ${PLATFORMTMP}
rm ${PLATFORMTMP}
+ fi
+ rm ${APPLICATIONTMP}
fi
fi
-rm ${APPLICATIONTMP}