Skip to content

Commit a6c83a7

Browse files
committed
Forgot to init matrix handle
1 parent c9d9568 commit a6c83a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Src/LinearSolvers/AMReX_SpMV.H

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ void SpMV (AlgVector<T>& y, SpMatrix<T> const& A, AlgVector<T> const& x)
171171

172172
amrex::ignore_unused(nnz);
173173
mkl::sparse::matrix_handle_t handle{};
174+
mkl::sparse::init_matrix_handle(&handle);
174175

175176
#if defined(INTEL_MKL_VERSION) && (INTEL_MKL_VERSION < 20250300)
176177
mkl::sparse::set_csr_data(Gpu::Device::streamQueue(), handle, nrows, ncols,
@@ -184,6 +185,9 @@ void SpMV (AlgVector<T>& y, SpMatrix<T> const& A, AlgVector<T> const& x)
184185

185186
#endif
186187

188+
auto ev = mkl::sparse::release_matrix_handle(Gpu::Device::streamQueue(), &handle);
189+
ev.wait();
190+
187191
AMREX_GPU_ERROR_CHECK();
188192

189193
#else

0 commit comments

Comments
 (0)