ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
414 stars 88 forks source link

Update for MKL 2025 #1717

Closed rscohn2 closed 1 week ago

rscohn2 commented 1 month ago

MKL single argument release_matrix_handle was deprecated in 2023 and removed in 2025 https://github.com/ginkgo-project/ginkgo/blob/568a75946d09218e57492da18da552267ab8b3da/dpcpp/matrix/csr_kernels.dp.cpp#L1420

https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-dpcpp/2025-0/oneapi-mkl-sparse-release-matrix-handle.html

We are trying to release oneapi 2025 on Spack, but e4s build is failing: https://github.com/spack/spack/pull/47264 with this error

/tmp/root/spack-stage/spack-stage-ginkgo-1.8.0-bqbygy3vpm73xu5bswwd4eo7ekitjsrm/spack-src/dpcpp/matrix/csr_kernels.dp.cpp:1424:63: error: too few arguments to function call, expected at least 2, have 1
 1424 |         oneapi::mkl::sparse::release_matrix_handle(&mat_handle);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^
/home/software/spack/[padded-to-256-chars]/linux-ubuntu22.04-x86_64_v3/oneapi-2024.2.1/intel-oneapi-mkl-2025.0.0-trzhgb6lg67dxvpj47qoycibohcjnzus/mkl/latest/include/oneapi/mkl/spblas/sparse_structures.hpp:41:1: note: 'release_matrix_handle' declared here
   41 | release_matrix_handle(sycl::queue &queue,
      | ^                     ~~~~~~~~~~~~~~~~~~~
   42 |                       matrix_handle_t *p_spMat,
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~
   43 |                       const std::vector<sycl::event> &dependencies = {});

There might be more deprecation/removal issues. Would it be possible to update Ginkgo?

MarcelKoch commented 1 month ago

This seems easy to fix on our side. I created a PR for that, but we have to wait a bit until our intel CI is running again.

MarcelKoch commented 1 week ago

@rscohn2 the spack issue should now be resolved.

rscohn2 commented 1 week ago

Thanks! @eugeneswalker @piotrsacharuk