Update the deprecated MKL sparse API#295
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #295 +/- ##
========================================
Coverage 66.46% 66.46%
========================================
Files 1128 1128
Lines 57844 57844
Branches 4408 4408
========================================
+ Hits 38446 38447 +1
+ Misses 19398 19397 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pmaciel
approved these changes
Jun 7, 2026
pmaciel
left a comment
Member
There was a problem hiding this comment.
I'm very happy with this, it comes at a great time too! Merge away 👍
Member
Author
|
Thank you @pmaciel for the lighting quick review. Just waiting for @simondsmart still. |
simondsmart
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From IntelMKL 2026.0 the used deprecated MKL sparse functions are no longer available. I noticed eckit with MKL does not compile when upgrading to use the most recent intel-oneapi-toolkit, including MKL.
This pull request modernizes and simplifies the MKL-based sparse linear algebra implementation by replacing deprecated MKL routines with their recommended alternatives and introducing robust resource management. The changes improve code safety, maintainability, and compatibility with IntelMKL 2026.0.
Refactoring and modernization:
mkl_dcsrmvandmkl_dcsrmm) with the modernmkl_sparse_d_mvandmkl_sparse_d_mmAPIs in thespmvandspmmmethods ofLinearAlgebraMKL, improving compatibility and maintainability. [1] [2]Resource management and error handling:
MKLSparseHandleRAII helper struct to managesparse_matrix_tlifetimes and ensure proper cleanup, reducing the risk of memory/resource leaks.checkSparseStatus,generalMatrixDescription,createSparseMatrixHandle) for safer error handling and clearer construction of MKL sparse matrix descriptors and handles.### DescriptionContributor Declaration
By opening this pull request, I affirm the following:
🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-295