From 1f3a8df0bbc8fd7124eccd4995b640644b89abf0 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Wed, 8 Nov 2023 15:38:29 +0100 Subject: [PATCH] [actions] in .github/workflows/testsuite, add tests with FPEs (enabled for push/manual, disabled for PRs) Note: the FPE crashes in #783 are not shown here because they need FPTYPE=f builds. I will add those in a more complex workflow with one codegen job and several build/test jobs. --- .github/workflows/testsuite_allprocesses.yml | 2 ++ .github/workflows/testsuite_oneprocess.sh | 11 ++++++++--- .github/workflows/testsuite_oneprocess.yml | 19 +++++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testsuite_allprocesses.yml b/.github/workflows/testsuite_allprocesses.yml index 7eaad09c9f..dbf0fdc4b3 100644 --- a/.github/workflows/testsuite_allprocesses.yml +++ b/.github/workflows/testsuite_allprocesses.yml @@ -37,5 +37,7 @@ jobs: uses: ./.github/workflows/testsuite_oneprocess.yml with: process: ${{ matrix.process }}.${{ matrix.suffix }} + # By default, in allprocesses tests enable FPE tests when pushing, but not in pull requests + enableFPE: ${{ github.event_name != 'pull_request' }} #---------------------------------------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/testsuite_oneprocess.sh b/.github/workflows/testsuite_oneprocess.sh index 639991f1cb..faff0538fe 100755 --- a/.github/workflows/testsuite_oneprocess.sh +++ b/.github/workflows/testsuite_oneprocess.sh @@ -203,8 +203,8 @@ function tput_test() { echo "Testing in $(pwd)" # FIXME1: this is just a quick test, eventually port here tput tests from throughputX.sh # (could move some throughputX.sh functions to a separate script included both here and there) - # FIXME2: enable FPEs - # FIXME3: handle all d/f/m, inl0/1, hrd0/1 etc... + # FIXME2: handle all d/f/m, inl0/1, hrd0/1 etc... + # FIXME3: add fcheck.exe tests unamep=$(uname -p) unames=$(uname -s) for simd in none sse4 avx2 512y 512z; do @@ -233,6 +233,11 @@ function tput_test() { done } +# Tput-test with FPEs enabled +function tput_test_fpe() { + CUDACPP_RUNTIME_ENABLEFPE=1 tput_test $* +} + #---------------------------------------------------------------------------------------------------------------------------------- # Usage @@ -244,7 +249,7 @@ function usage() { #---------------------------------------------------------------------------------------------------------------------------------- # Valid stages -stages="codegen before_build build after_build tput_test" +stages="codegen before_build build after_build tput_test tput_test_fpe" # Check input arguments for astage in $stages; do diff --git a/.github/workflows/testsuite_oneprocess.yml b/.github/workflows/testsuite_oneprocess.yml index 0d0973f210..17dc783b63 100644 --- a/.github/workflows/testsuite_oneprocess.yml +++ b/.github/workflows/testsuite_oneprocess.yml @@ -10,7 +10,7 @@ name: Test one process #---------------------------------------------------------------------------------------------------------------------------------- # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#run-name -run-name: Manually test one process ${{ inputs.process }} +run-name: Manually test one process ${{ inputs.process }} (enableFPE = ${{ inputs.enableFPE }}) #---------------------------------------------------------------------------------------------------------------------------------- @@ -23,19 +23,26 @@ on: process: # this variable is provided by the matrix in testsuite_allprocesses.yml required: true type: string + enableFPE: + required: true + type: boolean # Manually trigger the one-process workflow # (the lines below are adapted rom the default github manual workflow example) workflow_dispatch: inputs: process: - description: 'Physics process' + description: 'physics process' default: 'gg_tt.mad' required: true - ###type: string type: choice # FIXME? Can the list of supported processes be specified only once in oneprocess.yml or allprocesses.yml? - options: [gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, ee_mumu.mad] + options: [ee_mumu.mad, gg_tt.mad, gg_ttg.mad, gg_ttgg.mad, gg_ttggg.mad, gg_tt01g.mad, gq_ttq.mad, pp_tt012j.mad] + enableFPE: + description: 'enable FPE tests?' + default: true + required: true + type: boolean #---------------------------------------------------------------------------------------------------------------------------------- @@ -134,6 +141,10 @@ jobs: - name: tput_test run: .github/workflows/testsuite_oneprocess.sh tput_test ${{ inputs.process }} + - name: tput_test_fpe + run: .github/workflows/testsuite_oneprocess.sh tput_test_fpe ${{ inputs.process }} + if: ${{ inputs.enableFPE }} + - name: GOODBYE run: | echo "GOODBYE ${{ inputs.process }}! $(date)"