Skip to content

Commit 7189435

Browse files
gardner48Steven-Robertsdrreynoldsbalos1
committed
Feature: Logging Updates (#501)
Follow on to utilities added in #499 * Make info logging output in the integrators more consistent * Update parser for MRI and operator splitting methods * Add function to extract lists of data for plotting * Add example scripts using log parser --------- Co-authored-by: Steven Roberts <roberts115@llnl.gov> Co-authored-by: Daniel R. Reynolds <reynolds@smu.edu> Co-authored-by: Cody Balos <balos1@llnl.gov>
1 parent e401097 commit 7189435

File tree

257 files changed

+61977
-1775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+61977
-1775
lines changed

.cmake-format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
'EXTRA_ARGS': '+',
6060
'FLOAT_PRECISION': 1,
6161
'INTEGER_PRECISION': 1,
62+
'LABELS': '+',
6263
'MPI_NPROCS': 1,
6364
'TEST_ARGS': '+'},
6465
'pargs': {'flags': ['NODIFF'], 'nargs': '2+'}},

.github/workflows/ubuntu-clang-latest.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,25 @@ jobs:
4343
-D CMAKE_CXX_COMPILER=$(which clang++) \
4444
-D SUNDIALS_LOGGING_LEVEL=${{matrix.logging_level}} \
4545
-D ENABLE_ALL_WARNINGS=ON \
46-
-D ENABLE_WARNINGS_AS_ERRORS=ON
46+
-D ENABLE_WARNINGS_AS_ERRORS=ON \
47+
-D SUNDIALS_TEST_DEVTESTS=ON \
48+
-D SUNDIALS_TEST_UNITTESTS=ON \
49+
-D SUNDIALS_TEST_ENABLE_GTEST=OFF \
50+
-D SUNDIALS_TEST_FLOAT_PRECISION=4 \
51+
-D SUNDIALS_TEST_INTEGER_PRECISION=10
4752
4853
- name: Build
4954
# Build your program with the given configuration
5055
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
5156

57+
- name: Test
58+
# Run logging tests
59+
run: |
60+
ctest \
61+
--test-dir ${{github.workspace}}/build \
62+
--label-regex logging \
63+
--verbose
64+
5265
build_cycle_profiling:
5366
runs-on: ubuntu-latest
5467

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ uberenv_libs
7777

7878
# swig
7979
/swig/swig
80+
81+
# tools
82+
/tools/suntools/__pycache__

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ backends with Trilinos. As such, Trilinos 14 or newer is required and the
4545

4646
Example programs using *hypre* have been updated to support v2.20 and newer.
4747

48+
The information level logging output in ARKODE, CVODE(S), and IDA(S) has been
49+
updated to be more uniform across the packages and a new `tools` directory
50+
has been added with a Python module, `suntools`, containing utilities for
51+
parsing logging output. The Python utilities for parsing CSV output have been
52+
relocated from the `scripts` directory to the Python module.
53+
4854
The build system has been updated to utilize the CMake LAPACK imported target
4955
which should ease building SUNDIALS with LAPACK libraries that require setting
5056
specific linker flags e.g., MKL.

cmake/macros/SundialsAddTest.cmake

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
# [ANSWER_DIR path]
2222
# [ANSWER_FIEL file]
2323
# [EXAMPLE_TYPE type]
24-
# [TEST_ARGS arg1 arg2 ...])
24+
# [TEST_ARGS arg1 arg2 ...]
25+
# [LABELS label1 label2 ...])
2526
# ~~~
2627
#
2728
# CMake macro to add a SUNDIALS regression test. Keyword input arguments can be
@@ -46,6 +47,11 @@
4647
#
4748
# The option EXAMPLE_TYPE set the example type i.e., release or develop examples
4849
#
50+
# The option TEST_ARGS are command line arguments to pass to the executable
51+
#
52+
# The options LABELS are labels added to the test properties to easily run (or
53+
# exclude) groups of test with ctest -L <label> (or ctest -LE <label>)
54+
#
4955
# When SUNDIALS_TEST_DEVTESTS is OFF (default) the executable is run and success
5056
# or failure is determined by the executable return value (zero or non-zero
5157
# respectively).
@@ -83,7 +89,7 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
8389
set(options "NODIFF")
8490
set(oneValueArgs "MPI_NPROCS" "FLOAT_PRECISION" "INTEGER_PRECISION"
8591
"ANSWER_DIR" "ANSWER_FILE" "EXAMPLE_TYPE")
86-
set(multiValueArgs "TEST_ARGS" "EXTRA_ARGS")
92+
set(multiValueArgs "LABELS" "TEST_ARGS" "EXTRA_ARGS")
8793

