From f8176467b4b328df783bdb34baefa528fd8cf2b1 Mon Sep 17 00:00:00 2001 From: Wayne Mitchell Date: Thu, 19 Dec 2024 17:05:29 +0000 Subject: [PATCH 1/2] Wrap assert include with extern C++ --- src/utilities/_hypre_utilities.h | 9 +++++++++ src/utilities/error.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/utilities/_hypre_utilities.h b/src/utilities/_hypre_utilities.h index 250e3b366..8c52b0e7f 100644 --- a/src/utilities/_hypre_utilities.h +++ b/src/utilities/_hypre_utilities.h @@ -645,8 +645,17 @@ HYPRE_Int hypre_ParPrintf(MPI_Comm comm, const char *format, ...); #ifndef hypre_ERROR_HEADER #define hypre_ERROR_HEADER +#ifdef __cplusplus +extern "C++" +{ +#endif + #include +#ifdef __cplusplus +} +#endif + /*-------------------------------------------------------------------------- * Global variable used in hypre error checking *--------------------------------------------------------------------------*/ diff --git a/src/utilities/error.h b/src/utilities/error.h index d686de73d..38dace434 100644 --- a/src/utilities/error.h +++ b/src/utilities/error.h @@ -8,8 +8,17 @@ #ifndef hypre_ERROR_HEADER #define hypre_ERROR_HEADER +#ifdef __cplusplus +extern "C++" +{ +#endif + #include +#ifdef __cplusplus +} +#endif + /*-------------------------------------------------------------------------- * Global variable used in hypre error checking *--------------------------------------------------------------------------*/ From a55ddec0edf96b336e693065ef96235af627987f Mon Sep 17 00:00:00 2001 From: Wayne Mitchell Date: Mon, 6 Jan 2025 16:38:57 +0000 Subject: [PATCH 2/2] Update syntax for release matrix handle --- src/seq_mv/csr_matop_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/seq_mv/csr_matop_device.c b/src/seq_mv/csr_matop_device.c index 10e936c26..31e677791 100644 --- a/src/seq_mv/csr_matop_device.c +++ b/src/seq_mv/csr_matop_device.c @@ -183,7 +183,8 @@ hypre_GpuMatDataDestroy(hypre_GpuMatData *data) HYPRE_ROCSPARSE_CALL( rocsparse_destroy_mat_info(hypre_GpuMatDataMatInfo(data)) ); #elif defined(HYPRE_USING_ONEMKLSPARSE) - HYPRE_ONEMKL_CALL( oneapi::mkl::sparse::release_matrix_handle(&hypre_GpuMatDataMatHandle(data)) ); + HYPRE_ONEMKL_CALL( oneapi::mkl::sparse::release_matrix_handle(*hypre_HandleComputeStream(hypre_handle()), + &hypre_GpuMatDataMatHandle(data)) ); #endif }