TEMPO code cleanup and refactor for v3.0.0 and MPAS release #150
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build (Intel) MPAS Standalone | |
| on: [pull_request,workflow_dispatch] | |
| jobs: | |
| build_mpas_intel: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false # Disable fail-fast | |
| matrix: | |
| fortran-compiler: [intel] | |
| build-system: [make, cmake] | |
| # Environmental variables | |
| env: | |
| driver_ROOT: /home/runner/work | |
| AUTOCONF_VERSION: 2.71 | |
| AUTOMAKE_VERSION: 1.17 | |
| M4_VERSION: 1.4.19 | |
| LIBTOOL_VERSION: 2.5.4 | |
| PNETCDF: /home/runner/PnetCDF | |
| AUTOTOOLS: /home/runner/AUTOTOOLS | |
| OMPI: /opt/intel/oneapi/mpi/2021.10.0 | |
| # Workflow steps | |
| steps: | |
| - name: Checkout code (into ${driver_ROOT}) | |
| uses: actions/checkout@v3 | |
| - name: Initialize submodules | |
| run: | | |
| git submodule update --init --recursive | |
| echo "ls -l src/core_atmosphere/physics/physics_mmm" | |
| - name: "Install Intel compilers & MPI" | |
| uses: NOAA-EMC/[email protected] | |
| with: | |
| install-mpi: true | |
| install-oneapi: false | |
| mpi-wrapper-setup: classic | |
| - name: Cache Intel | |
| id: cache-INTEL | |
| uses: actions/cache@v4 | |
| with: | |
| path: /opt/intel/oneapi/mpi/2021.10.0 | |
| key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-key | |
| - name: Install NetCDF library | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libnetcdff-dev | |
| - name: Cache GNU autotools | |
| id: cache-AUTOTOOLS | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/AUTOTOOLS | |
| key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-key | |
| - name: Build GNU autotools | |
| if: steps.cache-AUTOTOOLS.outputs.cache-hit != 'true' | |
| run: | | |
| wget -q https://ftp.gnu.org/gnu/m4/m4-${M4_VERSION}.tar.gz | |
| gzip -dc m4-${M4_VERSION}.tar.gz | tar -xf - | |
| cd m4-${M4_VERSION} | |
| ./configure --prefix=${AUTOTOOLS} --silent | |
| make -s -j 8 install > qout 2>&1 | |
| make -s -j 8 distclean >> qout 2>&1 | |
| wget -q https://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz | |
| gzip -dc autoconf-${AUTOCONF_VERSION}.tar.gz | tar -xf - | |
| cd autoconf-${AUTOCONF_VERSION} | |
| ./configure --prefix=${AUTOTOOLS} --silent | |
| make -s -j 8 install > qout 2>&1 | |
| make -s -j 8 distclean >> qout 2>&1 | |
| wget -q https://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.gz | |
| gzip -dc automake-${AUTOMAKE_VERSION}.tar.gz | tar -xf - | |
| cd automake-${AUTOMAKE_VERSION} | |
| ./configure --prefix=${AUTOTOOLS} --silent | |
| make -s -j 8 install > qout 2>&1 | |
| make -s -j 8 distclean >> qout 2>&1 | |
| wget -q https://ftp.gnu.org/gnu/libtool/libtool-${LIBTOOL_VERSION}.tar.gz | |
| gzip -dc libtool-${LIBTOOL_VERSION}.tar.gz | tar -xf - | |
| cd libtool-${LIBTOOL_VERSION} | |
| ./configure --prefix=${AUTOTOOLS} --silent | |
| make -s -j 8 install > qout 2>&1 | |
| make -s -j 8 distclean >> qout 2>&1 | |
| echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV | |
| - name: Cache PnetCDF | |
| id: cache-pnetcdf | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/PnetCDF | |
| key: cache-PnetCDF-${{matrix.fortran-compiler}}-key | |
| - name: Install PnetCDF | |
| if: steps.cache-PnetCDF.outputs.cache-hit != 'true' | |
| run: | | |
| set -x | |
| echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV | |
| m4 --version | |
| autoconf --version | |
| automake --version | |
| libtool --version | |
| echo "Install PnetCDF on ${PNETCDF}" | |
| rm -rf PnetCDF ; mkdir PnetCDF ; cd PnetCDF | |
| git clone -q https://github.com/Parallel-NetCDF/PnetCDF.git | |
| cd PnetCDF | |
| autoreconf -i | |
| ./configure --prefix=${PNETCDF} --with-mpi=${OMPI} | |
| make -j 8 install | |
| echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV | |
| - name: Setup environment | |
| run: | | |
| echo "FC=mpiifort" >> $GITHUB_ENV | |
| echo "CC=mpiicc" >> $GITHUB_ENV | |
| echo "PNETCDF=${PNETCDF}" >> $GITHUB_ENV | |
| echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Build MPAS Standalone (make) | |
| if: matrix.build-system == 'make' | |
| run: | | |
| cd ${driver_ROOT}/MPAS-Model/MPAS-Model | |
| make intel-mpi CORE=init_atmosphere | |
| make intel-mpi CORE=atmosphere | |
| - name: Build MPAS Standalone (cmake) | |
| if: matrix.build-system == 'cmake' | |
| run: | | |
| cd ${driver_ROOT}/MPAS-Model/MPAS-Model | |
| mkdir build | |
| cd build | |
| cmake -DMPAS_DOUBLE_PRECISION=OFF -DMPAS_CORES="init_atmosphere;atmosphere" .. | |
| make -j8 |