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 } 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 *--------------------------------------------------------------------------*/