From 151ca13fb8b011ff4f13a88b3dcf428e531412a3 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 22 Aug 2024 09:54:54 -0400 Subject: [PATCH 1/9] Update CI - 2024-Aug-22 This PR updates the CI to remove `gfortran-11` from the general matrix. Now only `ubuntu-20.04` supports `gfortran-10` and `gfortran-11`. The other images only support `gfortran-12` and higher. Moreover, `ubuntu-20.04` does not support `gfortran-13` and `gfortran-14`. We also update the NVIDIA CI image to 24.7 --- .github/workflows/main.yml | 20 ++++++++++---------- ChangeLog.MD | 5 +++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f009e6..73165d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,19 +16,19 @@ jobs: strategy: matrix: os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] - compiler: [gfortran-11, gfortran-12, gfortran-13] - # gfortran-10 is only on ubuntu-22.04 - # gfortran-14 is available on ubuntu-24.04 + compiler: [gfortran-12, gfortran-13, gfortran-14] + # gfortran-10 and -11 are only on ubuntu-22.04 + # gfortran-13 and -13 are not on ubuntu-22.04 include: - os: ubuntu-22.04 compiler: gfortran-10 - - os: ubuntu-24.04 - compiler: gfortran-14 - exclude: - - os: ubuntu-24.04 + - os: ubuntu-22.04 compiler: gfortran-11 + exclude: - os: ubuntu-22.04 compiler: gfortran-13 + - os: ubuntu-22.04 + compiler: gfortran-14 # fail-fast if set to 'true' here is good for production, but when # debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails @@ -93,7 +93,7 @@ jobs: build/**/*.log Intel: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: FC: ifx @@ -169,8 +169,8 @@ jobs: build/**/*.log Nvidia: - runs-on: ubuntu-20.04 - container: nvcr.io/nvidia/nvhpc:24.1-devel-cuda12.3-ubuntu22.04 + runs-on: ubuntu-22.04 + container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04 env: FC: nvfortran diff --git a/ChangeLog.MD b/ChangeLog.MD index 04e8a04..237397a 100644 --- a/ChangeLog.MD +++ b/ChangeLog.MD @@ -6,6 +6,11 @@ - Preliminary LLVMFlang support +### Changed + +- Update CI to have `gfortran-10` and `gfortran-11` only on `ubuntu-20.04` +- Update CI NVIDIA to NVHPC 24.7 + ## [1.14.0] - 2024-07-09 ### Fixed From dca254e93ca7b97e2fb1b49d8cee4dff8c1e4fef Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 22 Aug 2024 09:57:47 -0400 Subject: [PATCH 2/9] Update changelog --- ChangeLog.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.MD b/ChangeLog.MD index 237397a..f191614 100644 --- a/ChangeLog.MD +++ b/ChangeLog.MD @@ -8,7 +8,7 @@ ### Changed -- Update CI to have `gfortran-10` and `gfortran-11` only on `ubuntu-20.04` +- Update CI to have `gfortran-10` and `gfortran-11` only on `ubuntu-22.04` - Update CI NVIDIA to NVHPC 24.7 ## [1.14.0] - 2024-07-09 From 4d189e23f391311f0320d9793168389fd5b6ad4a Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 22 Aug 2024 10:06:49 -0400 Subject: [PATCH 3/9] Fix comment --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73165d2..b371e4a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] compiler: [gfortran-12, gfortran-13, gfortran-14] # gfortran-10 and -11 are only on ubuntu-22.04 - # gfortran-13 and -13 are not on ubuntu-22.04 + # gfortran-13 and -14 are not on ubuntu-22.04 include: - os: ubuntu-22.04 compiler: gfortran-10 From 124ab979df29fafffdae81e66022e14d4e028db0 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 29 Aug 2024 11:39:05 -0400 Subject: [PATCH 4/9] Add flang to CI --- .github/workflows/main.yml | 56 ++++++++++++++++++++++++++++++++++++++ ChangeLog.MD | 1 + 2 files changed, 57 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b371e4a..e7f9bd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -224,3 +224,59 @@ jobs: path: | build/**/*.log + Flang: + runs-on: ubuntu-latest + container: gmao/llvm-flang:latest + env: + FC: flang-new + + name: Flang + steps: + - name: Versions + run: | + ${FC} --version + cmake --version + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Add python-is-python3 package + run: | + apt-get update + apt-get install -y python-is-python3 + + - name: Build GFE Prereqs + run: | + bash ./tools/ci-install-gfe.bash + + - name: Build gFTL + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + make -j4 + + - name: Build Tests + run: | + cd build + make -j4 tests + + - name: Run Tests + run: | + cd build + ctest -j1 --output-on-failure --repeat until-pass:4 + + - name: Archive log files on failure + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logfiles + path: | + build/**/*.log + diff --git a/ChangeLog.MD b/ChangeLog.MD index f191614..6650708 100644 --- a/ChangeLog.MD +++ b/ChangeLog.MD @@ -10,6 +10,7 @@ - Update CI to have `gfortran-10` and `gfortran-11` only on `ubuntu-22.04` - Update CI NVIDIA to NVHPC 24.7 +- Add flang test to CI ## [1.14.0] - 2024-07-09 From b43089927915d60dabff5ba24944797ce300e07c Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 29 Aug 2024 11:42:11 -0400 Subject: [PATCH 5/9] Add m4 --- .github/workflows/main.yml | 428 ++++++++++++++++++------------------- 1 file changed, 214 insertions(+), 214 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7f9bd7..e68870a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,218 +11,218 @@ on: - "Copyright.txt" jobs: - GNU: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] - compiler: [gfortran-12, gfortran-13, gfortran-14] - # gfortran-10 and -11 are only on ubuntu-22.04 - # gfortran-13 and -14 are not on ubuntu-22.04 - include: - - os: ubuntu-22.04 - compiler: gfortran-10 - - os: ubuntu-22.04 - compiler: gfortran-11 - exclude: - - os: ubuntu-22.04 - compiler: gfortran-13 - - os: ubuntu-22.04 - compiler: gfortran-14 - - # fail-fast if set to 'true' here is good for production, but when - # debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails - # GitHub Actions will stop any other test immediately. So good for production, bad - # when trying to figure something out. For more info see: - # https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html - - fail-fast: false - env: - FC: ${{ matrix.compiler }} - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - LANG: en_US.UTF-8 - LC_TYPE: en_US.UTF-8 - OMPI_ALLOW_RUN_AS_ROOT: 1 - OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 - OMPI_MCA_btl_vader_single_copy_mechanism: none - - name: ${{ matrix.os }} / ${{ matrix.compiler }} - steps: - - name: Compiler Versions - run: | - ${FC} --version - cmake --version - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Set all directories as git safe - run: | - git config --global --add safe.directory '*' - - - name: Build GFE Prereqs - run: | - bash ./tools/ci-install-gfe.bash - - - name: Build gFTL - run: | - mkdir -p build - cd build - cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - make -j4 - - - name: Build Tests - run: | - cd build - make -j4 tests - - - name: Run Tests - run: | - cd build - ctest -j1 --output-on-failure --repeat until-pass:4 - - - name: Archive log files on failure - uses: actions/upload-artifact@v4 - if: failure() - with: - name: logfiles - path: | - build/**/*.log - - Intel: - runs-on: ubuntu-22.04 - - env: - FC: ifx - CC: icx - - name: Intel Fortran - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Set all directories as git safe - run: | - git config --global --add safe.directory '*' - - - name: Setup Intel oneAPI repository - run: | - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - sudo apt-get update - - - name: Install Intel oneAPI compilers - timeout-minutes: 5 - run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp - - # optional - - name: Install Intel MPI - timeout-minutes: 5 - run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel - - - name: Setup Intel oneAPI environment - run: | - source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV - printenv | grep intel - - - name: Versions - run: | - ${FC} --version - ${CC} --version - mpirun --version - cmake --version - - - name: Build GFE Prereqs - run: | - bash ./tools/ci-install-gfe.bash - - - name: Build gFTL - run: | - mkdir -p build - cd build - cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - make -j4 - - - name: Build Tests - run: | - cd build - make -j4 tests - - - name: Run Tests - run: | - cd build - ctest -j1 --output-on-failure --repeat until-pass:4 - - - name: Archive log files on failure - uses: actions/upload-artifact@v4 - if: failure() - with: - name: logfiles - path: | - build/**/*.log - - Nvidia: - runs-on: ubuntu-22.04 - container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04 - env: - FC: nvfortran - - name: Nvidia HPC - steps: - - name: Versions - run: | - ${FC} --version - cmake --version - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Set all directories as git safe - run: | - git config --global --add safe.directory '*' - - - name: Add python-is-python3 package - run: | - apt-get update - apt-get install -y python-is-python3 - - - name: Build GFE Prereqs - run: | - bash ./tools/ci-install-gfe.bash - - - name: Build gFTL - run: | - mkdir -p build - cd build - cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - make -j4 - - - name: Build Tests - run: | - cd build - make -j4 tests - - - name: Run Tests - run: | - cd build - ctest -j1 --output-on-failure --repeat until-pass:4 - - - name: Archive log files on failure - uses: actions/upload-artifact@v4 - if: failure() - with: - name: logfiles - path: | - build/**/*.log + #GNU: + #runs-on: ${{ matrix.os }} + #strategy: + #matrix: + #os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + #compiler: [gfortran-12, gfortran-13, gfortran-14] + ## gfortran-10 and -11 are only on ubuntu-22.04 + ## gfortran-13 and -14 are not on ubuntu-22.04 + #include: + #- os: ubuntu-22.04 + #compiler: gfortran-10 + #- os: ubuntu-22.04 + #compiler: gfortran-11 + #exclude: + #- os: ubuntu-22.04 + #compiler: gfortran-13 + #- os: ubuntu-22.04 + #compiler: gfortran-14 + + ## fail-fast if set to 'true' here is good for production, but when + ## debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails + ## GitHub Actions will stop any other test immediately. So good for production, bad + ## when trying to figure something out. For more info see: + ## https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html + + #fail-fast: false + #env: + #FC: ${{ matrix.compiler }} + #LANGUAGE: en_US.UTF-8 + #LC_ALL: en_US.UTF-8 + #LANG: en_US.UTF-8 + #LC_TYPE: en_US.UTF-8 + #OMPI_ALLOW_RUN_AS_ROOT: 1 + #OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + #OMPI_MCA_btl_vader_single_copy_mechanism: none + + #name: ${{ matrix.os }} / ${{ matrix.compiler }} + #steps: + #- name: Compiler Versions + #run: | + #${FC} --version + #cmake --version + + #- name: Checkout + #uses: actions/checkout@v4 + #with: + #fetch-depth: 1 + + #- name: Set all directories as git safe + #run: | + #git config --global --add safe.directory '*' + + #- name: Build GFE Prereqs + #run: | + #bash ./tools/ci-install-gfe.bash + + #- name: Build gFTL + #run: | + #mkdir -p build + #cd build + #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + #make -j4 + + #- name: Build Tests + #run: | + #cd build + #make -j4 tests + + #- name: Run Tests + #run: | + #cd build + #ctest -j1 --output-on-failure --repeat until-pass:4 + + #- name: Archive log files on failure + #uses: actions/upload-artifact@v4 + #if: failure() + #with: + #name: logfiles + #path: | + #build/**/*.log + + #Intel: + #runs-on: ubuntu-22.04 + + #env: + #FC: ifx + #CC: icx + + #name: Intel Fortran + #steps: + #- name: Checkout + #uses: actions/checkout@v4 + #with: + #fetch-depth: 1 + + #- name: Set all directories as git safe + #run: | + #git config --global --add safe.directory '*' + + #- name: Setup Intel oneAPI repository + #run: | + #wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + #sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + #sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" + #sudo apt-get update + + #- name: Install Intel oneAPI compilers + #timeout-minutes: 5 + #run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp + + ## optional + #- name: Install Intel MPI + #timeout-minutes: 5 + #run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel + + #- name: Setup Intel oneAPI environment + #run: | + #source /opt/intel/oneapi/setvars.sh + #printenv >> $GITHUB_ENV + #printenv | grep intel + + #- name: Versions + #run: | + #${FC} --version + #${CC} --version + #mpirun --version + #cmake --version + + #- name: Build GFE Prereqs + #run: | + #bash ./tools/ci-install-gfe.bash + + #- name: Build gFTL + #run: | + #mkdir -p build + #cd build + #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + #make -j4 + + #- name: Build Tests + #run: | + #cd build + #make -j4 tests + + #- name: Run Tests + #run: | + #cd build + #ctest -j1 --output-on-failure --repeat until-pass:4 + + #- name: Archive log files on failure + #uses: actions/upload-artifact@v4 + #if: failure() + #with: + #name: logfiles + #path: | + #build/**/*.log + + #Nvidia: + #runs-on: ubuntu-22.04 + #container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04 + #env: + #FC: nvfortran + + #name: Nvidia HPC + #steps: + #- name: Versions + #run: | + #${FC} --version + #cmake --version + + #- name: Checkout + #uses: actions/checkout@v4 + #with: + #fetch-depth: 1 + + #- name: Set all directories as git safe + #run: | + #git config --global --add safe.directory '*' + + #- name: Add python-is-python3 package + #run: | + #apt-get update + #apt-get install -y python-is-python3 + + #- name: Build GFE Prereqs + #run: | + #bash ./tools/ci-install-gfe.bash + + #- name: Build gFTL + #run: | + #mkdir -p build + #cd build + #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + #make -j4 + + #- name: Build Tests + #run: | + #cd build + #make -j4 tests + + #- name: Run Tests + #run: | + #cd build + #ctest -j1 --output-on-failure --repeat until-pass:4 + + #- name: Archive log files on failure + #uses: actions/upload-artifact@v4 + #if: failure() + #with: + #name: logfiles + #path: | + #build/**/*.log Flang: runs-on: ubuntu-latest @@ -246,10 +246,10 @@ jobs: run: | git config --global --add safe.directory '*' - - name: Add python-is-python3 package + - name: Add additional packages run: | apt-get update - apt-get install -y python-is-python3 + apt-get install -y python-is-python3 m4 - name: Build GFE Prereqs run: | From ee5c5b48fc03bafd0edeffce54e256ba10939edc Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Tue, 3 Sep 2024 17:03:45 -0400 Subject: [PATCH 6/9] Verbose --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e68870a..94ed25e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -270,7 +270,7 @@ jobs: - name: Run Tests run: | cd build - ctest -j1 --output-on-failure --repeat until-pass:4 + ctest -V -j1 --output-on-failure --repeat until-pass:4 - name: Archive log files on failure uses: actions/upload-artifact@v4 From ac370fd607998ef5bf190d63f10a8365a78b12b4 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 4 Sep 2024 11:07:07 -0400 Subject: [PATCH 7/9] No need for m4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94ed25e..62f96b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -249,7 +249,7 @@ jobs: - name: Add additional packages run: | apt-get update - apt-get install -y python-is-python3 m4 + apt-get install -y python-is-python3 - name: Build GFE Prereqs run: | From 4c7fbd3261c0dfb4cb11d40d02a719986a69d619 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 4 Sep 2024 11:25:52 -0400 Subject: [PATCH 8/9] Restore other tests --- .github/workflows/main.yml | 426 ++++++++++++++++++------------------- 1 file changed, 213 insertions(+), 213 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62f96b0..7940007 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,218 +11,218 @@ on: - "Copyright.txt" jobs: - #GNU: - #runs-on: ${{ matrix.os }} - #strategy: - #matrix: - #os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] - #compiler: [gfortran-12, gfortran-13, gfortran-14] - ## gfortran-10 and -11 are only on ubuntu-22.04 - ## gfortran-13 and -14 are not on ubuntu-22.04 - #include: - #- os: ubuntu-22.04 - #compiler: gfortran-10 - #- os: ubuntu-22.04 - #compiler: gfortran-11 - #exclude: - #- os: ubuntu-22.04 - #compiler: gfortran-13 - #- os: ubuntu-22.04 - #compiler: gfortran-14 - - ## fail-fast if set to 'true' here is good for production, but when - ## debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails - ## GitHub Actions will stop any other test immediately. So good for production, bad - ## when trying to figure something out. For more info see: - ## https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html - - #fail-fast: false - #env: - #FC: ${{ matrix.compiler }} - #LANGUAGE: en_US.UTF-8 - #LC_ALL: en_US.UTF-8 - #LANG: en_US.UTF-8 - #LC_TYPE: en_US.UTF-8 - #OMPI_ALLOW_RUN_AS_ROOT: 1 - #OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 - #OMPI_MCA_btl_vader_single_copy_mechanism: none - - #name: ${{ matrix.os }} / ${{ matrix.compiler }} - #steps: - #- name: Compiler Versions - #run: | - #${FC} --version - #cmake --version - - #- name: Checkout - #uses: actions/checkout@v4 - #with: - #fetch-depth: 1 - - #- name: Set all directories as git safe - #run: | - #git config --global --add safe.directory '*' - - #- name: Build GFE Prereqs - #run: | - #bash ./tools/ci-install-gfe.bash - - #- name: Build gFTL - #run: | - #mkdir -p build - #cd build - #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - #make -j4 - - #- name: Build Tests - #run: | - #cd build - #make -j4 tests - - #- name: Run Tests - #run: | - #cd build - #ctest -j1 --output-on-failure --repeat until-pass:4 - - #- name: Archive log files on failure - #uses: actions/upload-artifact@v4 - #if: failure() - #with: - #name: logfiles - #path: | - #build/**/*.log - - #Intel: - #runs-on: ubuntu-22.04 - - #env: - #FC: ifx - #CC: icx - - #name: Intel Fortran - #steps: - #- name: Checkout - #uses: actions/checkout@v4 - #with: - #fetch-depth: 1 - - #- name: Set all directories as git safe - #run: | - #git config --global --add safe.directory '*' - - #- name: Setup Intel oneAPI repository - #run: | - #wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - #sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - #sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - #sudo apt-get update - - #- name: Install Intel oneAPI compilers - #timeout-minutes: 5 - #run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp - - ## optional - #- name: Install Intel MPI - #timeout-minutes: 5 - #run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel - - #- name: Setup Intel oneAPI environment - #run: | - #source /opt/intel/oneapi/setvars.sh - #printenv >> $GITHUB_ENV - #printenv | grep intel - - #- name: Versions - #run: | - #${FC} --version - #${CC} --version - #mpirun --version - #cmake --version - - #- name: Build GFE Prereqs - #run: | - #bash ./tools/ci-install-gfe.bash - - #- name: Build gFTL - #run: | - #mkdir -p build - #cd build - #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - #make -j4 - - #- name: Build Tests - #run: | - #cd build - #make -j4 tests - - #- name: Run Tests - #run: | - #cd build - #ctest -j1 --output-on-failure --repeat until-pass:4 - - #- name: Archive log files on failure - #uses: actions/upload-artifact@v4 - #if: failure() - #with: - #name: logfiles - #path: | - #build/**/*.log - - #Nvidia: - #runs-on: ubuntu-22.04 - #container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04 - #env: - #FC: nvfortran - - #name: Nvidia HPC - #steps: - #- name: Versions - #run: | - #${FC} --version - #cmake --version - - #- name: Checkout - #uses: actions/checkout@v4 - #with: - #fetch-depth: 1 - - #- name: Set all directories as git safe - #run: | - #git config --global --add safe.directory '*' - - #- name: Add python-is-python3 package - #run: | - #apt-get update - #apt-get install -y python-is-python3 - - #- name: Build GFE Prereqs - #run: | - #bash ./tools/ci-install-gfe.bash - - #- name: Build gFTL - #run: | - #mkdir -p build - #cd build - #cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE - #make -j4 - - #- name: Build Tests - #run: | - #cd build - #make -j4 tests - - #- name: Run Tests - #run: | - #cd build - #ctest -j1 --output-on-failure --repeat until-pass:4 - - #- name: Archive log files on failure - #uses: actions/upload-artifact@v4 - #if: failure() - #with: - #name: logfiles - #path: | - #build/**/*.log + GNU: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14] + compiler: [gfortran-12, gfortran-13, gfortran-14] + # gfortran-10 and -11 are only on ubuntu-22.04 + # gfortran-13 and -14 are not on ubuntu-22.04 + include: + - os: ubuntu-22.04 + compiler: gfortran-10 + - os: ubuntu-22.04 + compiler: gfortran-11 + exclude: + - os: ubuntu-22.04 + compiler: gfortran-13 + - os: ubuntu-22.04 + compiler: gfortran-14 + + # fail-fast if set to 'true' here is good for production, but when + # debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails + # GitHub Actions will stop any other test immediately. So good for production, bad + # when trying to figure something out. For more info see: + # https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html + + fail-fast: false + env: + FC: ${{ matrix.compiler }} + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LANG: en_US.UTF-8 + LC_TYPE: en_US.UTF-8 + OMPI_ALLOW_RUN_AS_ROOT: 1 + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + OMPI_MCA_btl_vader_single_copy_mechanism: none + + name: ${{ matrix.os }} / ${{ matrix.compiler }} + steps: + - name: Compiler Versions + run: | + ${FC} --version + cmake --version + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Build GFE Prereqs + run: | + bash ./tools/ci-install-gfe.bash + + - name: Build gFTL + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + make -j4 + + - name: Build Tests + run: | + cd build + make -j4 tests + + - name: Run Tests + run: | + cd build + ctest -j1 --output-on-failure --repeat until-pass:4 + + - name: Archive log files on failure + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logfiles + path: | + build/**/*.log + + Intel: + runs-on: ubuntu-22.04 + + env: + FC: ifx + CC: icx + + name: Intel Fortran + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Setup Intel oneAPI repository + run: | + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" + sudo apt-get update + + - name: Install Intel oneAPI compilers + timeout-minutes: 5 + run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp + + # optional + - name: Install Intel MPI + timeout-minutes: 5 + run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel + + - name: Setup Intel oneAPI environment + run: | + source /opt/intel/oneapi/setvars.sh + printenv >> $GITHUB_ENV + printenv | grep intel + + - name: Versions + run: | + ${FC} --version + ${CC} --version + mpirun --version + cmake --version + + - name: Build GFE Prereqs + run: | + bash ./tools/ci-install-gfe.bash + + - name: Build gFTL + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + make -j4 + + - name: Build Tests + run: | + cd build + make -j4 tests + + - name: Run Tests + run: | + cd build + ctest -j1 --output-on-failure --repeat until-pass:4 + + - name: Archive log files on failure + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logfiles + path: | + build/**/*.log + + Nvidia: + runs-on: ubuntu-22.04 + container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04 + env: + FC: nvfortran + + name: Nvidia HPC + steps: + - name: Versions + run: | + ${FC} --version + cmake --version + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Add python-is-python3 package + run: | + apt-get update + apt-get install -y python-is-python3 + + - name: Build GFE Prereqs + run: | + bash ./tools/ci-install-gfe.bash + + - name: Build gFTL + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/gFTL -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE + make -j4 + + - name: Build Tests + run: | + cd build + make -j4 tests + + - name: Run Tests + run: | + cd build + ctest -j1 --output-on-failure --repeat until-pass:4 + + - name: Archive log files on failure + uses: actions/upload-artifact@v4 + if: failure() + with: + name: logfiles + path: | + build/**/*.log Flang: runs-on: ubuntu-latest @@ -270,7 +270,7 @@ jobs: - name: Run Tests run: | cd build - ctest -V -j1 --output-on-failure --repeat until-pass:4 + ctest -j1 --output-on-failure --repeat until-pass:4 - name: Archive log files on failure uses: actions/upload-artifact@v4 From e2fb4a14c6241327f125c98d03b4e44f293c2337 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 4 Sep 2024 11:54:49 -0400 Subject: [PATCH 9/9] Make ci consistent --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7940007..e7f9bd7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -246,7 +246,7 @@ jobs: run: | git config --global --add safe.directory '*' - - name: Add additional packages + - name: Add python-is-python3 package run: | apt-get update apt-get install -y python-is-python3