Support of BLAS helpers#75
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a pure-Fortran fallback implementation of the MKL “sparse BLAS”-style helper routines (CSR SpMV/SpMM/symmetric SpMV/triangular solve) and wires it into the CRS submodule behind a compile-time _MKL_SPARSE switch, with build-system knobs to enable/disable the MKL sparse path.
Changes:
- Introduces
modsparse_helperswithcsrsymv,csrmv,csrmm, andcsrtrsvhelper routines. - Wraps MKL sparse BLAS calls in
modsparse_crs.f90with#if _MKL_SPARSEand calls the new helpers otherwise. - Updates Makefile/CMake build lists and adds a configurable
_MKL_SPARSEdefinition.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modsparse_helpers.f90 | Adds Fortran implementations of CSR multiply/solve helper routines. |
| src/modsparse_crs.f90 | Adds _MKL_SPARSE guards to switch between MKL sparse BLAS and helper routines. |
| src/Makefile | Adds modsparse_helpers.o to objects and ensures modsparse_crs.o depends on it. |
| src/CMakeLists.txt | Adds modsparse_helpers.f90 to the source list. |
| Makefile | Adds MKL_SPARSE toggle and emits -D_MKL_SPARSE when enabled. |
| CMakeLists.txt | Adds WITH_MKL_SPARSE option and passes it as _MKL_SPARSE compile definition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if(NOT DEFINED CMAKE_MKL_SPARSE) | ||
| set(WITH_MKL_SPARSE 1 CACHE STRING "Support of MKL SPARSE") | ||
| else() | ||
| set(WITH_MKL_SPARSE ${CMAKE_MKL_SPARSE} CACHE STRING "Support of MKL SPARSE") | ||
| endif() |
| PRIVATE | ||
| "-D_DP=1" | ||
| "-D_METIS=${WITH_METIS}" | ||
| "-D_MKL_SPARSE=${WITH_MKL_SPARSE}" |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot fix the CI for using intel compiler + mkl 2026 |
Fixed in |
|
@codex[agent] review the CI file, and update it to use the latest Intel toolchain |
Agent-Logs-Url: https://github.com/jvdp1/libsparse/sessions/7a1e829d-a2a0-4698-9beb-f339832fe678 Co-authored-by: jvdp1 <16455548+jvdp1@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@codex[agent] the CI for intel toolchain 2026 fails: _MKL_SPARSE should be equal to 1. adjust the CI accordingly |
…per toolchain Agent-Logs-Url: https://github.com/jvdp1/libsparse/sessions/5fd3d548-aec0-437b-ad75-a19feac179c3 Co-authored-by: jvdp1 <16455548+jvdp1@users.noreply.github.com>
No description provided.