Skip to content

Commit

Permalink
Merge branch 'feature/sunadjoint-core-modules' into feature/sunadjoin…
Browse files Browse the repository at this point in the history
…t-arkode
  • Loading branch information
balos1 committed Jan 17, 2025
2 parents f114a0f + 7ad26bc commit b1148e4
Show file tree
Hide file tree
Showing 316 changed files with 19,546 additions and 25,752 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ubuntu-clang-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,23 @@ jobs:
--label-regex logging \
--verbose
- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files
path: |
${{ github.workspace }}/build
!${{ github.workspace }}/build/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files
path: |
${{ github.workspace }}/build/Testing/
build_cycle_profiling:
runs-on: ubuntu-latest

Expand All @@ -82,3 +99,20 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Archive build files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: build_files
path: |
${{ github.workspace }}/build
!${{ github.workspace }}/build/Testing/output
- name: Archive output files from failed build
uses: actions/upload-artifact@v4
if: failure()
with:
name: output_files
path: |
${{ github.workspace }}/build/Testing/
7 changes: 3 additions & 4 deletions cmake/macros/SundialsAddLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,9 @@ macro(sundials_add_library target)
list(REMOVE_ITEM _stripped_all_libs ${_item})
endif()
endforeach()
add_custom_target(fake_to_force_build_order_${obj_target})
add_dependencies(fake_to_force_build_order_${obj_target}
${_stripped_all_libs})
add_dependencies(${obj_target} fake_to_force_build_order_${obj_target})
add_custom_target(fake_${obj_target})
add_dependencies(fake_${obj_target} ${_stripped_all_libs})
add_dependencies(${obj_target} fake_${obj_target})
target_link_libraries(${obj_target} ${_all_libs})
endif()

Expand Down
2 changes: 1 addition & 1 deletion doc/shared/sundials/Install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ SUNDIALS "addons" are community developed code additions for SUNDIALS that can b
SUNDIALS build system so that they have full access to all internal SUNDIALS symbols. The intent is
for SUNDIALS addons to function as if they are part of the SUNDIALS library, while allowing them to
potentially have different licenses (although we encourage BSD-3-Clause still), code style (although
we encourage them to follow the SUNDIALS style outlined :ref:`here <SourceCode>`).
we encourage them to follow the SUNDIALS style outlined in the developer guide).

.. warning::

Expand Down
2 changes: 1 addition & 1 deletion doc/shared/sunmemory/SUNMemory_Description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ This API consists of three new SUNDIALS types: :c:type:`SUNMemoryType`,
The function implementing :c:func:`SUNMemoryHelper_Alloc`

.. c:member:: SUNErrCode (*alloc)(SUNMemoryHelper, SUNMemory* memptr, size_t mem_size, size_t stride, SUNMemoryType mem_type, void* queue)
.. c:member:: SUNErrCode (*allocstrided)(SUNMemoryHelper, SUNMemory* memptr, size_t mem_size, size_t stride, SUNMemoryType mem_type, void* queue)
The function implementing :c:func:`SUNMemoryHelper_AllocStrided`

Expand Down
7 changes: 4 additions & 3 deletions doc/superbuild/source/developers/releases/Checklist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ web pages.

#. Update version numbers and release date information using the ``updateVerson.sh``
script.

.. code-block:: shell
pushd scripts/ && ./updateVersion.sh && popd
#. If this is a major release, search the SUNDIALS code for
Expand Down Expand Up @@ -108,9 +109,9 @@ Release Procedure
The final step (pushing to main) requires temporarily changing the GitHub
repository settings to allow whoever is doing the push an exception in the
``main`` branch protection rules.

.. danger::

Remember to remove this exception to the branch protection rules after making
the push to update ``main``.

Expand Down
3 changes: 3 additions & 0 deletions doc/superbuild/source/developers/source_code/Rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ not adhere to all of these rules.
``sunindextype`` for it. Instead use the appropriate integer type (e.g., ``int64_t``) directly.
Do not use ``sunindextype`` for counters either.

#. Use the print functions, format macros, and output guidelines detailed in
:ref:`Style.Output`.

#. Follow the logging style detailed in :ref:`Style.Logging`.

