Skip to content

Support of BLAS helpers#75

Merged
jvdp1 merged 11 commits into
masterfrom
mkl_sparse
Jul 3, 2026
Merged

Support of BLAS helpers#75
jvdp1 merged 11 commits into
masterfrom
mkl_sparse

Conversation

@jvdp1

@jvdp1 jvdp1 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_helpers with csrsymv, csrmv, csrmm, and csrtrsv helper routines.
  • Wraps MKL sparse BLAS calls in modsparse_crs.f90 with #if _MKL_SPARSE and calls the new helpers otherwise.
  • Updates Makefile/CMake build lists and adds a configurable _MKL_SPARSE definition.

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.

Comment thread src/modsparse_helpers.f90
Comment thread src/modsparse_helpers.f90
Comment thread CMakeLists.txt
Comment on lines +93 to +97
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()
Comment thread CMakeLists.txt
PRIVATE
"-D_DP=1"
"-D_METIS=${WITH_METIS}"
"-D_MKL_SPARSE=${WITH_MKL_SPARSE}"
jvdp1 and others added 5 commits July 3, 2026 20:09
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>
@jvdp1

jvdp1 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@copilot fix the CI for using intel compiler + mkl 2026

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

@copilot fix the CI for using intel compiler + mkl 2026

Fixed in 242ccce by switching the Intel 2026 matrix entry to version: latest while keeping MKL pinned to 2026.1, which avoids the missing legacy compiler package name in setup-fortran and restores the Intel+MKL 2026 CI path.

Copilot finished work on behalf of jvdp1 July 3, 2026 18:24
@jvdp1

jvdp1 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex[agent] review the CI file, and update it to use the latest Intel toolchain

@Codex

Codex AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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:

  • apt.repos.intel.com
    • Triggering command: /usr/bin/curl curl -fsSL REDACTED -dumpbase-ext .c -mtune=generic -march=x86-64 -fopenmp -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@jvdp1

jvdp1 commented Jul 3, 2026

Copy link
Copy Markdown
Owner Author

@codex[agent] the CI for intel toolchain 2026 fails: _MKL_SPARSE should be equal to 1. adjust the CI accordingly

@jvdp1
jvdp1 merged commit 6160263 into master Jul 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants