Skip to content

Commit

Permalink
Add line to docs about valgrind, fix typo in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ldowen committed Oct 31, 2024
1 parent 10a4121 commit 0db33f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -----------------------------------------------------------------------------
19 changes: 14 additions & 5 deletions docs/developer/dev/diagnostic_tools.rst
Original file line number Diff line number Diff line change
@@ -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 <sys_type>-<spec>.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 <sys_type>-<spec>.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.

Expand Down Expand Up @@ -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:
::
Expand Down

0 comments on commit 0db33f4

Please sign in to comment.