#. Do not use unsigned integer types except for ``size_t`` when the value you are storing
Expand Down
83 changes: 81 additions & 2 deletions doc/superbuild/source/developers/source_code/Style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,83 @@ doing this type of line break is useful for readability too.
.. See the clang-tidy documentation for more details.
.. _Style.Output:

Output
------

For consistent formatting of :c:type:`sunrealtype`, the following macros are
available.

.. c:macro:: SUN_FORMAT_E
A format specifier for scientific notation. This should be used when
displaying arrays, matrices, and tables where fixed width alignment aids with
readability.

**Example usage:**

.. code-block:: C
for (i = 0; i < N; i++) {
fprintf(outfile, SUN_FORMAT_E "\n", xd[i]);
}
.. c:macro:: SUN_FORMAT_G
A format specifier for scientific or standard notation, whichever is more
compact. It is more reader-friendly than :c:macro:`SUN_FORMAT_E` and should
be used in all cases not covered by that macro.

**Example usage:**

.. code-block:: C
SUNLogInfo(sunctx->logger, "label", "x = " SUN_FORMAT_G, x);
.. c:macro:: SUN_FORMAT_SG
Like :c:macro:`SUN_FORMAT_G` but with a leading plus or minus sign.


To aid in printing statistics in functions like :c:func:`CVodePrintAllStats`,
the following utility functions are available.

.. c:function:: void sunfprintf_real(FILE* fp, SUNOutputFormat fmt, sunbooleantype start, const char* name, sunrealtype value)
Writes a :c:type:`sunrealtype` value to a file pointer using the specified
format.
:param fp: The output file pointer.
:param fmt: The output format.
:param start: :c:macro:`SUNTRUE` if the value is the first in a series of
statistics, and :c:macro:`SUNFALSE` otherwise.
:param name: The name of the statistic.
:param value: The value of the statistic.
.. c:function:: void sunfprintf_long(FILE* fp, SUNOutputFormat fmt, sunbooleantype start, const char* name, long value)
Writes a long value to a file pointer using the specified format.
:param fp: The output file pointer.
:param fmt: The output format.
:param start: :c:macro:`SUNTRUE` if the value is the first in a series of
statistics, and :c:macro:`SUNFALSE` otherwise.
:param name: The name of the statistic.
:param value: The value of the statistic.
.. c:function:: void sunfprintf_long_array(FILE* fp, SUNOutputFormat fmt, sunbooleantype start, const char* name, long* value, size_t count)
Writes an array of long values to a file pointer using the specified format.
:param fp: The output file pointer.
:param fmt: The output format.
:param start: :c:macro:`SUNTRUE` if the value is the first in a series of
statistics, and :c:macro:`SUNFALSE` otherwise.
:param name: The name of the statistic.
:param value: Pointer to the array.
:param count: The number of elements in the array.
.. _Style.Logging:
Logging
Expand All @@ -128,10 +205,12 @@ equals sign with a space on either side e.g.,
.. code-block:: C
/* log an informational message */
SUNLogInfo(sunctx->logger, "begin-step", "t = %g, h = %g", t, h);
SUNLogInfo(sunctx->logger, "begin-step", "t = " SUN_FORMAT_G ", h = " SUN_FORMAT_G, t, h);
/* log a debugging message */
SUNLogDebug(sunctx->logger, "error-estimates", "eqm1 = %g, eq = %g, eqp1 = %g", eqm1, eq, eqp1);
SUNLogDebug(sunctx->logger, "error-estimates",
"eqm1 = " SUN_FORMAT_G ", eq = " SUN_FORMAT_G ", eqp1 = " SUN_FORMAT_G,
eqm1, eq, eqp1);
or the name of a vector/array followed by ``(:) =`` with each vector/array entry
written to a separate line e.g., a vector may be logged with
Expand Down
6 changes: 3 additions & 3 deletions examples/arkode/CXX_manyvector/ark_sod_lsrk.out
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Accuracy limited steps = 397
Error test fails = 15
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 1.122284259749542e-14
Last step size = 0.0002334416078592081
Current step size = 0.0002334416078592081
Initial step size = 1.12228425974954e-14
Last step size = 0.000233441607859208
Current step size = 0.000233441607859208
RHS fn evals = 3957
Number of stages used = 10
34 changes: 17 additions & 17 deletions examples/arkode/CXX_parallel/ark_heat2D_lsrk_p_--np_2_2.out
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@
-----------------------------------------------------------------------

