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
dividing by 0 is not always the best possible choice, even if the user shoulnt give...
[simgrid.git]
/
src
/
smpi
/
smpirun.in
diff --git
a/src/smpi/smpirun.in
b/src/smpi/smpirun.in
index
2cd37fc
..
9dfb521
100755
(executable)
--- a/
src/smpi/smpirun.in
+++ b/
src/smpi/smpirun.in
@@
-8,6
+8,8
@@
@CMAKE_SMPI_COMMAND@
@CMAKE_SMPI_COMMAND@
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
DEFAULT_LOOPBACK_BANDWIDTH="498000000"
DEFAULT_LOOPBACK_LATENCY="0.000004"
DEFAULT_NETWORK_BANDWIDTH="$((26 * 1024 * 1024))"
DEFAULT_LOOPBACK_BANDWIDTH="498000000"
DEFAULT_LOOPBACK_LATENCY="0.000004"
DEFAULT_NETWORK_BANDWIDTH="$((26 * 1024 * 1024))"
@@
-163,7
+165,12
@@
while true; do
"-help" | "--help" | "-h")
usage
"-help" | "--help" | "-h")
usage
- exit
+ exit 0
+ ;;
+
+ "-version" | "--version" | "-v")
+ printf '%b\n' "$SIMGRID_VERSION"
+ exit 0
;;
"--cfg="*|"--log="*)
;;
"--cfg="*|"--log="*)
@@
-343,7
+350,11
@@
fi
for i in ${SEQ}
do
if [ -n "${HOSTFILE}" ]; then
for i in ${SEQ}
do
if [ -n "${HOSTFILE}" ]; then
- j=$(( $i % ${NUMHOSTS} + 1 ))
+ if [ ${NUMHOSTS} = 0 ] ; then
+ j= 0
+ else
+ j=$(( $i % ${NUMHOSTS} + 1 ))
+ fi
fi
##---- optional display of ranks to process mapping
if [ -n "${MAPOPT}" ]; then
fi
##---- optional display of ranks to process mapping
if [ -n "${MAPOPT}" ]; then