-
Notifications
You must be signed in to change notification settings - Fork 191
Add findBLAS support to CMakeLists.txt #844
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a203645
Add findBLAS support to CMakeLists.txt
zoziha 6e36e6b
find BLAS, LAPACK
perazz 6862209
add tests
perazz 03590ea
Merge branch 'blas-3' into find_blas_lapack
perazz 5567ab1
Merge pull request #1 from perazz/find_blas_lapack
zoziha 095ee16
Link to OpenBLAS for MINGW64 of MSYS2
zoziha d475595
add FIND_BLAS option
zoziha 434b849
Tests with OpenBLAS on MINGW64 and MKL on Ubuntu
zoziha 0534325
Parallel CI construction to reduce CI time
zoziha 3254fd0
Source MKL PATH
zoziha 90fd5b9
Add support mkl
jvdp1 a690390
test
jvdp1 40765ad
fix test svd (related to signs of singular values)
jvdp1 b867c2b
Update .github/workflows/CI.yml
jvdp1 9de0589
Merge pull request #2 from jvdp1/blas_jv
zoziha 58074c7
Fix typos
zoziha 0ce2372
Merge branch 'master' of github.com:fortran-lang/stdlib
zoziha e4d90b2
CI: split and optimize the BLAS CI process
zoziha 9e80c17
fix(CMakeLists.txt): Correct cppFiles
zoziha dee6979
feat(CMake): Enhance BLAS/LAPACK detection with ILP64 support
zoziha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
name: CI_BLAS | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CTEST_TIME_TIMEOUT: "5" # some failures hang forever | ||
CMAKE_GENERATOR: Ninja | ||
|
||
jobs: | ||
msys2-build: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: [{ msystem: UCRT64, arch: x86_64 }] | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup MinGW native environment | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.msystem }} | ||
update: false | ||
install: >- | ||
git | ||
mingw-w64-ucrt-${{ matrix.arch }}-gcc | ||
mingw-w64-ucrt-${{ matrix.arch }}-gcc-fortran | ||
mingw-w64-ucrt-${{ matrix.arch }}-python | ||
mingw-w64-ucrt-${{ matrix.arch }}-python-fypp | ||
mingw-w64-ucrt-${{ matrix.arch }}-cmake | ||
mingw-w64-ucrt-${{ matrix.arch }}-ninja | ||
mingw-w64-ucrt-${{ matrix.arch }}-openblas | ||
|
||
# Build and test with external BLAS and LAPACK (OpenBLAS on UCRT64) | ||
- name: Configure with CMake and OpenBLAS | ||
run: >- | ||
PATH=$PATH:/ucrt64/bin/ cmake | ||
-Wdev | ||
-B build | ||
-DCMAKE_BUILD_TYPE=Debug | ||
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace" | ||
-DCMAKE_MAXIMUM_RANK:String=4 | ||
-DCMAKE_INSTALL_PREFIX=$PWD/_dist | ||
-DFIND_BLAS:STRING=TRUE | ||
env: | ||
FC: gfortran | ||
CC: gcc | ||
CXX: g++ | ||
|
||
- name: CMake build with OpenBLAS | ||
run: PATH=$PATH:/ucrt64/bin/ cmake --build build --parallel | ||
|
||
- name: catch build fail | ||
if: failure() | ||
run: PATH=$PATH:/ucrt64/bin/ cmake --build build --verbose --parallel 1 | ||
|
||
- name: CTest with OpenBLAS | ||
run: PATH=$PATH:/ucrt64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: WindowsCMakeTestlog_openblas | ||
path: build/Testing/Temporary/LastTest.log | ||
|
||
- name: Install project with OpenBLAS | ||
run: PATH=$PATH:/ucrt64/bin/ cmake --install build | ||
|
||
Build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: | ||
- { compiler: intel, version: "2024.1" } | ||
build: [cmake] | ||
env: | ||
BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }} | ||
APT_PACKAGES: >- | ||
intel-oneapi-mkl | ||
intel-oneapi-mkl-devel | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc. | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install fypp | ||
run: pip install --upgrade fypp ninja | ||
|
||
- name: Setup Fortran compiler | ||
uses: fortran-lang/setup-fortran@v1.6.1 | ||
id: setup-fortran | ||
with: | ||
compiler: ${{ matrix.toolchain.compiler }} | ||
version: ${{ matrix.toolchain.version }} | ||
|
||
- name: Install Intel oneAPI MKL | ||
run: | | ||
sudo apt-get install ${APT_PACKAGES} | ||
source /opt/intel/oneapi/mkl/latest/env/vars.sh | ||
printenv >> $GITHUB_ENV | ||
|
||
# Build and test with external BLAS and LAPACK (MKL on Ubuntu with Intel compilers) | ||
- name: Configure with CMake and MKL | ||
run: >- | ||
cmake -Wdev -G Ninja | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_MAXIMUM_RANK:String=4 | ||
-DCMAKE_INSTALL_PREFIX=$PWD/_dist | ||
-DFIND_BLAS:STRING=TRUE | ||
-S . -B ${{ env.BUILD_DIR }} | ||
|
||
- name: Build and compile with MKL | ||
run: cmake --build ${{ env.BUILD_DIR }} --parallel | ||
|
||
- name: catch build fail with MKL | ||
if: failure() | ||
run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1 | ||
|
||
- name: test with MKL | ||
run: >- | ||
ctest | ||
--test-dir ${{ env.BUILD_DIR }} | ||
--parallel | ||
--output-on-failure | ||
--no-tests=error | ||
|
||
- name: Install project with MKL | ||
run: cmake --install ${{ env.BUILD_DIR }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.