#! /bin/sh
-# Copyright (c) 2007-2015. The SimGrid Team.
-# All rights reserved.
+# Copyright (c) 2007-2016, The SimGrid Team. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
NETWORK_LATENCY="${DEFAULT_NETWORK_LATENCY}"
SPEED="${DEFAULT_SPEED}"
+PRIVATIZE="--cfg=smpi/privatize-global-variables:yes"
+
SIMOPTS="--cfg=surf/precision:1e-9 --cfg=network/model:SMPI --cfg=network/TCP-gamma:4194304"
#usage to print the way this script should be called
-map # display the machine on which each process rank is mapped
-np <numprocs> # use that amount of processes from the hostfile.
# By default, all processes of the hostfile are used.
+ -no-privatize # Disable the globals privatization, that is activated by default
-trace-ti # activate time independant tracing (for replay, default in smpi_simgrid.txt)
-trace # activate tracing (Paje, default in smpi_simgrid.trace)
-trace-comment <comment> # put a comment on the top of the trace file
EXTOPT="$2"
shift 2
;;
+ "-no-privatize")
+ PRIVATIZE=""
+ shift 1
+ ;;
"-map")
MAPOPT="true"
shift 1
done
fi
+set -- $hostnames
##---- generate <process> tags------------------------------
for i in ${SEQ}
do
if [ -n "${HOSTFILE}" ]; then
- j=$(( $i % ${NUMHOSTS} + 1 ))
+ j=$(( $i % ${NUMHOSTS} + 1 ))
+ fi
+
+ host=$(eval "echo \${$j}")
+
+ if [ -z $host ]; then
+ host="host"$($j)
fi
##---- optional display of ranks to process mapping
if [ -n "${MAPOPT}" ]; then
- echo "[rank $i] -> $(echo $hostnames|cut -d' ' -f$j)"
+ echo "[rank $i] -> $host"
fi
- if [ -z "$(echo $hostnames|cut -d' ' -f$j)" ]; then
- host="host"$($j)
- else
- host="$(echo $hostnames|cut -d' ' -f$j)"
- fi
echo " <process host=\"${host}\" function=\"$i\"> <!-- function name used only for logging -->" >> ${APPLICATIONTMP}
echo " <argument value=\"1\"/> <!-- instance -->" >> ${APPLICATIONTMP}
echo " <argument value=\"$i\"/> <!-- rank -->" >> ${APPLICATIONTMP}
export SMPI_GLOBAL_SIZE=${NUMPROCS}
if [ -n "${KEEP}" ] ; then
- echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}
+ echo ${EXEC} ${TRACEOPTIONS} ${SIMOPTS} ${PRIVATIZE} ${PLATFORMTMP} ${APPLICATIONTMP}
if [ ${HOSTFILETMP} = 1 ] ; then
echo "Generated hostfile ${HOSTFILE} kept."
fi