From 97423b9214ce3fd4bf62ee805517eec421ba2657 Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Fri, 29 Nov 2024 14:30:54 +0100 Subject: [PATCH 01/11] Tentative de modularisation de la CI --- .github/workflows/idefix-ci-jobs.yml | 291 ++++++++++++++++++++++++++ .github/workflows/idefix-ci.yml | 296 ++------------------------- 2 files changed, 303 insertions(+), 284 deletions(-) create mode 100644 .github/workflows/idefix-ci-jobs.yml diff --git a/.github/workflows/idefix-ci-jobs.yml b/.github/workflows/idefix-ci-jobs.yml new file mode 100644 index 00000000..7462d11e --- /dev/null +++ b/.github/workflows/idefix-ci-jobs.yml @@ -0,0 +1,291 @@ +on: + workflow_call: + inputs: + TESTME_OPTIONS: + required: true + type: string + +# concurrency: +# # auto-cancel any concurrent job *in the same context* +# # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency +# # see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true + +env: + TESTME_OPTIONS: ${{ inputs.TESTME_OPTIONS }} + PYTHONPATH: ${{ github.workspace }} + IDEFIX_DIR: ${{ github.workspace }} + +jobs: + Linter: + # Don't do this in forks + if: ${{ github.repository == 'idefix-code/idefix' || github.repository == 'glesur/idefix' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.0 + - uses: pre-commit-ci/lite-action@v1.0.0 + if: always() + + ShocksHydro: + needs: Linter + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Sod test + run: | + cd $IDEFIX_DIR/test/HD/sod + ./testme.py -all $TESTME_OPTIONS + - name: Isothermal Sod test + run: | + cd $IDEFIX_DIR/test/HD/sod-iso + ./testme.py -all $TESTME_OPTIONS + - name: Mach reflection test + run: | + cd $IDEFIX_DIR/test/HD//MachReflection + ./testme.py -all $TESTME_OPTIONS + + ParabolicHydro: + needs: Linter + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Viscous flow past cylinder + run: | + cd $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder + ./testme.py -all $TESTME_OPTIONS + - name: Viscous disk + run: | + cd $IDEFIX_DIR/test/HD/ViscousDisk + ./testme.py -all $TESTME_OPTIONS + - name: Thermal diffusion + run: | + cd $IDEFIX_DIR/test/HD/thermalDiffusion + ./testme.py -all $TESTME_OPTIONS + + ShocksMHD: + needs: Linter + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: MHD Sod test + run: | + cd $IDEFIX_DIR/test/MHD/sod + ./testme.py -all $TESTME_OPTIONS + - name: MHD Isothermal Sod test + run: | + cd $IDEFIX_DIR/test/MHD/sod-iso + ./testme.py -all $TESTME_OPTIONS + - name: Orszag Tang + run: | + cd $IDEFIX_DIR/test/MHD/OrszagTang + ./testme.py -all $TESTME_OPTIONS + - name: Orszag Tang 3D+restart tests + run: | + cd $IDEFIX_DIR/test/MHD/OrszagTang3D + ./testme.py -all $TESTME_OPTIONS + + + ParabolicMHD: + needs: Linter + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Ambipolar C Shock + run: | + cd $IDEFIX_DIR/test/MHD/AmbipolarCshock + ./testme.py -all $TESTME_OPTIONS + - name: Ambipolar C Shock 3D + run: | + cd $IDEFIX_DIR/test/MHD/AmbipolarCshock3D + ./testme.py -all $TESTME_OPTIONS + - name: Resistive Alfvén wave + run: | + cd $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave + ./testme.py -all $TESTME_OPTIONS + - name: Grid coarsening diffusion + run: | + cd $IDEFIX_DIR/test/MHD/Coarsening + ./testme.py -all $TESTME_OPTIONS + - name: Hall whistler waves + run: | + cd $IDEFIX_DIR/test/MHD/HallWhistler + ./testme.py -all $TESTME_OPTIONS + + Fargo: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Fargo + planet + run: | + cd $IDEFIX_DIR/test/HD/FargoPlanet + ./testme.py -all $TESTME_OPTIONS + - name: Fargo MHD spherical + run: | + cd $IDEFIX_DIR/test/MHD/FargoMHDSpherical + ./testme.py -all $TESTME_OPTIONS + + ShearingBox: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Hydro shearing box + run: | + cd $IDEFIX_DIR/test/HD/ShearingBox + ./testme.py -all $TESTME_OPTIONS + - name: MHD shearing box + run: | + cd $IDEFIX_DIR/test/MHD/ShearingBox + ./testme.py -all $TESTME_OPTIONS + + SelfGravity: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Jeans Instability + run: | + cd $IDEFIX_DIR/test/SelfGravity/JeansInstability + ./testme.py -all $TESTME_OPTIONS + - name: Random sphere spherical + run: | + cd $IDEFIX_DIR/test/SelfGravity/RandomSphere + ./testme.py -all $TESTME_OPTIONS + - name: Random sphere cartesian + run: | + cd $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian + ./testme.py -all $TESTME_OPTIONS + - name: Uniform spherical collapse + run: | + cd $IDEFIX_DIR/test/SelfGravity/UniformCollapse + ./testme.py -all $TESTME_OPTIONS + - name: Dusty spherical collapse + run: | + cd $IDEFIX_DIR/test/SelfGravity/DustyCollapse + ./testme.py -all $TESTME_OPTIONS + + Planet: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: 3 body + run: | + cd $IDEFIX_DIR/test/Planet/Planet3Body + ./testme.py -all $TESTME_OPTIONS + - name: migration + run: | + cd $IDEFIX_DIR/test/Planet/PlanetMigration2D + ./testme.py -all $TESTME_OPTIONS + - name: planet-planet + run: | + cd $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D + ./testme.py -all $TESTME_OPTIONS + - name: spiral wake + run: | + cd $IDEFIX_DIR/test/Planet/PlanetSpiral2D + ./testme.py -all $TESTME_OPTIONS + - name: torques + run: | + cd $IDEFIX_DIR/test/Planet/PlanetTorque3D + ./testme.py -all $TESTME_OPTIONS + - name: RK5 + run: | + cd $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D + ./testme.py -all $TESTME_OPTIONS + + Dust: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Energy conservation + run: | + cd $IDEFIX_DIR/test/Dust/DustEnergy + ./testme.py -all $TESTME_OPTIONS + - name: Dusty wave + run: | + cd $IDEFIX_DIR/test/Dust/DustyWave + ./testme.py -all $TESTME_OPTIONS + + Braginskii: + needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: MTI + run: | + cd $IDEFIX_DIR/test/MHD/MTI + ./testme.py -all $TESTME_OPTIONS + - name: Spherical anisotropic diffusion + run: | + cd $IDEFIX_DIR/test/MHD/sphBragTDiffusion + ./testme.py -all $TESTME_OPTIONS + - name: Spherical anisotropic viscosity + run: | + cd $IDEFIX_DIR/test/MHD/sphBragViscosity + ./testme.py -all $TESTME_OPTIONS + + Examples: + needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Run examples test + run: cd test && ./checks_examples.sh $TEST_OPTIONS + + Utils: + needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] + runs-on: self-hosted + steps: + - name: Check out repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Lookup table + run: | + cd $IDEFIX_DIR/test/utils/lookupTable + ./testme.py -all $TESTME_OPTIONS + - name: Dump Image + run: | + cd $IDEFIX_DIR/test/utils/dumpImage + ./testme.py -all $TESTME_OPTIONS diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index e8201828..c83635b8 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -4,292 +4,20 @@ on: push: branches: - master - - v2.0 + - test-ci pull_request: paths-ignore: - '.github/ISSUE_TEMPLATE/*' -concurrency: - # auto-cancel any concurrent job *in the same context* - # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency - # see https://docs.github.com/en/actions/learn-github-actions/contexts#github-context - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - TESTME_OPTIONS: -cuda -Werror - PYTHONPATH: ${{ github.workspace }} - IDEFIX_DIR: ${{ github.workspace }} - jobs: - Linter: - # Don't do this in forks - if: ${{ github.repository == 'idefix-code/idefix' || github.repository == 'glesur/idefix' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: pre-commit/action@v3.0.0 - - uses: pre-commit-ci/lite-action@v1.0.0 - if: always() - - ShocksHydro: - needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod - ./testme.py -all $TESTME_OPTIONS - - name: Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod-iso - ./testme.py -all $TESTME_OPTIONS - - name: Mach reflection test - run: | - cd $IDEFIX_DIR/test/HD//MachReflection - ./testme.py -all $TESTME_OPTIONS - - ParabolicHydro: - needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Viscous flow past cylinder - run: | - cd $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder - ./testme.py -all $TESTME_OPTIONS - - name: Viscous disk - run: | - cd $IDEFIX_DIR/test/HD/ViscousDisk - ./testme.py -all $TESTME_OPTIONS - - name: Thermal diffusion - run: | - cd $IDEFIX_DIR/test/HD/thermalDiffusion - ./testme.py -all $TESTME_OPTIONS - - ShocksMHD: - needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: MHD Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod - ./testme.py -all $TESTME_OPTIONS - - name: MHD Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod-iso - ./testme.py -all $TESTME_OPTIONS - - name: Orszag Tang - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang - ./testme.py -all $TESTME_OPTIONS - - name: Orszag Tang 3D+restart tests - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang3D - ./testme.py -all $TESTME_OPTIONS - - - ParabolicMHD: - needs: Linter - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Ambipolar C Shock - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock - ./testme.py -all $TESTME_OPTIONS - - name: Ambipolar C Shock 3D - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock3D - ./testme.py -all $TESTME_OPTIONS - - name: Resistive Alfvén wave - run: | - cd $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave - ./testme.py -all $TESTME_OPTIONS - - name: Grid coarsening diffusion - run: | - cd $IDEFIX_DIR/test/MHD/Coarsening - ./testme.py -all $TESTME_OPTIONS - - name: Hall whistler waves - run: | - cd $IDEFIX_DIR/test/MHD/HallWhistler - ./testme.py -all $TESTME_OPTIONS - - Fargo: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Fargo + planet - run: | - cd $IDEFIX_DIR/test/HD/FargoPlanet - ./testme.py -all $TESTME_OPTIONS - - name: Fargo MHD spherical - run: | - cd $IDEFIX_DIR/test/MHD/FargoMHDSpherical - ./testme.py -all $TESTME_OPTIONS - - ShearingBox: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Hydro shearing box - run: | - cd $IDEFIX_DIR/test/HD/ShearingBox - ./testme.py -all $TESTME_OPTIONS - - name: MHD shearing box - run: | - cd $IDEFIX_DIR/test/MHD/ShearingBox - ./testme.py -all $TESTME_OPTIONS - - SelfGravity: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Jeans Instability - run: | - cd $IDEFIX_DIR/test/SelfGravity/JeansInstability - ./testme.py -all $TESTME_OPTIONS - - name: Random sphere spherical - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphere - ./testme.py -all $TESTME_OPTIONS - - name: Random sphere cartesian - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian - ./testme.py -all $TESTME_OPTIONS - - name: Uniform spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/UniformCollapse - ./testme.py -all $TESTME_OPTIONS - - name: Dusty spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/DustyCollapse - ./testme.py -all $TESTME_OPTIONS - - Planet: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: 3 body - run: | - cd $IDEFIX_DIR/test/Planet/Planet3Body - ./testme.py -all $TESTME_OPTIONS - - name: migration - run: | - cd $IDEFIX_DIR/test/Planet/PlanetMigration2D - ./testme.py -all $TESTME_OPTIONS - - name: planet-planet - run: | - cd $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D - ./testme.py -all $TESTME_OPTIONS - - name: spiral wake - run: | - cd $IDEFIX_DIR/test/Planet/PlanetSpiral2D - ./testme.py -all $TESTME_OPTIONS - - name: torques - run: | - cd $IDEFIX_DIR/test/Planet/PlanetTorque3D - ./testme.py -all $TESTME_OPTIONS - - name: RK5 - run: | - cd $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D - ./testme.py -all $TESTME_OPTIONS - - Dust: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Energy conservation - run: | - cd $IDEFIX_DIR/test/Dust/DustEnergy - ./testme.py -all $TESTME_OPTIONS - - name: Dusty wave - run: | - cd $IDEFIX_DIR/test/Dust/DustyWave - ./testme.py -all $TESTME_OPTIONS - - Braginskii: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: MTI - run: | - cd $IDEFIX_DIR/test/MHD/MTI - ./testme.py -all $TESTME_OPTIONS - - name: Spherical anisotropic diffusion - run: | - cd $IDEFIX_DIR/test/MHD/sphBragTDiffusion - ./testme.py -all $TESTME_OPTIONS - - name: Spherical anisotropic viscosity - run: | - cd $IDEFIX_DIR/test/MHD/sphBragViscosity - ./testme.py -all $TESTME_OPTIONS - - Examples: - needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Run examples test - run: cd test && ./checks_examples.sh $TEST_OPTIONS - - Utils: - needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] - runs-on: self-hosted - steps: - - name: Check out repo - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Lookup table - run: | - cd $IDEFIX_DIR/test/utils/lookupTable - ./testme.py -all $TESTME_OPTIONS - - name: Dump Image - run: | - cd $IDEFIX_DIR/test/utils/dumpImage - ./testme.py -all $TESTME_OPTIONS + cuda-jobs: + name: CUDA Jobs + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -cuda -Werror + + cpu-jobs: + name: CPU Jobs + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -Werror From 603bbf07ea881a6d38e27353482bfe67ea8991e8 Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Wed, 4 Dec 2024 16:24:34 +0100 Subject: [PATCH 02/11] Tentative de compilation avec icc --- .github/workflows/idefix-ci-jobs.yml | 153 +++++++-------------------- .github/workflows/idefix-ci.yml | 13 ++- scripts/ci/run-tests | 9 ++ 3 files changed, 61 insertions(+), 114 deletions(-) create mode 100755 scripts/ci/run-tests diff --git a/.github/workflows/idefix-ci-jobs.yml b/.github/workflows/idefix-ci-jobs.yml index 7462d11e..b31bf190 100644 --- a/.github/workflows/idefix-ci-jobs.yml +++ b/.github/workflows/idefix-ci-jobs.yml @@ -4,6 +4,9 @@ on: TESTME_OPTIONS: required: true type: string + IDEFIX_TARGET: + required: true + type: string # concurrency: # # auto-cancel any concurrent job *in the same context* @@ -13,6 +16,7 @@ on: # cancel-in-progress: true env: + IDEFIX_COMPILER: ${{ inputs.IDEFIX_COMPILER }} TESTME_OPTIONS: ${{ inputs.TESTME_OPTIONS }} PYTHONPATH: ${{ github.workspace }} IDEFIX_DIR: ${{ github.workspace }} @@ -40,17 +44,11 @@ jobs: with: submodules: recursive - name: Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod -all $TESTME_OPTIONS - name: Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/HD/sod-iso - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/sod-iso -all $TESTME_OPTIONS - name: Mach reflection test - run: | - cd $IDEFIX_DIR/test/HD//MachReflection - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD//MachReflection -all $TESTME_OPTIONS ParabolicHydro: needs: Linter @@ -61,17 +59,11 @@ jobs: with: submodules: recursive - name: Viscous flow past cylinder - run: | - cd $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousFlowPastCylinder -all $TESTME_OPTIONS - name: Viscous disk - run: | - cd $IDEFIX_DIR/test/HD/ViscousDisk - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ViscousDisk -all $TESTME_OPTIONS - name: Thermal diffusion - run: | - cd $IDEFIX_DIR/test/HD/thermalDiffusion - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/thermalDiffusion -all $TESTME_OPTIONS ShocksMHD: needs: Linter @@ -82,22 +74,13 @@ jobs: with: submodules: recursive - name: MHD Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod -all $TESTME_OPTIONS - name: MHD Isothermal Sod test - run: | - cd $IDEFIX_DIR/test/MHD/sod-iso - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sod-iso -all $TESTME_OPTIONS - name: Orszag Tang - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang -all $TESTME_OPTIONS - name: Orszag Tang 3D+restart tests - run: | - cd $IDEFIX_DIR/test/MHD/OrszagTang3D - ./testme.py -all $TESTME_OPTIONS - + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS ParabolicMHD: needs: Linter @@ -108,25 +91,15 @@ jobs: with: submodules: recursive - name: Ambipolar C Shock - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock -all $TESTME_OPTIONS - name: Ambipolar C Shock 3D - run: | - cd $IDEFIX_DIR/test/MHD/AmbipolarCshock3D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/AmbipolarCshock3D -all $TESTME_OPTIONS - name: Resistive Alfvén wave - run: | - cd $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ResistiveAlfvenWave -all $TESTME_OPTIONS - name: Grid coarsening diffusion - run: | - cd $IDEFIX_DIR/test/MHD/Coarsening - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/Coarsening -all $TESTME_OPTIONS - name: Hall whistler waves - run: | - cd $IDEFIX_DIR/test/MHD/HallWhistler - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/HallWhistler -all $TESTME_OPTIONS Fargo: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -137,13 +110,9 @@ jobs: with: submodules: recursive - name: Fargo + planet - run: | - cd $IDEFIX_DIR/test/HD/FargoPlanet - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/FargoPlanet -all $TESTME_OPTIONS - name: Fargo MHD spherical - run: | - cd $IDEFIX_DIR/test/MHD/FargoMHDSpherical - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/FargoMHDSpherical -all $TESTME_OPTIONS ShearingBox: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -154,13 +123,9 @@ jobs: with: submodules: recursive - name: Hydro shearing box - run: | - cd $IDEFIX_DIR/test/HD/ShearingBox - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/ShearingBox -all $TESTME_OPTIONS - name: MHD shearing box - run: | - cd $IDEFIX_DIR/test/MHD/ShearingBox - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ShearingBox -all $TESTME_OPTIONS SelfGravity: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -171,25 +136,15 @@ jobs: with: submodules: recursive - name: Jeans Instability - run: | - cd $IDEFIX_DIR/test/SelfGravity/JeansInstability - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/JeansInstability -all $TESTME_OPTIONS - name: Random sphere spherical - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphere - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphere -all $TESTME_OPTIONS - name: Random sphere cartesian - run: | - cd $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/RandomSphereCartesian -all $TESTME_OPTIONS - name: Uniform spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/UniformCollapse - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/UniformCollapse -all $TESTME_OPTIONS - name: Dusty spherical collapse - run: | - cd $IDEFIX_DIR/test/SelfGravity/DustyCollapse - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/DustyCollapse -all $TESTME_OPTIONS Planet: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -200,29 +155,17 @@ jobs: with: submodules: recursive - name: 3 body - run: | - cd $IDEFIX_DIR/test/Planet/Planet3Body - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/Planet3Body -all $TESTME_OPTIONS - name: migration - run: | - cd $IDEFIX_DIR/test/Planet/PlanetMigration2D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetMigration2D -all $TESTME_OPTIONS - name: planet-planet - run: | - cd $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetPlanetRK42D -all $TESTME_OPTIONS - name: spiral wake - run: | - cd $IDEFIX_DIR/test/Planet/PlanetSpiral2D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetSpiral2D -all $TESTME_OPTIONS - name: torques - run: | - cd $IDEFIX_DIR/test/Planet/PlanetTorque3D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetTorque3D -all $TESTME_OPTIONS - name: RK5 - run: | - cd $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D -all $TESTME_OPTIONS Dust: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -233,13 +176,9 @@ jobs: with: submodules: recursive - name: Energy conservation - run: | - cd $IDEFIX_DIR/test/Dust/DustEnergy - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustEnergy -all $TESTME_OPTIONS - name: Dusty wave - run: | - cd $IDEFIX_DIR/test/Dust/DustyWave - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustyWave -all $TESTME_OPTIONS Braginskii: needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] @@ -250,17 +189,11 @@ jobs: with: submodules: recursive - name: MTI - run: | - cd $IDEFIX_DIR/test/MHD/MTI - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/MTI -all $TESTME_OPTIONS - name: Spherical anisotropic diffusion - run: | - cd $IDEFIX_DIR/test/MHD/sphBragTDiffusion - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragTDiffusion -all $TESTME_OPTIONS - name: Spherical anisotropic viscosity - run: | - cd $IDEFIX_DIR/test/MHD/sphBragViscosity - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/sphBragViscosity -all $TESTME_OPTIONS Examples: needs: [Fargo, Dust, Planet, ShearingBox, SelfGravity] @@ -282,10 +215,6 @@ jobs: with: submodules: recursive - name: Lookup table - run: | - cd $IDEFIX_DIR/test/utils/lookupTable - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/lookupTable -all $TESTME_OPTIONS - name: Dump Image - run: | - cd $IDEFIX_DIR/test/utils/dumpImage - ./testme.py -all $TESTME_OPTIONS + run: scripts/ci/run-tests $IDEFIX_DIR/test/utils/dumpImage -all $TESTME_OPTIONS diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index c83635b8..6bf49643 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -15,9 +15,18 @@ jobs: uses: ./.github/workflows/idefix-ci-jobs.yml with: TESTME_OPTIONS: -cuda -Werror + IDEFIX_COMPILER: cuda - cpu-jobs: - name: CPU Jobs + gcc-jobs: + name: CPU Jobs (gcc) uses: ./.github/workflows/idefix-ci-jobs.yml with: TESTME_OPTIONS: -Werror + IDEFIX_COMPILER: gcc + + icc-jobs: + name: CPU Jobs (icc) + uses: ./.github/workflows/idefix-ci-jobs.yml + with: + TESTME_OPTIONS: -Werror + IDEFIX_COMPILER: icc diff --git a/scripts/ci/run-tests b/scripts/ci/run-tests new file mode 100755 index 00000000..f4565d53 --- /dev/null +++ b/scripts/ci/run-tests @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -ue +if [ "$IDEFIX_COMPILER" == icc ]; then + source /opt/intel/oneapi/setvars.sh + export CC=icx + export CXX=icpx +fi +cd "$1" +./testme.py "${@:2}" From 1eff9a3863f7cd6257e1851eb38531e2dcee3cfd Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Wed, 4 Dec 2024 16:26:00 +0100 Subject: [PATCH 03/11] Renommage de IDEFIX_TARGET en IDEFIX_COMPILER dans les inputs --- .github/workflows/idefix-ci-jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/idefix-ci-jobs.yml b/.github/workflows/idefix-ci-jobs.yml index b31bf190..ea98e1c5 100644 --- a/.github/workflows/idefix-ci-jobs.yml +++ b/.github/workflows/idefix-ci-jobs.yml @@ -4,7 +4,7 @@ on: TESTME_OPTIONS: required: true type: string - IDEFIX_TARGET: + IDEFIX_COMPILER: required: true type: string From 0fcf26811cb0988f5be640a41132ec9ec46b3dfc Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Wed, 4 Dec 2024 16:33:55 +0100 Subject: [PATCH 04/11] =?UTF-8?q?R=C3=A9ordonne=20les=20tests=20pour=20que?= =?UTF-8?q?=20'icc'=20se=20fasse=20en=20premier=20(vu=20que=20c'est=20?= =?UTF-8?q?=C3=A7a=20qu'on=20teste)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/idefix-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index 6bf49643..3a188c93 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -10,12 +10,12 @@ on: - '.github/ISSUE_TEMPLATE/*' jobs: - cuda-jobs: - name: CUDA Jobs + icc-jobs: + name: CPU Jobs (icc) uses: ./.github/workflows/idefix-ci-jobs.yml with: - TESTME_OPTIONS: -cuda -Werror - IDEFIX_COMPILER: cuda + TESTME_OPTIONS: -Werror + IDEFIX_COMPILER: icc gcc-jobs: name: CPU Jobs (gcc) @@ -24,9 +24,9 @@ jobs: TESTME_OPTIONS: -Werror IDEFIX_COMPILER: gcc - icc-jobs: - name: CPU Jobs (icc) + cuda-jobs: + name: CUDA Jobs uses: ./.github/workflows/idefix-ci-jobs.yml with: - TESTME_OPTIONS: -Werror - IDEFIX_COMPILER: icc + TESTME_OPTIONS: -cuda -Werror + IDEFIX_COMPILER: cuda From a1cbc4b7db735257c688b7fbe8544d3c2a40956d Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Wed, 4 Dec 2024 17:55:24 +0100 Subject: [PATCH 05/11] =?UTF-8?q?D=C3=A9placement=20du=20'set=20-ue'=20apr?= =?UTF-8?q?=C3=A8s=20l'import=20des=20variables=20Intel=20(pour=20cause=20?= =?UTF-8?q?d'erreur=20dans=20le=20script=20setvars.sh...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/run-tests b/scripts/ci/run-tests index f4565d53..3be11bd9 100755 --- a/scripts/ci/run-tests +++ b/scripts/ci/run-tests @@ -1,9 +1,9 @@ #!/usr/bin/env bash -set -ue if [ "$IDEFIX_COMPILER" == icc ]; then source /opt/intel/oneapi/setvars.sh export CC=icx export CXX=icpx fi +set -ue cd "$1" ./testme.py "${@:2}" From 2dca8b138b484ccc865bc56bc7f33e3d03142383 Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Thu, 5 Dec 2024 13:42:23 +0100 Subject: [PATCH 06/11] =?UTF-8?q?Ajout=20de=20-fp-model=3Dstrict=20lors=20?= =?UTF-8?q?de=20la=20compilation=20avec=20icc=20pour=20=C3=A9viter=20les?= =?UTF-8?q?=20optimisation=20impr=C3=A9cises?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci/run-tests | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/run-tests b/scripts/ci/run-tests index 3be11bd9..899eff34 100755 --- a/scripts/ci/run-tests +++ b/scripts/ci/run-tests @@ -3,6 +3,8 @@ if [ "$IDEFIX_COMPILER" == icc ]; then source /opt/intel/oneapi/setvars.sh export CC=icx export CXX=icpx + export CFLAGS="-fp-model=strict" + export CXXFLAGS="-fp-model=strict" fi set -ue cd "$1" From e590e4316850de67bd555751d7fe001f9265ce01 Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Fri, 6 Dec 2024 09:22:59 +0100 Subject: [PATCH 07/11] =?UTF-8?q?S=C3=A9oaration=20du=20linter=20et=20des?= =?UTF-8?q?=20jobs=20de=20compilation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/idefix-ci-jobs.yml | 29 ++++++---------------------- .github/workflows/idefix-ci.yml | 16 +++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/idefix-ci-jobs.yml b/.github/workflows/idefix-ci-jobs.yml index ea98e1c5..c0e62296 100644 --- a/.github/workflows/idefix-ci-jobs.yml +++ b/.github/workflows/idefix-ci-jobs.yml @@ -22,21 +22,7 @@ env: IDEFIX_DIR: ${{ github.workspace }} jobs: - Linter: - # Don't do this in forks - if: ${{ github.repository == 'idefix-code/idefix' || github.repository == 'glesur/idefix' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: pre-commit/action@v3.0.0 - - uses: pre-commit-ci/lite-action@v1.0.0 - if: always() - ShocksHydro: - needs: Linter runs-on: self-hosted steps: - name: Check out repo @@ -51,7 +37,6 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/HD//MachReflection -all $TESTME_OPTIONS ParabolicHydro: - needs: Linter runs-on: self-hosted steps: - name: Check out repo @@ -66,7 +51,6 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/HD/thermalDiffusion -all $TESTME_OPTIONS ShocksMHD: - needs: Linter runs-on: self-hosted steps: - name: Check out repo @@ -83,7 +67,6 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/OrszagTang3D -all $TESTME_OPTIONS ParabolicMHD: - needs: Linter runs-on: self-hosted steps: - name: Check out repo @@ -102,7 +85,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/HallWhistler -all $TESTME_OPTIONS Fargo: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo @@ -115,7 +98,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/FargoMHDSpherical -all $TESTME_OPTIONS ShearingBox: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo @@ -128,7 +111,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/MHD/ShearingBox -all $TESTME_OPTIONS SelfGravity: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo @@ -147,7 +130,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/SelfGravity/DustyCollapse -all $TESTME_OPTIONS Planet: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo @@ -168,7 +151,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/Planet/PlanetsIsActiveRK52D -all $TESTME_OPTIONS Dust: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo @@ -181,7 +164,7 @@ jobs: run: scripts/ci/run-tests $IDEFIX_DIR/test/Dust/DustyWave -all $TESTME_OPTIONS Braginskii: - needs: [Linter, ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] + needs: [ShocksHydro, ParabolicHydro, ShocksMHD, ParabolicMHD] runs-on: self-hosted steps: - name: Check out repo diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index 3a188c93..eb53abf5 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -10,7 +10,21 @@ on: - '.github/ISSUE_TEMPLATE/*' jobs: + Linter: + # Don't do this in forks + if: ${{ github.repository == 'idefix-code/idefix' || github.repository == 'glesur/idefix' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: pre-commit/action@v3.0.0 + - uses: pre-commit-ci/lite-action@v1.0.0 + if: always() + icc-jobs: + needs: Linter name: CPU Jobs (icc) uses: ./.github/workflows/idefix-ci-jobs.yml with: @@ -18,6 +32,7 @@ jobs: IDEFIX_COMPILER: icc gcc-jobs: + needs: Linter name: CPU Jobs (gcc) uses: ./.github/workflows/idefix-ci-jobs.yml with: @@ -25,6 +40,7 @@ jobs: IDEFIX_COMPILER: gcc cuda-jobs: + needs: Linter name: CUDA Jobs uses: ./.github/workflows/idefix-ci-jobs.yml with: From 8f4f47727e39d2c89000c1cd58c9d2ded36eff8b Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Fri, 6 Dec 2024 09:27:58 +0100 Subject: [PATCH 08/11] =?UTF-8?q?Suppression=20des=20espaces=20qui=20font?= =?UTF-8?q?=20=C3=A9chouer=20le=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/idefix-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index eb53abf5..d3fb4b0d 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -22,7 +22,7 @@ jobs: - uses: pre-commit/action@v3.0.0 - uses: pre-commit-ci/lite-action@v1.0.0 if: always() - + icc-jobs: needs: Linter name: CPU Jobs (icc) From 1befc52991daeec9557ee68bea195e6ed757fb67 Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Fri, 13 Dec 2024 14:41:12 +0100 Subject: [PATCH 09/11] Move some Intel compiler options to the idfx_test module --- .github/workflows/idefix-ci.yml | 4 ++-- pytools/idfx_test.py | 10 ++++++++++ scripts/ci/run-tests | 4 ---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index d3fb4b0d..267d65ff 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -28,7 +28,7 @@ jobs: name: CPU Jobs (icc) uses: ./.github/workflows/idefix-ci-jobs.yml with: - TESTME_OPTIONS: -Werror + TESTME_OPTIONS: -intel -Werror IDEFIX_COMPILER: icc gcc-jobs: @@ -45,4 +45,4 @@ jobs: uses: ./.github/workflows/idefix-ci-jobs.yml with: TESTME_OPTIONS: -cuda -Werror - IDEFIX_COMPILER: cuda + IDEFIX_COMPILER: nvcc diff --git a/pytools/idfx_test.py b/pytools/idfx_test.py index dc2da0a0..25bac76b 100644 --- a/pytools/idfx_test.py +++ b/pytools/idfx_test.py @@ -58,6 +58,10 @@ def __init__ (self): help="Test on Nvidia GPU using CUDA", action="store_true") + parser.add_argument("-intel", + help="Test compiling with Intel OneAPI", + action="store_true") + parser.add_argument("-hip", help="Test on AMD GPU using HIP", action="store_true") @@ -119,6 +123,12 @@ def configure(self,definitionFile=""): # disable Async cuda malloc for tests performed on old UCX implementations comm.append("-DKokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC=OFF") + if self.intel: + # disable fmad operations on Cuda to make it compatible with CPU arithmetics + comm.append("-DIdefix_CXX_FLAGS=-fp-model=strict") + comm.append("-DCMAKE_CXX_COMPILER=icpx") + comm.append("-DCMAKE_C_COMPILER=icx") + if self.hip: comm.append("-DKokkos_ENABLE_HIP=ON") # disable fmad operations on HIP to make it compatible with CPU arithmetics diff --git a/scripts/ci/run-tests b/scripts/ci/run-tests index 899eff34..32983102 100755 --- a/scripts/ci/run-tests +++ b/scripts/ci/run-tests @@ -1,10 +1,6 @@ #!/usr/bin/env bash if [ "$IDEFIX_COMPILER" == icc ]; then source /opt/intel/oneapi/setvars.sh - export CC=icx - export CXX=icpx - export CFLAGS="-fp-model=strict" - export CXXFLAGS="-fp-model=strict" fi set -ue cd "$1" From a8513f85db06911a0de24ece28ea8e266105f87f Mon Sep 17 00:00:00 2001 From: Marc Coiffier Date: Fri, 13 Dec 2024 15:32:58 +0100 Subject: [PATCH 10/11] Change 'test-ci' to 'develop' as the target branch for CI --- .github/workflows/idefix-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index 267d65ff..adceb5c9 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - test-ci + - develop pull_request: paths-ignore: - '.github/ISSUE_TEMPLATE/*' From 13c34d32074788a96c22bd157ee27799d87d4773 Mon Sep 17 00:00:00 2001 From: Geoffroy Lesur Date: Fri, 13 Dec 2024 20:34:56 +0100 Subject: [PATCH 11/11] ICC is outdated --- .github/workflows/idefix-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/idefix-ci.yml b/.github/workflows/idefix-ci.yml index adceb5c9..cb946143 100644 --- a/.github/workflows/idefix-ci.yml +++ b/.github/workflows/idefix-ci.yml @@ -25,7 +25,7 @@ jobs: icc-jobs: needs: Linter - name: CPU Jobs (icc) + name: CPU Jobs (intel OneApi) uses: ./.github/workflows/idefix-ci-jobs.yml with: TESTME_OPTIONS: -intel -Werror