From 0db33f4298011b0108642fe4b428995cc1cbda46 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 31 Oct 2024 14:52:21 -0700 Subject: [PATCH] Add line to docs about valgrind, fix typo in dockerfile --- Dockerfile | 4 +++- docs/developer/dev/diagnostic_tools.rst | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32db7e2ba..3c8e9bad0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,11 +75,13 @@ RUN make install # Run ATS testing suite. WORKDIR ../install ENV MPLBACKEND=agg + # ATS currently does not allow us to run in parallel for regular linux machines # If it did, we would need some of the following commands #RUN export OMP_NUM_THREADS=1 #RUN export MACHINE_TYPE="winParallel" #RUN ./spheral-ats --level 99 --mpiexe mpiexec --npMax $JCXX tests/integration.ats + # Instead, we will just run it normally -RUN ./spheral-ats --level 99 test/integration.ats +RUN ./spheral-ats --level 99 tests/integration.ats # ----------------------------------------------------------------------------- diff --git a/docs/developer/dev/diagnostic_tools.rst b/docs/developer/dev/diagnostic_tools.rst index a607db329..782bfc72f 100644 --- a/docs/developer/dev/diagnostic_tools.rst +++ b/docs/developer/dev/diagnostic_tools.rst @@ -1,15 +1,24 @@ -Code Performance Diagnostics -############################ +Code Debugging and Diagnostics +############################## -Spheral uses Caliper to preform code diagnostics, such as timing. To enable this functionality in the code, Spheral needs to be configured with ``ENABLE_TIMER=ON``. Otherwise, the timing regions are no-ops for improved preformance. +Valgrind +======== + +We advise using Valgrind to check memory leaks when doing development on Spheral. +When using Valgrind to check Spheral, be sure to use the provided suppression file :: - ./scripts/devtools/host-config-build.py -.cmake -DENABLE_TIMER=ON + valgrind --suppressions=./scripts/devtools/valgrind_python_suppression ./spheral Using Caliper ============= +Spheral uses Caliper to preform code diagnostics, such as timing. To enable this functionality in the code, Spheral needs to be configured with ``ENABLE_TIMER=ON``. Otherwise, the timing regions are no-ops for improved preformance. +:: + + ./scripts/devtools/host-config-build.py -.cmake -DENABLE_TIMER=ON + Caliper is configured and started through the ``cali::ConfigManager``. The ``cali::ConfigManager`` is wrapped in a ``TimerMgr`` singleton class, which has a python interface. @@ -99,7 +108,7 @@ Adiak metadata can be added inside python code using the following function call .. _manual_caliper: Starting Caliper Manually -======================== +========================= As mentioned above, the Caliper timing manager is normally configured and started in the ``commandLine()`` routine. However, Caliper can be directly configured and started through the python interface, if desired. This can be done by putting the following into the python file: ::