mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: improvements to mpirunDebug
- the '-no-core' to limit coredumps to zero size - the '-quick' option, which changes valgrind --leak-check from "full" to "summary", and implies -no-core as well. - enforce tcp libfabrics provider under valgrind since valgrind does not otherwie work nicely with RMA
This commit is contained in:
@ -43,6 +43,8 @@ options:
|
|||||||
-local Same as -spawn=1
|
-local Same as -spawn=1
|
||||||
-remote Same as -spawn=2
|
-remote Same as -spawn=2
|
||||||
-clean Remove log and startup files
|
-clean Remove log and startup files
|
||||||
|
-no-core Restrict core dump to 0 size
|
||||||
|
-quick Valgrind with 'summary' (not 'full') and use -no-core
|
||||||
-decompose-dict=<file> Specific decomposeParDict name
|
-decompose-dict=<file> Specific decomposeParDict name
|
||||||
-help Print the usage
|
-help Print the usage
|
||||||
|
|
||||||
@ -108,8 +110,9 @@ Linux)
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
unset appName appArgs nProcs
|
unset appName appArgs nProcs
|
||||||
unset method spawn optClean optValue
|
unset method spawn optClean optValue opt_nocore
|
||||||
optConfirm=true
|
optConfirm=true
|
||||||
|
opt_leakcheck=full
|
||||||
|
|
||||||
decompDict="system/decomposeParDict"
|
decompDict="system/decomposeParDict"
|
||||||
|
|
||||||
@ -153,6 +156,15 @@ do
|
|||||||
: "${spawn:=local}"
|
: "${spawn:=local}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-quick)
|
||||||
|
opt_leakcheck="summary"
|
||||||
|
opt_nocore=true
|
||||||
|
;;
|
||||||
|
|
||||||
|
-no-core)
|
||||||
|
opt_nocore=true
|
||||||
|
;;
|
||||||
|
|
||||||
-valgr*)
|
-valgr*)
|
||||||
method="valgrind"
|
method="valgrind"
|
||||||
unset optConfirm
|
unset optConfirm
|
||||||
@ -338,12 +350,16 @@ fi
|
|||||||
|
|
||||||
case "$sourceFoam" in
|
case "$sourceFoam" in
|
||||||
*/bashrc)
|
*/bashrc)
|
||||||
sourceFoam=". $sourceFoam $FOAM_SETTINGS"
|
sourceFoam=". $sourceFoam $FOAM_SETTINGS || true"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "**sourceFoam: $sourceFoam" 1>&2
|
echo "**sourceFoam: $sourceFoam" 1>&2
|
||||||
|
|
||||||
|
# remove old files
|
||||||
|
rm -rf ./mpirun.files
|
||||||
|
rm -rf ./mpirun.log
|
||||||
|
|
||||||
mkdir -p ./mpirun.files
|
mkdir -p ./mpirun.files
|
||||||
mkdir -p ./mpirun.log
|
mkdir -p ./mpirun.log
|
||||||
|
|
||||||
@ -375,6 +391,12 @@ $sourceFoam
|
|||||||
cd "${PWD}" || exit
|
cd "${PWD}" || exit
|
||||||
COMMANDS
|
COMMANDS
|
||||||
|
|
||||||
|
if [ "$opt_nocore" = true ]
|
||||||
|
then
|
||||||
|
echo "# no coredump" >> "$procCmdFile"
|
||||||
|
echo "ulimit -c 0 2>/dev/null" >> "$procCmdFile"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add to the mpirun.schema
|
# Add to the mpirun.schema
|
||||||
case "$method" in
|
case "$method" in
|
||||||
(*xterm*) echo "${node}${xterm} -e ${procCmdFile}" >> "$schema_file" ;;
|
(*xterm*) echo "${node}${xterm} -e ${procCmdFile}" >> "$schema_file" ;;
|
||||||
@ -400,10 +422,16 @@ COMMANDS
|
|||||||
echo "read input"
|
echo "read input"
|
||||||
;;
|
;;
|
||||||
(valgrind | valgrind-log)
|
(valgrind | valgrind-log)
|
||||||
echo "valgrind --leak-check=full --show-reachable=yes $exec $appArgs > $procLog 2>&1"
|
echo "# valgrind does not work nicely with RMA (libfabric)"
|
||||||
|
echo "export FI_PROVIDER=tcp"
|
||||||
|
echo
|
||||||
|
echo "valgrind --leak-check=$opt_leakcheck --show-reachable=yes $exec $appArgs > $procLog 2>&1"
|
||||||
;;
|
;;
|
||||||
(valgrind-xterm)
|
(valgrind-xterm)
|
||||||
echo "valgrind --leak-check=full --show-reachable=yes $exec $appArgs 2>&1 | tee $procLog"
|
echo "# valgrind does not work nicely with RMA (libfabric)"
|
||||||
|
echo "export FI_PROVIDER=tcp"
|
||||||
|
echo
|
||||||
|
echo "valgrind --leak-check=$opt_leakcheck --show-reachable=yes $exec $appArgs 2>&1 | tee $procLog"
|
||||||
echo "read input"
|
echo "read input"
|
||||||
;;
|
;;
|
||||||
(gperf)
|
(gperf)
|
||||||
|
|||||||
Reference in New Issue
Block a user