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

Try testBLAS with LAPACK #913

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,121 @@ jobs:
echo "Coverage"
cmake --build build --target coverage
bash <(curl -s https://codecov.io/bash) -X gcov

test-blaspp-flag:
runs-on: ubuntu-latest

env:
BUILD_TYPE: Release
FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all"

strategy:
fail-fast: false
matrix:
sharedlib: [ OFF, ON ]
lapackpp: [ OFF ]
optblas: [ OFF, ON ]
optlapack: [ OFF, ON ]
exclude:
- optblas: ON
optlapack: ON

steps:

- name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3

- name: Install the Basics
run: |
sudo apt update
sudo apt install -y cmake gfortran libopenblas-dev

- name: Configure CMake
run: >
cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=OFF
-D LAPACKE:BOOL=OFF
-D BUILD_TESTING:BOOL=OFF
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.sharedlib }}
-D BLAS++:BOOL=ON
-D LAPACK++:BOOL=${{ matrix.lapackpp }}
-D USE_OPTIMIZED_BLAS:BOOL=${{ matrix.optblas }}
-D USE_OPTIMIZED_LAPACK:BOOL=${{ matrix.optlapack }}

- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}

- name: Check dependencies of BLAS++ on BLAS and LAPACK
working-directory: ${{github.workspace}}/build
run: |
configFile="lib/cmake/blaspp/blasppConfig.cmake"
if [[ ${{ matrix.optblas }} == 'ON' || ${{ matrix.optlapack }} == 'ON' ]]; then
if grep -q "openblas" $configFile; then
echo "BLAS++ dependency to openblas is correct."
else
echo "CMake could not find openblas in $configFile:"
cat $configFile
exit 1
fi
else
if grep -q "${{github.workspace}}/build/lib/libblas" $configFile; then
echo "BLAS++ dependency to BLAS is correct."
else
echo "CMake could not find ${{github.workspace}}/build/lib/libblas in $configFile:"
cat $configFile
exit 1
fi
if grep -q "${{github.workspace}}/build/lib/liblapack" $configFile; then
echo "BLAS++ dependency to LAPACK is correct."
else
echo "CMake could not find ${{github.workspace}}/build/lib/liblapack in $configFile:"
cat $configFile
exit 1
fi
fi

- name: Install
run: cmake --build build --target install -j2

run-testBLAS:
runs-on: ubuntu-latest

env:
BUILD_TYPE: Release
FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all"

steps:

- name: Checkout LAPACK
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3

- name: Install the Basics
run: |
sudo apt update
sudo apt install -y cmake gfortran

- name: Configure CMake
run: >
cmake -B build -G Ninja
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
-D CBLAS:BOOL=OFF
-D LAPACKE:BOOL=OFF
-D BUILD_TESTING:BOOL=OFF
-D BLAS++:BOOL=ON
-D RUN_testBLAS:BOOL=ON

- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}

- name: Run testBLAS
working-directory: ${{github.workspace}}/build
run: cmake --build . --target run-testBLAS
Loading
Loading