Skip to content

Select precision#157

Merged
langou merged 2 commits into
Reference-ScaLAPACK:masterfrom
scivision:select-precision
Mar 26, 2026
Merged

Select precision#157
langou merged 2 commits into
Reference-ScaLAPACK:masterfrom
scivision:select-precision

Conversation

@scivision
Copy link
Copy Markdown
Contributor

Others picked off good pieces from #77 now merged into Scalapack.
The final and critical piece is in this PR - the ability to select any combination of precisions to save build time and binary size.

This idea is based off of https://github.com/scivision/scalapack, which has been used for several years across HPC and all types of computing platforms.

The variable names are the same as in LAPACK.

Copilot AI review requested due to automatic review settings March 26, 2026 06:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CMake-level “precision selection” so ScaLAPACK (and its BLACS/PBLAS/tools/tests) can be built for only selected precisions (single/double/complex/complex16) to reduce build time and binary size.

Changes:

  • Introduces top-level CMake options (BUILD_SINGLE, BUILD_DOUBLE, BUILD_COMPLEX, BUILD_COMPLEX16) and uses them throughout the build to conditionally include sources.
  • Updates multiple component CMakeLists (TOOLS, SRC, PBLAS, REDIST, traditional tests) to only build targets for enabled precisions.
  • Extends CI with a “select-precision” job intended to exercise different precision combinations.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
CMakeLists.txt Adds precision selection options; switches to add_compile_definitions.
TOOLS/LAPACK/CMakeLists.txt Builds LAPACK helper/matgen sources conditionally by precision.
TOOLS/CMakeLists.txt Builds TOOLS Fortran/C sources conditionally by precision.
SRC/CMakeLists.txt Splits common vs per-precision sources (and C helpers) for conditional builds.
PBLAS/CMakeLists.txt Uses if(SCALAPACK_BUILD_TESTS) style and keeps test subdirs gated.
PBLAS/SRC/CMakeLists.txt Builds PBLAS sources conditionally by precision.
PBLAS/SRC/PBBLAS/CMakeLists.txt Builds PBblas aux sources conditionally by precision.
PBLAS/SRC/PTZBLAS/CMakeLists.txt Builds PTZBLAS sources conditionally; includes mixed-precision helpers.
PBLAS/SRC/PTOOLS/CMakeLists.txt Builds PTOOLS C sources conditionally by precision.
PBLAS/TESTING/CMakeLists.txt Only builds/ctests PBLAS tests for enabled precisions.
PBLAS/TIMING/CMakeLists.txt Only builds/ctests PBLAS timing targets for enabled precisions.
BLACS/CMakeLists.txt Uses if(SCALAPACK_BUILD_TESTS) style and keeps test subdirs gated.
BLACS/SRC/CMakeLists.txt Attempts to conditionally build BLACS comm/internal sources by precision.
BLACS/TESTING/CMakeLists.txt Skips BLACS testing unless all precisions are enabled.
REDIST/CMakeLists.txt Uses if(SCALAPACK_BUILD_TESTS) style and gates testing subdir.
REDIST/SRC/CMakeLists.txt Builds REDIST sources conditionally by precision.
REDIST/TESTING/CMakeLists.txt Builds REDIST test executables conditionally by precision.
TESTING/traditional/LIN/CMakeLists.txt Builds traditional LIN test executables conditionally by precision.
TESTING/traditional/EIG/CMakeLists.txt Builds traditional EIG test executables conditionally by precision.
.github/workflows/cmake.yml Adds a CI matrix job intended to test different precision selections.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread BLACS/SRC/CMakeLists.txt
Comment thread BLACS/SRC/CMakeLists.txt Outdated
Comment thread .github/workflows/cmake.yml Outdated
Comment thread CMakeLists.txt Outdated
Comment thread TESTING/traditional/EIG/CMakeLists.txt Outdated
Comment thread TESTING/traditional/EIG/CMakeLists.txt Outdated
@scivision scivision force-pushed the select-precision branch 3 times, most recently from a0d89f5 to beac67b Compare March 26, 2026 08:43
@langou langou merged commit 8ea5880 into Reference-ScaLAPACK:master Mar 26, 2026
11 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.

3 participants