Skip to content

Commit

Permalink
Merge branch 'develop' into feature/persistent-benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 authored Aug 8, 2023
2 parents b6799b2 + 6241fd7 commit f36dd03
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# SUNDIALS Changelog

## Changes to SUNDIALS in release x.x.x

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

## Changes to SUNDIALS in release 6.6.0

A new time-stepping module, `SPRKStep`, was added to ARKODE. This time-stepper
Expand Down
6 changes: 6 additions & 0 deletions doc/arkode/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ provided with SUNDIALS, or again may utilize a user-supplied module.
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v5.6.0
-----------------

Expand Down
6 changes: 6 additions & 0 deletions doc/cvode/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ implementations.
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v6.6.0
-----------------

Expand Down
6 changes: 6 additions & 0 deletions doc/cvodes/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ Fortran.
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v6.6.0
-----------------

Expand Down
6 changes: 6 additions & 0 deletions doc/ida/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ systems.
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v6.6.0
-----------------

Expand Down
6 changes: 6 additions & 0 deletions doc/idas/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ integrate any final-condition ODE dependent on the solution of the original IVP
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v5.6.0
-----------------

Expand Down
6 changes: 6 additions & 0 deletions doc/kinsol/guide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ applications written in Fortran.
Changes from previous versions
==============================

Changes in vX.X.X
-----------------

Fixed a memory leak when destroying a CUDA, HIP, SYCL, or system SUNMemoryHelper
object.

Changes in v6.6.0
-----------------

Expand Down
3 changes: 2 additions & 1 deletion src/sunmemory/cuda/sundials_cuda_memory.cu
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ int SUNMemoryHelper_Destroy_Cuda(SUNMemoryHelper helper)
{
if (helper)
{
free(helper->content);
if (helper->content) { free(helper->content); }
if (helper->ops) { free(helper->ops); }
free(helper);
}
return 0;
Expand Down
3 changes: 2 additions & 1 deletion src/sunmemory/hip/sundials_hip_memory.hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ int SUNMemoryHelper_Destroy_Hip(SUNMemoryHelper helper)
{
if (helper)
{
free(helper->content);
if (helper->content) { free(helper->content); }
if (helper->ops) { free(helper->ops); }
free(helper);
}
return 0;
Expand Down
3 changes: 2 additions & 1 deletion src/sunmemory/sycl/sundials_sycl_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ int SUNMemoryHelper_Destroy_Sycl(SUNMemoryHelper helper)
{
if (helper)
{
free(helper->content);
if (helper->content) { free(helper->content); }
if (helper->ops) { free(helper->ops); }
free(helper);
}
return 0;
Expand Down
3 changes: 2 additions & 1 deletion src/sunmemory/system/sundials_system_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ int SUNMemoryHelper_Destroy_Sys(SUNMemoryHelper helper)
{
if (helper)
{
free(helper->content);
if (helper->content) { free(helper->content); }
if (helper->ops) { free(helper->ops); }
free(helper);
}
return 0;
Expand Down

0 comments on commit f36dd03

Please sign in to comment.