Final integrator statistics:
Current time = 1
Steps = 617
Step attempts = 617
Stability limited steps = 0
Accuracy limited steps = 617
Error test fails = 0
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.877680248425019e-06
Last step size = 0.0003228665778641779
Current step size = 0.0003228665778641779
RHS fn evals = 17225
Number of dom_eig updates = 25
Max. num. of stages used = 46
Max. num. of stages allowed = 1000
Max. spectral radius = 320695.2
Min. spectral radius = 320695.2
Current time = 1
Steps = 617
Step attempts = 617
Stability limited steps = 0
Accuracy limited steps = 617
Error test fails = 0
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.87768024842502e-06
Last step size = 0.000322866577864178
Current step size = 0.000322866577864178
RHS fn evals = 17225
Number of dom_eig updates = 25
Max. num. of stages used = 46
Max. num. of stages allowed = 1000
Max. spectral radius = 320695.2
Min. spectral radius = 320695.2
Max error = 8.279696807845793e-04
34 changes: 17 additions & 17 deletions examples/arkode/CXX_serial/ark_heat2D_lsrk.out
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@
-----------------------------------------------------------------------

Final integrator statistics:
Current time = 1
Steps = 617
Step attempts = 617
Stability limited steps = 0
Accuracy limited steps = 617
Error test fails = 0
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.877680248425025e-06
Last step size = 0.0003199001977636226
Current step size = 0.0003199001977636226
RHS fn evals = 17225
Number of dom_eig updates = 25
Max. num. of stages used = 46
Max. num. of stages allowed = 1000
Max. spectral radius = 320695.2
Min. spectral radius = 320695.2
Current time = 1
Steps = 617
Step attempts = 617
Stability limited steps = 0
Accuracy limited steps = 617
Error test fails = 0
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.87768024842502e-06
Last step size = 0.000319900197763623
Current step size = 0.000319900197763623
RHS fn evals = 17225
Number of dom_eig updates = 25
Max. num. of stages used = 46
Max. num. of stages allowed = 1000
Max. spectral radius = 320695.2
Min. spectral radius = 320695.2
Max error = 8.279696748304533e-04
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Error test fails = 0
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 0.06
Last step size = 0.03999999999999956
Last step size = 0.0399999999999996
Current step size = 0.06
Partition 0 evolves = 17
Partition 1 evolves = 17
Partition 2 evolves = 17
Partition 3 evolves = 17

Advection Stepper Statistics:
Current time = 1
Expand All @@ -52,9 +52,9 @@ Accuracy limited steps = 64
Error test fails = 9
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.059355438929501e-06
Last step size = 0.004032057223863014
Current step size = 0.004032057223863014
Initial step size = 2.0593554389295e-06
Last step size = 0.00403205722386301
Current step size = 0.00403205722386301
RHS fn evals = 185

Diffusion Stepper Statistics:
Expand All @@ -66,14 +66,14 @@ Accuracy limited steps = 302
Error test fails = 55
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 2.059355438929501e-06
Last step size = 0.006555275857754277
Current step size = 0.006555275857754277
Initial step size = 2.0593554389295e-06
Last step size = 0.00655527585775428
Current step size = 0.00655527585775428
Explicit RHS fn evals = 0
Implicit RHS fn evals = 1831
NLS iters = 906
NLS fails = 0
NLS iters per step = 3.668016194331984
NLS iters per step = 3.66801619433198
LS setups = 213
Jac fn evals = 72
LS RHS fn evals = 0
Expand All @@ -84,7 +84,7 @@ LS fails = 0
Jac-times setups = 0
Jac-times evals = 0
LS iters per NLS iter = 0
Jac evals per NLS iter = 0.07947019867549669
Jac evals per NLS iter = 0.0794701986754967
Prec evals per NLS iter = 0

Reaction Stepper Statistics:
Expand All @@ -97,6 +97,6 @@ Error test fails = 7
NLS step fails = 0
Inequality constraint fails = 0
Initial step size = 0.00180442856879795
Last step size = 0.03999999999999956
Current step size = 0.03999999999999956
Last step size = 0.0399999999999996
Current step size = 0.0399999999999996
RHS fn evals = 166
Loading

0 comments on commit b1148e4

Please sign in to comment.