Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: allow only one or few precisions to be built #77

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
203 changes: 179 additions & 24 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CMake CI

on:
push:
paths-exclude:
paths-ignore:
- '.github/workflows/make.yml'
- '.gitignore'
- 'README'
Expand All @@ -11,7 +11,7 @@ on:
- '**Makefile'
- 'SLmake.inc.example'
pull_request:
paths-exclude:
paths-ignore:
- '.github/workflows/make.yml'
- '.gitignore'
- 'README'
Expand All @@ -23,12 +23,9 @@ on:
env:
CFLAGS: "-Wall -pedantic"
FFLAGS: "-fcheck=all,no-bounds"
BUILD_TYPE: Release
CMAKE_BUILD_TYPE: Release
MPIEXEC_PREFLAGS: "--oversubscribe"

defaults:
run:
shell: bash

jobs:

Expand All @@ -38,42 +35,200 @@ jobs:
steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v2

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v3
uses: actions/checkout@v3

- name: Setup MPI
# uses: mpi4py/setup-mpi@v1
run: |
sudo apt -y update
sudo apt -y install openmpi-bin libopenmpi-dev
sudo apt update
sudo apt install --no-install-recommends openmpi-bin libopenmpi-dev

- name: Setup Ninja
run: sudo apt install --no-install-recommends ninja-build

- name: Install BLAS and LAPACK
run: sudo apt -y install libblas-dev liblapack-dev
run: sudo apt install --no-install-recommends libblas-dev liblapack-dev

- name: CMake 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}}

--install-prefix ${{ github.workspace }}/scalapack_install
-DBUILD_SHARED_LIBS=ON
-DSCALAPACK_BUILD_TESTS=ON
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: |
ctest -D ExperimentalStart
ctest -D ExperimentalConfigure
ctest -D ExperimentalBuild

- name: Test
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: |
ctest -D ExperimentalTest --schedule-random --output-on-failure --timeout 180
ctest -D ExperimentalSubmit


- name: Install
run: cmake --install build


real32:
runs-on: ubuntu-latest

steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v3

- name: Setup MPI
run: |
sudo apt update
sudo apt install --no-install-recommends openmpi-bin libopenmpi-dev

- name: CMake configuration
run: >
cmake -B build
--install-prefix ${{ runner.temp }}
-DBUILD_SINGLE=on -DBUILD_DOUBLE=off -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
run: cmake --build build --parallel

- name: Test
run: ctest --test-dir build --schedule-random --output-on-failure --timeout 180

- name: Install
run: cmake --install build


real64:
runs-on: ubuntu-latest

steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v3

- name: Setup MPI
run: |
sudo apt update
sudo apt install --no-install-recommends openmpi-bin libopenmpi-dev

- name: CMake configuration
run: >
cmake -B build
--install-prefix ${{ runner.temp }}
-DBUILD_SINGLE=off -DBUILD_DOUBLE=on -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
run: cmake --build build --parallel

- name: Test
run: ctest --test-dir build --schedule-random --output-on-failure --timeout 180

- name: Install
run: cmake --install build


complex32:
runs-on: ubuntu-latest

steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v3

- name: Setup MPI
run: |
sudo apt update
sudo apt install --no-install-recommends openmpi-bin libopenmpi-dev

- name: CMake configuration
run: >
cmake -B build
--install-prefix ${{ runner.temp }}
-DBUILD_SINGLE=off -DBUILD_DOUBLE=off -DBUILD_COMPLEX=on -DBUILD_COMPLEX16=off
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
run: cmake --build build --parallel

- name: Test
run: ctest --test-dir build --schedule-random --output-on-failure --timeout 180

- name: Install
run: cmake --install build


complex64:
runs-on: ubuntu-latest

steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v3

- name: Setup MPI
run: |
sudo apt update
sudo apt install --no-install-recommends openmpi-bin libopenmpi-dev

- name: CMake configuration
run: >
cmake -B build
--install-prefix ${{ runner.temp }}
-DBUILD_SINGLE=off -DBUILD_DOUBLE=off -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=on
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
run: cmake --build build --parallel

- name: Test
run: ctest --test-dir build --schedule-random --output-on-failure --timeout 180

- name: Install
run: cmake --install build


macos-real32:
# just testing one precision to save time on MacOS runner
runs-on: macos-latest

env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
FC: gfortran-11

steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v3

- name: Setup MPI, Ninja
run: brew install open-mpi ninja

- name: CMake configuration
run: >
cmake -B build
-G Ninja
--install-prefix ${{ runner.temp }}
-DBUILD_SINGLE=on -DBUILD_DOUBLE=off -DBUILD_COMPLEX=off -DBUILD_COMPLEX16=off
-DMPIEXEC_PREFLAGS=${{ env.MPIEXEC_PREFLAGS }}

- name: Build
run: cmake --build build --parallel

- name: Test
run: >
ctest --test-dir build
--schedule-random --output-on-failure --timeout 180
-E "xssep|xsgsep|xssyevr"
# xssep, xssyevr take too long on CI Runner for MacOS
# xsgsep fails on MacOS only, including on a Mac M1 laptop--needs to be investigated.

- name: Install
run: cmake --build build --target install
run: cmake --install build
13 changes: 6 additions & 7 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ name: Makefile CI

on:
push:
paths-exclude:
paths-ignore:
- '.github/workflows/cmake.yml'
- '.gitignore'
- 'README'
- '**README'
- 'LICENSE'
- 'CMAKE**'
- '**CMakeLists.txt'
- '**.cmake'
pull_request:
paths-exclude:
paths-ignore:
- '.github/workflows/cmake.yml'
- '.gitignore'
- 'README'
- '**README'
- 'LICENSE'
- 'CMAKE**'
- '**CMakeLists.txt'
- '**.cmake'

defaults:
run:
shell: bash

jobs:

Expand All @@ -32,7 +31,7 @@ jobs:
steps:

- name: Checkout ScaLAPACK
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup MPI
uses: mpi4py/setup-mpi@v1
Expand All @@ -42,7 +41,7 @@ jobs:
cp SLmake.inc.example SLmake.inc
make --silent -j lib
make --silent all

- name: Run examples
working-directory: ${{github.workspace}}/EXAMPLE
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
BLACS/INSTALL/cmake_install.cmake
BLACS/INSTALL/Makefile
BLACS/INSTALL/x*
BLACS/INSTALL/*ninja*
TESTING/x*
REDIST/TESTING/x*
PBLAS/TESTING/x*
Expand All @@ -15,4 +16,3 @@ PBLAS/TIMING/PB_Cwarn.c
BLACS/TESTING/xCbtest
BLACS/TESTING/xFbtest
SLmake.inc

3 changes: 2 additions & 1 deletion BLACS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_subdirectory(SRC)
if(${SCALAPACK_BUILD_TESTS})

if(SCALAPACK_BUILD_TESTS)
add_subdirectory(TESTING)
endif()
Loading