Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .github/workflows/difflapack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:

env:
FC: gfortran
FFLAGS: -O2 -g

steps:
- name: Checkout repository
Expand Down Expand Up @@ -61,7 +60,6 @@ jobs:
working-directory: LAPACK
run: |
set -euo pipefail
make "${{ matrix.mode }}"
chmod +x runscript.sh
./runscript.sh test --mode "${{ matrix.mode }}" \
-c gfortran -l "$LAPACKDIR" \
Expand Down
138 changes: 34 additions & 104 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,14 @@ on:
pull_request:

jobs:
run-mode:
name: "Mode ${{ matrix.mode_name }}"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- mode_name: forward
mode_option: -d
- mode_name: reverse
mode_option: -b
- mode_name: vector-forward
mode_option: -dv
- mode_name: vector-reverse
mode_option: -bv

build:
name: Ubuntu / gfortran / static
runs-on: ubuntu-latest
timeout-minutes: 60

env:
FC: gfortran

steps:
- name: Check out difflapack
uses: actions/checkout@v4
Expand All @@ -37,41 +23,37 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y gfortran make ninja-build
pip install meson

- name: Clone BLAS / LAPACK
run: |
git clone https://github.com/Reference-LAPACK/lapack.git
cd lapack
git checkout v3.12.1
echo "LAPACKDIR=$PWD" >> $GITHUB_ENV

- name: Compile BLAS / LAPACK
- name: Clone and build Reference-LAPACK
run: |
cd $LAPACKDIR
mkdir build && cd build
cmake .. \
-DCBLAS=ON \
-DLAPACKE=ON \
-DCMAKE_INSTALL_PREFIX=$LAPACKDIR \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_INDEX64_EXT_API=OFF \
-DTEST_FORTRAN_COMPILER=OFF \
-DLAPACKE_WITH_TMG=OFF
make -j$(nproc)
make install
cp $LAPACKDIR/lib/libblas.a $LAPACKDIR/librefblas.a
cp $LAPACKDIR/lib/libcblas.a $LAPACKDIR/librefcblas.a
cp $LAPACKDIR/lib/liblapack.a $LAPACKDIR/libreflapack.a
cp $LAPACKDIR/lib/liblapacke.a $LAPACKDIR/libreflapacke.a
set -euo pipefail
git clone --depth 1 --branch v3.12.1 https://github.com/Reference-LAPACK/lapack.git "$GITHUB_WORKSPACE/lapack"
cd "$GITHUB_WORKSPACE/lapack"
cmake -S . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/lapack" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DCBLAS=OFF \
-DLAPACKE=OFF \
-DLAPACKE_WITH_TMG=OFF \
-DTEST_FORTRAN_COMPILER=OFF
cmake --build build
cmake --install build
cp -f "$GITHUB_WORKSPACE/lapack/lib/liblapack.a" "$GITHUB_WORKSPACE/lapack/liblapack.a"
cp -f "$GITHUB_WORKSPACE/lapack/lib/libblas.a" "$GITHUB_WORKSPACE/lapack/librefblas.a"
echo "LAPACKDIR=$GITHUB_WORKSPACE/lapack" >> "$GITHUB_ENV"

- name: Meson setup
run: |
meson setup builddir --buildtype=debug \
--prefix="$(pwd)" \
meson setup builddir \
-Ddefault_library=static \
-Dlapackdir="$LAPACKDIR" \
-Dtests=false
-Dlibblas=refblas \
"-Dlibblas_path=[\"$LAPACKDIR\"]" \
"-Dliblapack_path=[\"$LAPACKDIR\"]" \
-Dtests=true

- name: Meson compile
run: meson compile -C builddir
Expand All @@ -83,64 +65,12 @@ jobs:
name: meson-log
path: builddir/meson-logs/

- name: Build tests for mode ${{ matrix.mode_name }}
run: |
cd LAPACK
make ${{ matrix.mode_name }}
- name: Run tests
run: meson test -C builddir --suite lapack --timeout-multiplier 2 --print-errorlogs

- name: Run tests for mode ${{ matrix.mode_name }}
run: |
cd LAPACK
chmod +x run_tests.sh
./run_tests.sh ${{ matrix.mode_option }}

- name: Dashboard for mode ${{ matrix.mode_name }}
run: |
cd LAPACK
chmod +x dashboard.sh
./dashboard.sh ${{ matrix.mode_option }}

- name: Upload results
- name: Upload test log
if: always()
uses: actions/upload-artifact@v4
with:
name: results-${{ matrix.mode_name }}
path: LAPACK/results-${{ matrix.mode_name }}.log

dashboard-summary:
name: "Dashboard"
needs: run-mode
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: results-forward
path: results/
- uses: actions/download-artifact@v4
with:
name: results-vector-forward
path: results/
- uses: actions/download-artifact@v4
with:
name: results-reverse
path: results/
- uses: actions/download-artifact@v4
with:
name: results-vector-reverse
path: results/

- name: Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1"
arch: x64

- name: Run Julia dashboard
run: julia ./.github/julia/make_dashboard.jl

- name: Display dashboard
run: |
echo "### Dashboard" >> $GITHUB_STEP_SUMMARY
cat dashboard.md >> $GITHUB_STEP_SUMMARY
name: meson-test-log
path: builddir/meson-logs/testlog.txt
6 changes: 3 additions & 3 deletions LAPACK/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ FFLAGS ?= -O2 -g -fPIC
# -Wline-truncation (fatal if warnings are promoted, e.g. -Werror). Intel uses
# different options; only append for gfortran.
ifeq ($(findstring gfortran,$(FC)),gfortran)
FFLAGS += -ffree-line-length-none
override FFLAGS += -ffree-line-length-none
endif
# Module search path (test_precheck_common.mod from precheck_common.f90 lives in $(BUILD)/)
FFLAGS += -I$(BUILD)
# Module search path — override so -Ibuild survives when FFLAGS is set on the command line
override FFLAGS += -I$(BUILD)
LDFLAGS ?= -L/usr/lib64
LDLIBS ?= -lm -lpthread

Expand Down
Loading
Loading