Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions .github/workflows/build_mpas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false # Disable fail-fast
matrix:
fortran-compiler: [gfortran-12]
build-system: [make]###, cmake]
build-system: [make] ###, cmake]

# Environmental variables
env:
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Install NetCDF library
run: |
sudo apt-get update
sudo apt-get install libnetcdff-dev liblapack-dev libblas-dev
sudo apt-get install libnetcdff-dev

- name: Cache openmpi
id: cache-openmpi
Expand Down Expand Up @@ -138,18 +138,6 @@ jobs:
echo "LD_LIBRARY_PATH=${PNETCDF}/bin:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV

- name: Setup NetCDF
run: |
NETCDF_DIR=/home/runner/NetCDF
mkdir -p ${NETCDF_DIR}/lib ${NETCDF_DIR}/include
for f in /usr/include/netcdf*.h /usr/include/netcdf*.inc /usr/include/netcdf*.mod; do
[ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/include/ || true
done
for f in /usr/lib/x86_64-linux-gnu/libnetcdf*.so; do
[ -e "$f" ] && ln -sf "$f" ${NETCDF_DIR}/lib/ || true
done
echo "NETCDF=${NETCDF_DIR}" >> $GITHUB_ENV

# - name: Setup environment
# run: |
# echo "FC=mpif90" >> $GITHUB_ENV
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/build_mpas_intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
install-mpi: true
install-oneapi: false
mpi-wrapper-setup: classic
install-mkl: true

- name: Cache Intel
id: cache-INTEL
Expand All @@ -50,18 +49,6 @@ jobs:
path: /opt/intel/oneapi/mpi/2021.10.0
key: cache-Intel-MPI-${{matrix.fortran-compiler}}-${{matrix.build-system}}-key

- name: Install NetCDF-C library
run: |
sudo apt-get update
sudo apt-get install libnetcdf-dev

- name: Cache NetCDF-Fortran
id: cache-netcdf-fortran
uses: actions/cache@v4
with:
path: /home/runner/NetCDF
key: cache-NetCDF-Fortran-${{matrix.fortran-compiler}}-${{matrix.build-system}}-key

- name: Cache GNU autotools
id: cache-AUTOTOOLS
uses: actions/cache@v5
Expand Down Expand Up @@ -137,23 +124,6 @@ jobs:
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
echo "NETCDF=/home/runner/NetCDF" >> $GITHUB_ENV

- name: Build NetCDF-Fortran
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
NETCDF_F_VERSION=4.6.1
wget -q https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v${NETCDF_F_VERSION}.tar.gz
tar -xf v${NETCDF_F_VERSION}.tar.gz
cd netcdf-fortran-${NETCDF_F_VERSION}
autoreconf -i
FC=mpiifort CC=mpiicc \
CPPFLAGS="-I$(nc-config --includedir)" \
LDFLAGS="-L$(nc-config --libdir)" \
./configure --prefix=/home/runner/NetCDF
make -j 8 install
NCLIBDIR=$(nc-config --libdir)
ln -sf ${NCLIBDIR}/libnetcdf.so /home/runner/NetCDF/lib/libnetcdf.so

- name: Build MPAS Standalone (make)
if: matrix.build-system == 'make'
Expand Down
172 changes: 172 additions & 0 deletions .github/workflows/build_mpas_intel_stoch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: Build (Intel) MPAS Stochastic

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@v6

- 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/ci-install-intel-toolkit@ufs-community-mpas-ci-v2.0
with:
install-mpi: true
install-oneapi: false
mpi-wrapper-setup: classic
install-mkl: true

- name: Cache Intel
id: cache-INTEL
uses: actions/cache@v5
with:
path: /opt/intel/oneapi/mpi/2021.10.0
key: cache-Intel-MPI-${{matrix.fortran-compiler}}-${{matrix.build-system}}-key

- name: Install NetCDF-C library
run: |
sudo apt-get update
sudo apt-get install libnetcdf-dev

- name: Cache NetCDF-Fortran
id: cache-netcdf-fortran
uses: actions/cache@v4
with:
path: /home/runner/NetCDF
key: cache-NetCDF-Fortran-${{matrix.fortran-compiler}}-${{matrix.build-system}}-key

- name: Cache GNU autotools
id: cache-AUTOTOOLS
uses: actions/cache@v5
with:
path: /home/runner/AUTOTOOLS
key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-${{matrix.build-system}}-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@v5
with:
path: /home/runner/PnetCDF
key: cache-PnetCDF-${{matrix.fortran-compiler}}-${{matrix.build-system}}-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
echo "NETCDF=/home/runner/NetCDF" >> $GITHUB_ENV

- name: Build NetCDF-Fortran
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
NETCDF_F_VERSION=4.6.1
wget -q https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v${NETCDF_F_VERSION}.tar.gz
tar -xf v${NETCDF_F_VERSION}.tar.gz
cd netcdf-fortran-${NETCDF_F_VERSION}
autoreconf -i
FC=mpiifort CC=mpiicc \
CPPFLAGS="-I$(nc-config --includedir)" \
LDFLAGS="-L$(nc-config --libdir)" \
./configure --prefix=/home/runner/NetCDF
make -j 8 install
NCLIBDIR=$(nc-config --libdir)
ln -sf ${NCLIBDIR}/libnetcdf.so /home/runner/NetCDF/lib/libnetcdf.so

- 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 STOCHASTIC_PHYSICS=true AUTOCLEAN=true

- 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 -DSTOCHASTIC_PHYSICS=ON -DMPAS_CORES="init_atmosphere;atmosphere" ..
make -j8
Loading
Loading