From f5a51aecaef9b16cdb46e95ed93ecdfdc160de04 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Wed, 2 Aug 2023 16:28:25 -0400 Subject: [PATCH 01/10] move to github container registry, add cmake link test --- .github/workflows/Dockerfile.gnu | 2 +- .github/workflows/github_autotools_gnu.yml | 5 ++++- .github/workflows/github_cmake_gnu.yml | 17 +++++++++++++++-- .github/workflows/github_coupler_gnu.yml | 5 ++++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Dockerfile.gnu b/.github/workflows/Dockerfile.gnu index 3506c2b9ee..85cd214205 100644 --- a/.github/workflows/Dockerfile.gnu +++ b/.github/workflows/Dockerfile.gnu @@ -55,7 +55,7 @@ COPY --from=builder /opt/deps/ /opt/deps/ # need to be on the dev boxes if building COPY ./fms_test_input /home/unit_tests_input -RUN dnf install -y autoconf make automake m4 libtool pkg-config zip +RUN dnf install -y autoconf make automake m4 libtool pkg-config zip cmake ENV FC="mpifort" ENV CC="mpicc" diff --git a/.github/workflows/github_autotools_gnu.yml b/.github/workflows/github_autotools_gnu.yml index d25f440959..8c8bbad092 100644 --- a/.github/workflows/github_autotools_gnu.yml +++ b/.github/workflows/github_autotools_gnu.yml @@ -15,7 +15,10 @@ jobs: - conf-flag: --with-mpi=no input-flag: --enable-test-input=/home/unit_tests_input container: - image: noaagfdl/fms-ci-rocky-gnu:12.3.0 + image: ghcr.io/noaa-gfdl/FMS/fms-ci-rocky-gnu:12.3.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} env: TEST_VERBOSE: 1 DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }} ${{ matrix.io-flag }}" diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index d4f7e2a248..c24129e097 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -11,13 +11,26 @@ jobs: libyaml-flag: [ "", -DWITH_YAML=on ] io-flag: [ "", -DUSE_DEPRECATED_IO=on ] container: - image: noaagfdl/hpc-me.ubuntu-minimal:cmake + image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:12.3.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} env: CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.io-flag }} ${{ matrix.libyaml-flag }} -D64BIT=on" steps: - name: Checkout code uses: actions/checkout@v2 - name: Generate makefiles with CMake - run: cmake $CMAKE_FLAGS . + run: cmake -DNetCDF_INCLUDE_DIR=/opt/view/include/ -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch" $CMAKE_FLAGS . - name: Build the library run: make + - name: Link with basic executable + run: | + echo "program test" > test.F90 + echo " use fms_mod" >> test.F90 + echo " call fms_init" >> test.F90 + echo " call fms_end" >> test.F90 + echo "program end" >> test.F90 + mpifort `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x + - name: Run executable + run: ./test.x diff --git a/.github/workflows/github_coupler_gnu.yml b/.github/workflows/github_coupler_gnu.yml index ea24899b95..6ddf528ee7 100644 --- a/.github/workflows/github_coupler_gnu.yml +++ b/.github/workflows/github_coupler_gnu.yml @@ -5,7 +5,10 @@ jobs: coupler-build: runs-on: ubuntu-latest container: - image: ryanmulhall/hpc-me.ubuntu-minimal:coupler + image: ghcr.io/rem1776/fms-ci-rocky-gnu:12.3.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} env: CC: mpicc FC: mpif90 From ff34d3968c6835834ba2c08b19f4a016e05c9751 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 3 Aug 2023 09:04:38 -0400 Subject: [PATCH 02/10] update coupler ci image and flags --- .github/workflows/github_coupler_gnu.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/github_coupler_gnu.yml b/.github/workflows/github_coupler_gnu.yml index 6ddf528ee7..77d9ec2e76 100644 --- a/.github/workflows/github_coupler_gnu.yml +++ b/.github/workflows/github_coupler_gnu.yml @@ -5,7 +5,7 @@ jobs: coupler-build: runs-on: ubuntu-latest container: - image: ghcr.io/rem1776/fms-ci-rocky-gnu:12.3.0 + image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:12.3.0 credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} @@ -14,7 +14,6 @@ jobs: FC: mpif90 CPPFLAGS: '-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500' FCFLAGS: '-fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -I/usr/include' - LDFLAGS: '-L/usr/lib' VERBOSE: 1 steps: - name: Checkout FMS From 7021e61f81ad6d19f6abfaa6da839e1274529da6 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 3 Aug 2023 09:19:04 -0400 Subject: [PATCH 03/10] fix case and libyaml for cmake --- .github/workflows/github_autotools_gnu.yml | 2 +- .github/workflows/github_cmake_gnu.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github_autotools_gnu.yml b/.github/workflows/github_autotools_gnu.yml index 8c8bbad092..d0565908b0 100644 --- a/.github/workflows/github_autotools_gnu.yml +++ b/.github/workflows/github_autotools_gnu.yml @@ -15,7 +15,7 @@ jobs: - conf-flag: --with-mpi=no input-flag: --enable-test-input=/home/unit_tests_input container: - image: ghcr.io/noaa-gfdl/FMS/fms-ci-rocky-gnu:12.3.0 + image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:12.3.0 credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index c24129e097..0f5a8c11ae 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -17,6 +17,7 @@ jobs: password: ${{ secrets.github_token }} env: CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.io-flag }} ${{ matrix.libyaml-flag }} -D64BIT=on" + LIBYAML_ROOT: "/opt/deps/linux-rocky9-haswell/gcc-12.3.0/libyaml-0.2.5-yiouvafr3qwcdrwdpumepit4wmqvh642/" # TODO should find better way for cmake to find this steps: - name: Checkout code uses: actions/checkout@v2 From 588d85b17426da57bfb0add04fc841de3cf98fec Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 3 Aug 2023 10:05:41 -0400 Subject: [PATCH 04/10] fix test cmake program --- .github/workflows/github_cmake_gnu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index 0f5a8c11ae..521065d70e 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -31,7 +31,7 @@ jobs: echo " use fms_mod" >> test.F90 echo " call fms_init" >> test.F90 echo " call fms_end" >> test.F90 - echo "program end" >> test.F90 + echo "end program" >> test.F90 mpifort `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x - name: Run executable run: ./test.x From dccf5526dd620e4d76983e2108a5c7bc80824b5f Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 3 Aug 2023 10:14:48 -0400 Subject: [PATCH 05/10] adjust flags for the coupler build --- .github/workflows/github_coupler_gnu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github_coupler_gnu.yml b/.github/workflows/github_coupler_gnu.yml index 77d9ec2e76..0314decd71 100644 --- a/.github/workflows/github_coupler_gnu.yml +++ b/.github/workflows/github_coupler_gnu.yml @@ -12,8 +12,9 @@ jobs: env: CC: mpicc FC: mpif90 - CPPFLAGS: '-I/usr/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500' - FCFLAGS: '-fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -I/usr/include' + CPPFLAGS: '-I/opt/view/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500' + FCFLAGS: '-fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -I/opt/view/include' + LDFLAGS: '-L/opt/view/lib' VERBOSE: 1 steps: - name: Checkout FMS From ba93f780207c208a1fa1ad0f90696aecab8f1f91 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Thu, 3 Aug 2023 11:10:00 -0400 Subject: [PATCH 06/10] add git to image recipefile --- .github/workflows/Dockerfile.gnu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Dockerfile.gnu b/.github/workflows/Dockerfile.gnu index 85cd214205..5bb1d27b8c 100644 --- a/.github/workflows/Dockerfile.gnu +++ b/.github/workflows/Dockerfile.gnu @@ -55,7 +55,7 @@ COPY --from=builder /opt/deps/ /opt/deps/ # need to be on the dev boxes if building COPY ./fms_test_input /home/unit_tests_input -RUN dnf install -y autoconf make automake m4 libtool pkg-config zip cmake +RUN dnf install -y autoconf make automake m4 libtool pkg-config zip cmake git ENV FC="mpifort" ENV CC="mpicc" From 85a62ffe77c7bf6935fe4eb0d8f87d0608a1eb3e Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:45:24 -0400 Subject: [PATCH 07/10] add link flag for netcdf --- .github/workflows/github_cmake_gnu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index 521065d70e..cc06615fe6 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -32,6 +32,6 @@ jobs: echo " call fms_init" >> test.F90 echo " call fms_end" >> test.F90 echo "end program" >> test.F90 - mpifort `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x + mpifort -L/opt/view/lib `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x - name: Run executable run: ./test.x From 161a0777e28c48544cf4ad11e383cea39118ffa3 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Fri, 4 Aug 2023 16:39:19 -0400 Subject: [PATCH 08/10] good ol input.nml --- .github/workflows/github_cmake_gnu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index cc06615fe6..7bf2c1ea68 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -33,5 +33,6 @@ jobs: echo " call fms_end" >> test.F90 echo "end program" >> test.F90 mpifort -L/opt/view/lib `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x + touch input.nml - name: Run executable run: ./test.x From 2f157601a794bc53e15b96ff65819b028f242b4f Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:57:04 -0400 Subject: [PATCH 09/10] add openmp flag --- .github/workflows/github_cmake_gnu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_cmake_gnu.yml b/.github/workflows/github_cmake_gnu.yml index 7bf2c1ea68..f2fa93876e 100644 --- a/.github/workflows/github_cmake_gnu.yml +++ b/.github/workflows/github_cmake_gnu.yml @@ -32,7 +32,7 @@ jobs: echo " call fms_init" >> test.F90 echo " call fms_end" >> test.F90 echo "end program" >> test.F90 - mpifort -L/opt/view/lib `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x + mpifort -L/opt/view/lib -fopenmp `nf-config --flibs` -Iinclude_r4 -Iinclude_r8 test.F90 libfms_r4.a libfms_r8.a -o test.x touch input.nml - name: Run executable run: ./test.x From 8c362edc9bdcfa2e8a8df3a5e975654caf66d5a3 Mon Sep 17 00:00:00 2001 From: Ryan Mulhall <35538242+rem1776@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:53:11 -0400 Subject: [PATCH 10/10] add gnu flag for mpich --- .github/workflows/github_coupler_gnu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_coupler_gnu.yml b/.github/workflows/github_coupler_gnu.yml index 0314decd71..f5573c6e4a 100644 --- a/.github/workflows/github_coupler_gnu.yml +++ b/.github/workflows/github_coupler_gnu.yml @@ -13,7 +13,7 @@ jobs: CC: mpicc FC: mpif90 CPPFLAGS: '-I/opt/view/include -Duse_LARGEFILE -DMAXFIELDMETHODS_=500' - FCFLAGS: '-fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -I/opt/view/include' + FCFLAGS: '-fallow-argument-mismatch -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -I/opt/view/include' LDFLAGS: '-L/opt/view/lib' VERBOSE: 1 steps: