From eacfa2b5e015c599c6b280c494809571f9421a6c Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Sat, 11 May 2024 09:07:48 -0500 Subject: [PATCH 1/7] pr testing --- .github/workflows/pr.yml | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..ba1c7abcb --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,57 @@ +name: "PR Tests" +permissions: read-all + +# Trigger for PR an merge to develop branch +on: + push: + branches: develop + pull_request: + workflow_dispatch: + +env: + CTEST_OUTPUT_ON_FAILURE: 1 + LAPACK_VERSION: 3.12.0 + PARALLEL: -j 2 + +jobs: + mkl: + runs-on: ubuntu-latest + # One runner for each domain + strategy: + matrix: + domain: [blas, dft, lapack, rng] + steps: + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 + - name: Restore netlib from cache + id: cache-lapack + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + with: + path: lapack/install + key: lapack-${{ env.LAPACK_VERSION }} + - name: Install netlib + if: steps.cache-lapack.outputs.cache-hit != 'true' + run: | + curl -sL https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz | tar zx + SHARED_OPT="lapack-${LAPACK_VERSION} -DBUILD_SHARED_LIBS=on -DCBLAS=on -DLAPACKE=on -DCMAKE_INSTALL_PREFIX=${PWD}/lapack/install" + # 32 bit int + cmake ${SHARED_OPT} -B lapack/build32 + cmake --build lapack/build32 ${PARALLEL} --target install + # 64 bit int + cmake ${SHARED_OPT} -DBUILD_INDEX64=on -B lapack/build64 + cmake --build lapack/build64 ${PARALLEL} --target install + - name: Install oneapi + uses: rscohn2/setup-oneapi@2ad0cf6b74bc2426bdcee825cf88f9db719dd727 # v0.1.0 + with: + components: | + icx@2024.1.0 + mkl@2024.1.0 + - name: Configure/Build for a domain + run: | + source /opt/intel/oneapi/setvars.sh + cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DTARGET_DOMAINS=${{ matrix.domain }} -B build + cmake --build build ${PARALLEL} + - name: Run tests + run: | + source /opt/intel/oneapi/setvars.sh + # Run tests, skip GPU tests + ctest --test-dir build ${PARALLEL} -E 'gpu$' From 9d502410f9d70cb83fccfe64e2376f47f0a1b7ec Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Mon, 13 May 2024 07:16:29 -0500 Subject: [PATCH 2/7] add cpu to job name --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ba1c7abcb..044bdef5a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,6 +20,7 @@ jobs: strategy: matrix: domain: [blas, dft, lapack, rng] + name: MKL ${{ matrix.domain }} CPU steps: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Restore netlib from cache From ffcfe27c3b18459e34b848897b88770afdd24dcc Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Mon, 13 May 2024 07:21:19 -0500 Subject: [PATCH 3/7] use intel runners to avoid 20 runner limit for github provided runners --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 044bdef5a..7cbaf421f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,7 @@ env: jobs: mkl: - runs-on: ubuntu-latest + runs-on: intel-ubuntu-latest # One runner for each domain strategy: matrix: From ff0fa9005f51c294a9f04cb273eeec721a4d016a Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Tue, 14 May 2024 06:46:20 -0500 Subject: [PATCH 4/7] ubuntu-latest runners are faster, but there are more intel-ubuntu-latest runner available --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7cbaf421f..37bd55102 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,7 @@ env: jobs: mkl: - runs-on: intel-ubuntu-latest + runs-on: [ubuntu-latest, intel-ubuntu-latest] # One runner for each domain strategy: matrix: From 3051c03fb4850ef9d0496d8c9687d7d08a4cd1dc Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Tue, 14 May 2024 13:13:40 -0500 Subject: [PATCH 5/7] github does not support runs-on targetting multiple labels --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 37bd55102..7cbaf421f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,7 @@ env: jobs: mkl: - runs-on: [ubuntu-latest, intel-ubuntu-latest] + runs-on: intel-ubuntu-latest # One runner for each domain strategy: matrix: From a32e30e4bd95d4e35ca0388fc44c246edc499fde Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Tue, 14 May 2024 14:17:23 -0500 Subject: [PATCH 6/7] disable gpu and ct tests in pr testing --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7cbaf421f..c90947b3a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -49,10 +49,10 @@ jobs: - name: Configure/Build for a domain run: | source /opt/intel/oneapi/setvars.sh - cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DTARGET_DOMAINS=${{ matrix.domain }} -B build + cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DENABLE_MKLGPU_BACKEND=off -DTARGET_DOMAINS=${{ matrix.domain }} -B build cmake --build build ${PARALLEL} - name: Run tests run: | source /opt/intel/oneapi/setvars.sh # Run tests, skip GPU tests - ctest --test-dir build ${PARALLEL} -E 'gpu$' + ctest --test-dir build ${PARALLEL} -E 'ct$' From 1acabc998140c225e95258a531f829a0f8c434a1 Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Thu, 16 May 2024 08:14:10 -0400 Subject: [PATCH 7/7] Apply suggestions from code review verbose logging and serial test execution for more readable logs. build time dominates so parallel test is less important. Co-authored-by: Dai-Ni Hsieh --- .github/workflows/pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c90947b3a..072ee836c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -49,10 +49,10 @@ jobs: - name: Configure/Build for a domain run: | source /opt/intel/oneapi/setvars.sh - cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DENABLE_MKLGPU_BACKEND=off -DTARGET_DOMAINS=${{ matrix.domain }} -B build + cmake -DREF_BLAS_ROOT=${PWD}/lapack/install -DREF_LAPACK_ROOT=${PWD}/lapack/install -DENABLE_MKLGPU_BACKEND=off -DTARGET_DOMAINS=${{ matrix.domain }} -DCMAKE_VERBOSE_MAKEFILE=on -B build cmake --build build ${PARALLEL} - name: Run tests run: | source /opt/intel/oneapi/setvars.sh # Run tests, skip GPU tests - ctest --test-dir build ${PARALLEL} -E 'ct$' + ctest --test-dir build -j 1 -E 'ct$'