X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7aae0300f97d9f6269e1b11b2ddb92db7679d3f4..33d0a5072b2c5d0a0d12740ba41434a5876ce997:/src/smpi/smpirun.in diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 3536dd145c..d095d29778 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -37,6 +37,7 @@ Options: -wrapper # use command to run the program (e.g. "valgrind" or "gdb --args") -gdb # run within GDB (-wrapper "gdb --args" -keep-temps) -lldb # run within LLDB (-wrapper "lldb --" -keep-temps) + -vgdb # run within Valgrind+GDB (-wrapper "valgrind --vgdb=yes --vgdb-error=0" -keep-temps) -map # display the machine on which each process rank is mapped -np # use that amount of processes from the hostfile. # By default, all processes of the hostfile are used. @@ -211,6 +212,12 @@ while true; do SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" shift 1 ;; + "-vgdb") + WRAPPER="valgrind --vgdb=yes --vgdb-error=0" + KEEP="true" + SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" + shift 1 + ;; "-lldb") WRAPPER="lldb --" KEEP="true" @@ -294,21 +301,25 @@ if [ -z "${HOSTFILE}" ] ; then HOSTFILE="$(mktemp smpitmp-hostfXXXXXX)" perl -ne 'print "$1\n" if /.*.*/' ${PLATFORM} > ${HOSTFILE} # put all > ${HOSTFILE} + @PYTHON_EXECUTABLE@ -c ' +import xml.etree.ElementTree as ET +import sys +import re + +tree = ET.parse(sys.stdin) + +for elem in tree.findall(".//cluster"): + prefix = elem.attrib["prefix"] + radical = elem.attrib["radical"] + suffix = elem.attrib["suffix"] + for r in radical.split(","): + m = re.match("^([^-]*?)-([^-]*)$", r) + if m: + for i in range(int(m.group(1)), int(m.group(2))): + print(prefix + str(i) + suffix) + else: + print(prefix + r + suffix) + ' < ${PLATFORM} >> ${HOSTFILE} fi UNROLLEDHOSTFILETMP=0 @@ -498,6 +509,7 @@ if [ -n "${TRACE_ACTIVE}" ]; then fi ##---------------------- end SMPI TRACING OPTIONS --------------------------------- +# Do not remove, this variable may be used by user code (e.g. StarPU) export SMPI_GLOBAL_SIZE=${NUMPROCS} if [ -n "${KEEP}" ] ; then echo ${EXEC} ${PRIVATIZE} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP}