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

Add findBLAS support to CMakeLists.txt #844

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Fix typos
  • Loading branch information
zoziha committed Jul 17, 2024
commit 58074c794f68aa4edd18e84707a2e361bac04b3f
12 changes: 6 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ jobs:
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

# Build and test with built-in BLAS and LAPACK
- name: Configure with CMake
if: ${{ contains(matrix.build, 'cmake') }}
@@ -138,22 +138,22 @@ jobs:
-DCMAKE_MAXIMUM_RANK:String=4
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
-DFIND_BLAS:STRING=TRUE
-S . -B build_mkl
-S . -B ${{ env.BUILD_DIR }}

- name: Build and compile with MKL
run: cmake --build build_mkl --parallel
run: cmake --build ${{ env.BUILD_DIR }} --parallel

- name: catch build fail with MKL
if: failure()
run: cmake --build build_mkl --verbose --parallel 1
run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1

- name: test with MKL
run: >-
ctest
--test-dir build_mkl
--test-dir ${{ env.BUILD_DIR }}
--parallel
--output-on-failure
--no-tests=error

- name: Install project with MKL
run: cmake --install build_mkl
run: cmake --install ${{ env.BUILD_DIR }}
31 changes: 8 additions & 23 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
@@ -121,21 +121,6 @@ jobs:
mingw-w64-${{ matrix.arch }}-ninja
mingw-w64-${{ matrix.arch }}-openblas

- name: Setup msys POSIX environment
uses: msys2/setup-msys2@v2
if: contains(matrix.msystem, 'MSYS')
with:
msystem: MSYS
update: false
install: >-
git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
python
python-pip
cmake
ninja

- name: Install fypp
run: pip install fypp

@@ -144,7 +129,7 @@ jobs:
run: >-
PATH=$PATH:/mingw64/bin/ cmake
-Wdev
-B build_openblas
-B build
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
-DCMAKE_MAXIMUM_RANK:String=4
@@ -154,22 +139,22 @@ jobs:
FC: gfortran
CC: gcc
CXX: g++

- name: CMake build with OpenBLAS
run: PATH=$PATH:/mingw64/bin/ cmake --build build_openblas --parallel
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel

- name: catch build fail
if: failure()
run: PATH=$PATH:/mingw64/bin/ cmake --build build_openblas --verbose --parallel 1
run: PATH=$PATH:/mingw64/bin/ cmake --build build --verbose --parallel 1

- name: CTest with OpenBLAS
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build_openblas --output-on-failure --parallel -V -LE quadruple_precision
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision

- uses: actions/upload-artifact@v1
if: failure()
with:
name: WindowsCMakeTestlog_openblas
path: build_openblas/Testing/Temporary/LastTest.log
path: build/Testing/Temporary/LastTest.log

- name: Install project with OpenBLAS
run: PATH=$PATH:/mingw64/bin/ cmake --install build_openblas
run: PATH=$PATH:/mingw64/bin/ cmake --install build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ Important options are
- `-DBUILD_TESTING` set to `off` in case you want to disable the stdlib tests (default: `on`).
- `-DCMAKE_VERBOSE_MAKEFILE` is by default set to `Off`, but if set to `On` will show commands used to compile the code.
- `-DCMAKE_BUILD_TYPE` is by default set to `RelWithDebInfo`, which uses compiler flags suitable for code development (but with only `-O2` optimization). Beware the compiler flags set this way will override any compiler flags specified via `FFLAGS`. To prevent this, use `-DCMAKE_BUILD_TYPE=NoConfig` in conjunction with `FFLAGS`.
- `-DFIND_BLAS` set to `off` in case you want to disable finding the extlib BLAS/LAPACK dependency (default: `on`).
- `-DFIND_BLAS` set to `off` in case you want to disable finding the external BLAS/LAPACK dependency (default: `on`).

For example, to configure a build using the Ninja backend while specifying compiler optimization via `FFLAGS`, generating procedures up to rank 7, installing to your home directory, using the `NoConfig` compiler flags, and printing the compiler commands, use

Loading
Oops, something went wrong.