8894
# parse inputs and create variables SUNDIALS_ADD_TEST_<keyword>
8995
cmake_parse_arguments(SUNDIALS_ADD_TEST "${options}" "${oneValueArgs}"
@@ -282,6 +288,14 @@ macro(SUNDIALS_ADD_TEST NAME EXECUTABLE)
282288

283289
endif()
284290

291+
if(SUNDIALS_TEST_DEVTESTS OR NOT SUNDIALS_ADD_TEST_EXAMPLE_TYPE)
292+
# set any labels (must quote SUNDIALS_ADD_TEST_LABELS)
293+
if(SUNDIALS_ADD_TEST_LABELS)
294+
set_tests_properties(${NAME} PROPERTIES LABELS
295+
"${SUNDIALS_ADD_TEST_LABELS}")
296+
endif()
297+
endif()
298+
285299
endif()
286300

287301
endmacro()

doc/arkode/guide/source/Usage/ARKStep/User_callable.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,9 +3060,9 @@ Main solver optional output functions
30603060
30613061
.. note::
30623062
3063-
The file ``scripts/sundials_csv.py`` provides python utility functions to
3064-
read and output the data from a SUNDIALS CSV output file using the key
3065-
and value pair format.
3063+
The Python module ``tools/suntools`` provides utilities to read and output
3064+
the data from a SUNDIALS CSV output file using the key and value pair
3065+
format.
30663066
30673067
.. versionadded:: 5.2.0
30683068

doc/arkode/guide/source/Usage/ERKStep/User_callable.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,9 +1644,9 @@ Main solver optional output functions
16441644
16451645
.. note::
16461646
1647-
The file ``scripts/sundials_csv.py`` provides python utility functions to
1648-
read and output the data from a SUNDIALS CSV output file using the key
1649-
and value pair format.
1647+
The Python module ``tools/suntools`` provides utilities to read and output
1648+
the data from a SUNDIALS CSV output file using the key and value pair
1649+
format.
16501650
16511651
.. versionadded:: 5.2.0
16521652

doc/arkode/guide/source/Usage/MRIStep/User_callable.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,9 +1724,9 @@ Main solver optional output functions
17241724
17251725
.. note::
17261726
1727-
The file ``scripts/sundials_csv.py`` provides python utility functions to
1728-
read and output the data from a SUNDIALS CSV output file using the key
1729-
and value pair format.
1727+
The Python module ``tools/suntools`` provides utilities to read and output
1728+
the data from a SUNDIALS CSV output file using the key and value pair
1729+
format.
17301730
17311731
.. versionadded:: 5.2.0
17321732

doc/arkode/guide/source/Usage/SPRKStep/User_callable.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,9 @@ Main solver optional output functions
738738
739739
.. note::
740740
741-
The file ``scripts/sundials_csv.py`` provides python utility functions to
742-
read and output the data from a SUNDIALS CSV output file using the key
743-
and value pair format.
741+
The Python module ``tools/suntools`` provides utilities to read and output
742+
the data from a SUNDIALS CSV output file using the key and value pair
743+
format.
744744
745745
.. deprecated:: 6.1.0
746746

doc/arkode/guide/source/Usage/User_callable.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3542,9 +3542,9 @@ Retrieve the accumulated temporal error estimate :c:func:`ARKodeGetAccumul
35423542
35433543
.. note::
35443544
3545-
The file ``scripts/sundials_csv.py`` provides python utility functions to
3546-
read and output the data from a SUNDIALS CSV output file using the key
3547-
and value pair format.
3545+
The Python module ``tools/suntools`` provides utilities to read and output
3546+
the data from a SUNDIALS CSV output file using the key and value pair
3547+
format.
35483548
35493549
.. versionadded:: 6.1.0
35503550

0 commit comments

Comments
 (0)