1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
|
From 41ac62c28fab33cd9ccc1b010c9c215b5f05201b Mon Sep 17 00:00:00 2001
From: Cristian Le <git@lecris.dev>
Date: Mon, 31 Mar 2025 11:03:15 +0200
Subject: [PATCH 1/5] Adjust CI to test for CMake versions
---
.github/workflows/cmake.yml | 19 +++++++++++++++++--
BLACS/INSTALL/CMakeLists.txt | 2 +-
CMakeLists.txt | 2 +-
3 files changed, 19 insertions(+), 4 deletions(-)
Index: scalapack/.github/workflows/cmake.yml
===================================================================
--- scalapack.orig/.github/workflows/cmake.yml 2025-09-28 00:35:54.586884890 +0200
+++ scalapack/.github/workflows/cmake.yml 2025-09-28 00:35:54.583653350 +0200
@@ -2,16 +2,9 @@
on:
push:
- paths-exclude:
- - '.github/workflows/make.yml'
- - '.gitignore'
- - 'README'
- - '**README'
- - 'LICENSE'
- - '**Makefile'
- - 'SLmake.inc.example'
+ branches: [master]
pull_request:
- paths-exclude:
+ paths-ignore:
- '.github/workflows/make.yml'
- '.gitignore'
- 'README'
@@ -20,10 +13,14 @@
- '**Makefile'
- 'SLmake.inc.example'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
env:
CFLAGS: "-Wall -pedantic"
FFLAGS: "-fcheck=all,no-bounds"
- BUILD_TYPE: Release
+ CMAKE_BUILD_TYPE: Release
MPIEXEC_PREFLAGS: "--oversubscribe"
defaults:
@@ -33,15 +30,22 @@
jobs:
build-all:
+ name: >
+ CMake ${{ matrix.cmake }}
runs-on: ubuntu-latest
-
+ strategy:
+ matrix:
+ # CMake versions to test:
+ # - minimum and maximum in the `cmake_minimum_required`
+ # (if needed expand this to add all intermediate values
+ # for *temporary* CI testing)
+ # - latest version
+ cmake: ["3.26", "4.0", latest]
+ fail-fast: false
steps:
- name: Checkout ScaLAPACK
- uses: actions/checkout@v2
-
- - name: Install ninja-build tool
- uses: seanmiddleditch/gha-setup-ninja@v3
+ uses: actions/checkout@v4
- name: Setup MPI
# uses: mpi4py/setup-mpi@v1
@@ -51,29 +55,32 @@
- name: Install BLAS and LAPACK
run: sudo apt -y install libblas-dev liblapack-dev
-
+
+ - name: Setup CMake
+ uses: jwlawson/actions-setup-cmake@v2
+ with:
+ cmake-version: ${{ matrix.cmake }}
+
- name: CMake configuration
+ # TODO: Use cmake presets for newer versions
+ # TODO: Simplify the defaults to not require configuration
run: >
- cmake -B build
- -G Ninja
- -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/scalapack_install
- -D BUILD_SHARED_LIBS=ON
- -D SCALAPACK_BUILD_TESTS=ON
- -D MPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
-
+ cmake -B build \
+ -G Ninja \
+ -DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DSCALAPACK_BUILD_TESTS=ON \
+ -DMPIEXEC_PREFLAGS=${{env.MPIEXEC_PREFLAGS}}
+
- name: Build
- working-directory: ${{github.workspace}}/build
- run: |
- ctest -D ExperimentalStart
- ctest -D ExperimentalConfigure
- ctest -D ExperimentalBuild
+ run: >
+ cmake --build build
- name: Test
+ # CMake<3.20 does not have -B option
working-directory: ${{github.workspace}}/build
- run: |
- ctest -D ExperimentalTest --schedule-random --output-on-failure --timeout 180
- ctest -D ExperimentalSubmit
-
+ run: >
+ ctest --output-on-failure
+
- name: Install
- run: cmake --build build --target install
+ run: cmake --install build --prefix scalapack_install
Index: scalapack/BLACS/INSTALL/CMakeLists.txt
===================================================================
--- scalapack.orig/BLACS/INSTALL/CMakeLists.txt 2025-09-28 00:35:54.586884890 +0200
+++ scalapack/BLACS/INSTALL/CMakeLists.txt 2025-09-28 00:35:54.583810331 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.26...4.0)
project(INSTALL C Fortran)
add_executable(xintface Fintface.f Cintface.c)
Index: scalapack/CMakeLists.txt
===================================================================
--- scalapack.orig/CMakeLists.txt 2025-09-28 00:35:54.586884890 +0200
+++ scalapack/CMakeLists.txt 2025-09-28 00:35:54.584012727 +0200
@@ -1,14 +1,7 @@
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.26...4.0)
project(SCALAPACK VERSION 2.2.1 LANGUAGES C Fortran)
-# Configure the warning and code coverage suppression file
-configure_file(
- "${SCALAPACK_SOURCE_DIR}/CMAKE/CTestCustom.cmake.in"
- "${SCALAPACK_BINARY_DIR}/CTestCustom.cmake"
- COPYONLY
-)
-
# Add the CMake directory for custon CMake modules
set(CMAKE_MODULE_PATH "${SCALAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})
@@ -91,8 +84,6 @@
SET(DART_TESTING_TIMEOUT 600)
enable_testing()
-include(CTest)
-enable_testing()
# --------------------------------------------------
# Organize output files. On Windows this also keeps .dll files next
Index: scalapack/CMAKE/CTestCustom.cmake.in
===================================================================
--- scalapack.orig/CMAKE/CTestCustom.cmake.in 2025-09-28 00:35:54.586884890 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,42 +0,0 @@
-#
-# For further details regarding this file,
-# see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
-#
-
-SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0)
-SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0)
-SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 500)
-SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 500)
-
-# Files to explicitly exclude from code coverage
-SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
- ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
-
- # Exclude the testing code itself from code coverage
- "/TESTING/"
-)
-
-# Warnings to explicitly ignore
-SET(CTEST_CUSTOM_WARNING_EXCEPTION
- ${CTEST_CUSTOM_WARNING_EXCEPTION}
-
- # Common warning when linking ATLAS built with GNU Fortran 4.1 and building
- # with GNU Fortran 4.4. It can be safely ignored.
- "libgfortran.*may conflict with libgfortran"
-
- # Harmless warning often seen on IRIX
- "WARNING 84 : .*libm.* is not used for resolving any symbol"
-
- # Warnings caused by sun compilers when building code to only run on your
- # native platform
- "xarch=native on this architecture implies -xarch=.*which generates code that does not run"
-
- # Harmless warnings from the Intel compiler on Windows
- "ipo: warning #11010: file format not recognized for .*\\.exe\\.embed\\.manifest\\.res"
- "LINK : warning LNK4224: /INCREMENTAL:YES is no longer supported; ignored"
-
- # Warnings caused by string truncation in the test code. The truncation is
- # intentional
- "Character string truncated to length 1 on assignment"
-)
-
Index: scalapack/CTestConfig.cmake
===================================================================
--- scalapack.orig/CTestConfig.cmake 2025-09-28 00:35:54.586884890 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-## This file should be placed in the root directory of your project.
-## Then modify the CMakeLists.txt file in the root directory of your
-## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
-## ENABLE_TESTING()
-## INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "ScaLAPACK")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
-
-set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "icl.cs.utk.edu/cdash")
-set(CTEST_DROP_LOCATION "/submit.php?project=ScaLAPACK")
-set(CTEST_DROP_SITE_CDASH TRUE)
Index: scalapack/.github/workflows/make.yml
===================================================================
--- scalapack.orig/.github/workflows/make.yml 2025-09-28 00:35:54.586884890 +0200
+++ scalapack/.github/workflows/make.yml 2025-09-28 00:35:54.583217572 +0200
@@ -2,16 +2,9 @@
on:
push:
- paths-exclude:
- - '.github/workflows/cmake.yml'
- - '.gitignore'
- - 'README'
- - '**README'
- - 'LICENSE'
- - 'CMAKE**'
- - '**CMakeLists.txt'
+ branches: [master]
pull_request:
- paths-exclude:
+ paths-ignore:
- '.github/workflows/cmake.yml'
- '.gitignore'
- 'README'
@@ -20,6 +13,10 @@
- 'CMAKE**'
- '**CMakeLists.txt'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
defaults:
run:
shell: bash
|