Skip to content

Commit 51b2546

Browse files
committed
Merge tag 'v3.14.1-pdaf-upstream' into tsmp-pdaf-patched
2 parents 71d9009 + 03047c2 commit 51b2546

41 files changed

Lines changed: 2630 additions & 227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux.yml

Lines changed: 116 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
name: ParFlow CI Test
1+
name: Linux CI Tests
22

33
on: [push, pull_request]
44

55
jobs:
66
style-check:
7-
runs-on: ubuntu-22.04
7+
# Runs a check on C and Python coding style. Code
8+
# should not be merged unless the style check passes.
9+
runs-on: ubuntu-24.04
810
name: Check Style
911
steps:
1012
- name: Checkout commit
@@ -23,7 +25,7 @@ jobs:
2325
cache-parflow-style-hit: ${{steps.cache-parflow-style-dependencies.outputs.cache-hit}}
2426
with:
2527
path: "~/depend"
26-
key: cache-check-style-${{ secrets.CACHE_VERSION }}
28+
key: cache-check-style-${{ hashfiles('**/.github/workflows/linux.yml') }}
2729

2830
- name: Directory Setup
2931
run: |
@@ -54,13 +56,13 @@ jobs:
5456
CACHE_HIT: ${{steps.cache-parflow-style-dependencies.outputs.cache-hit}}
5557
run: |
5658
if [[ "$CACHE_HIT" != 'true' ]]; then
57-
echo "cache-check-style-${{ secrets.CACHE_VERSION }}" > $HOME/depend/cache-key
59+
echo "cache-check-style-${{ hashfiles('**/.github/workflows/linux.yml') }}" > $HOME/depend/cache-key
5860
curl -L -o uncrustify-0.79.0.tar.gz https://github.com/uncrustify/uncrustify/archive/uncrustify-0.79.0.tar.gz
5961
tar -xf uncrustify-0.79.0.tar.gz
6062
cd uncrustify-uncrustify-0.79.0
6163
mkdir build
6264
cd build
63-
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
65+
cmake -DCMAKE_INSTALL_PREFIX=${PARFLOW_DEP_DIR} ..
6466
make
6567
sudo make -j 2 install
6668
cd ../..
@@ -75,7 +77,7 @@ jobs:
7577
echo "Installing"
7678
mkdir -p $HOME/depend/{include,lib}
7779
cd $HOME/depend
78-
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}" > $HOME/depend/cache-key
80+
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/linux.yml') }}" > $HOME/depend/cache-key
7981
wget -nv --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.tar.gz
8082
tar -xf cmake-3.25.1-linux-x86_64.tar.gz
8183
$HOME/depend/cmake-3.25.1-linux-x86_64/bin/cmake --version
@@ -97,6 +99,17 @@ jobs:
9799
strategy:
98100
# fail-fast: true
99101
matrix:
102+
# Basic philosophy is to check builds with different compilers, backends
103+
# and OS.
104+
# 1) Should retain checks for GCC and LLVM
105+
# 2) Should at minimum check OMP, CUDA, and Kokkos backends
106+
# 3) Most checks an be run on the same version of Ubuntu but at least one older
107+
# version should be retained to verify we still run on older systems.
108+
# 4) Should check Python build, currently we retain non-Python build but
109+
# the non-Python build may be deprecated
110+
#
111+
# Other builds maybe included to test other configuration options as deemed
112+
# useful.
100113
config:
101114
- {
102115
name: "Ubuntu 24.04 GCC",
@@ -107,7 +120,8 @@ jobs:
107120
backend: "none",
108121
amps_layer: mpi1,
109122
netcdf: "true",
110-
memory_manager: "none"
123+
memory_manager: "none",
124+
pdi: "false"
111125
}
112126
- {
113127
name: "Ubuntu 24.04 LLVM",
@@ -118,7 +132,8 @@ jobs:
118132
backend: "none",
119133
amps_layer: mpi1,
120134
netcdf: "true",
121-
memory_manager: "none"
135+
memory_manager: "none",
136+
pdi: "false"
122137
}
123138
- {
124139
name: "Ubuntu 22.04 GCC Python",
@@ -129,7 +144,8 @@ jobs:
129144
backend: "none",
130145
amps_layer: mpi1,
131146
netcdf: "true",
132-
memory_manager: "none"
147+
memory_manager: "none",
148+
pdi: "false"
133149
}
134150
- {
135151
name: "Ubuntu 24.04 GCC Python",
@@ -140,29 +156,32 @@ jobs:
140156
backend: "none",
141157
amps_layer: mpi1,
142158
netcdf: "false",
143-
memory_manager: "none"
159+
memory_manager: "none",
160+
pdi: "false"
144161
}
145162
- {
146-
name: "Ubuntu 22.04 GCC OMP",
147-
os: ubuntu-22.04,
148-
cudaos: 'ubuntu2204',
163+
name: "Ubuntu 24.04 GCC OMP",
164+
os: ubuntu-24.04,
165+
cudaos: 'ubuntu2404',
149166
cc: "gcc", cxx: "g++", fc: "gfortran",
150167
python: "false",
151168
backend: "omp",
152169
amps_layer: mpi1,
153170
netcdf: "false",
154-
memory_manager: "none"
171+
memory_manager: "none",
172+
pdi: "false"
155173
}
156174
- {
157175
name: "Ubuntu 24.04 LLVM OASIS3-MCT Build",
158176
os: ubuntu-24.04,
159-
cudaos: 'ubuntu2204',
177+
cudaos: 'ubuntu2404',
160178
cc: "clang-18", cxx: "clang++-18", fc: "gfortran",
161179
python: "false",
162180
backend: "omp",
163181
amps_layer: oas3,
164182
netcdf: "true",
165-
memory_manager: "none"
183+
memory_manager: "none",
184+
pdi: "false"
166185
}
167186
# - {
168187
# name: "Ubuntu 24.04 GCC CUDA/RMM Build",
@@ -181,10 +200,11 @@ jobs:
181200
cc: "gcc", cxx: "g++", fc: "gfortran",
182201
python: "false",
183202
backend: "cuda",
184-
cudaos: 'ubuntu2204',
203+
cudaos: 'ubuntu2404',
185204
amps_layer: mpi1,
186205
netcdf: "false",
187-
memory_manager: "umpire"
206+
memory_manager: "umpire",
207+
pdi: "false"
188208
}
189209
# - {
190210
# name: "Ubuntu 24.04 GCC Kokkos/RMM Build",
@@ -203,10 +223,23 @@ jobs:
203223
cc: "gcc", cxx: "g++", fc: "gfortran",
204224
python: "false",
205225
backend: "kokkos",
206-
cudaos: 'ubuntu2204',
226+
cudaos: 'ubuntu2404',
207227
amps_layer: mpi1,
208228
netcdf: "false",
209-
memory_manager: "umpire"
229+
memory_manager: "umpire",
230+
pdi: "false"
231+
}
232+
- {
233+
name: "Ubuntu 24.04 GCC PDI Build",
234+
os: ubuntu-24.04,
235+
cudaos: 'ubuntu2404',
236+
cc: "gcc", cxx: "g++", fc: "gfortran",
237+
python: "false",
238+
backend: "none",
239+
amps_layer: mpi1,
240+
netcdf: "false",
241+
memory_manager: "none",
242+
pdi: "true"
210243
}
211244

212245
steps:
@@ -241,10 +274,6 @@ jobs:
241274
sudo apt-get -qq update
242275
sudo apt -qq install python3 python3-venv
243276
244-
# Cache dependencies so don't have to rebuild on each test.
245-
# Can flush caches by resetting the CACHE_VERSION secret on GitHub
246-
# settings for the project (using date-timestamp for secret).
247-
248277
- name: Cache dependencies
249278
uses: actions/cache@v4
250279
id: cache-parflow-dependencies
@@ -253,7 +282,7 @@ jobs:
253282
cache-parflow-hit: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
254283
with:
255284
path: "~/depend"
256-
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ matrix.config.memory_manager }}-${{ secrets.CACHE_VERSION }}
285+
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ matrix.config.memory_manager }}-${{ matrix.config.pdi }}-${{ hashfiles('**/.github/workflows/linux.yml') }}
257286

258287
- name: Directory Setup
259288
run: |
@@ -298,34 +327,20 @@ jobs:
298327
if [[ "$CACHE_HIT" != 'true' ]]; then
299328
echo "Installing CMake v3.26.5"
300329
cd $HOME/depend
301-
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}" > $HOME/depend/cache-key
330+
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/linux.yml') }}" > $HOME/depend/cache-key
302331
wget -nv --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.26.5/cmake-3.26.5-linux-x86_64.tar.gz
303332
tar -xf cmake-3.26.5-linux-x86_64.tar.gz
304333
$HOME/depend/cmake-3.26.5-linux-x86_64/bin/cmake --version
305334
fi
306335
echo "$HOME/depend/cmake-3.26.5-linux-x86_64/bin" >> $GITHUB_PATH
307336
308-
- name: NVidia Driver Install
337+
- name: NVidia compiler and CUDA toolkit Install
309338
if: matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos'
310-
run: |
311-
sudo add-apt-repository -y ppa:graphics-drivers
312-
sudo apt-get update -qq
313-
sudo apt-get install -y nvidia-driver-535
314-
315-
- name: CUDA Install
316-
if: matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos'
317-
run: |
318-
export CUDA_VERSION_MAJOR_MINOR=12.4.0
319-
export CUDA_SHORT=12.4
320-
export CUDA_OS=${{ matrix.config.cudaos }}
321-
./bin/install-cuda.sh
322-
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
323-
echo "CUDA_HOME=${CUDA_HOME}" >> $GITHUB_ENV
324-
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
325-
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
326-
export LIBRARY_PATH=${CUDA_HOME}/lib64/stubs
327-
echo "LIBRARY_PATH=${LIBRARY_PATH}" >> $GITHUB_ENV
328-
echo "${CUDA_HOME}/bin" >> $GITHUB_PATH
339+
uses: awalsh128/cache-apt-pkgs-action@latest
340+
with:
341+
packages: nvidia-cuda-toolkit nvidia-cuda-dev
342+
version: 1.0
343+
execute_install_scripts: true
329344

330345
- name: UCX
331346
if: matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos'
@@ -364,13 +379,14 @@ jobs:
364379
if: (matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos') && matrix.config.memory_manager == 'umpire'
365380
run: |
366381
if [[ "$CACHE_HIT" != 'true' ]]; then
367-
git clone --recursive https://github.com/LLNL/Umpire.git
382+
git clone -b v2025.03.1 --recursive https://github.com/LLNL/Umpire.git
368383
cd Umpire
369-
mkdir build
370-
cd build
371-
cmake ../ -DCMAKE_INSTALL_PREFIX=$PARFLOW_DEP_DIR/Umpire -DENABLE_CUDA=On
372-
make
373-
make install
384+
cmake -S . -B build \
385+
-DCMAKE_CXX_COMPILER=mpicxx \
386+
-DCMAKE_INSTALL_PREFIX="${PARFLOW_DEP_DIR}/Umpire" \
387+
-DENABLE_CUDA="ON"
388+
cmake --build build --parallel 4
389+
cmake --install build
374390
fi
375391
echo "UMPIRE_FLAGS=-Dumpire_ROOT=$PARFLOW_DEP_DIR/Umpire" >> $GITHUB_ENV
376392
@@ -469,15 +485,54 @@ jobs:
469485
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
470486
run: |
471487
if [[ "$CACHE_HIT" != 'true' ]]; then
472-
URL=https://github.com/hypre-space/hypre/archive/v2.26.0.tar.gz
473-
mkdir hypre
474-
cd hypre
488+
# Download
489+
wget https://github.com/hypre-space/hypre/archive/v2.33.0.tar.gz
490+
tar xf v2.33.0.tar.gz && cd hypre-2.33.0
491+
492+
# Set Hypre accelerator backend
493+
if [[ "${{ matrix.config.backend }}" == "cuda" ]]; then
494+
HAS_CUDA="ON"
495+
BACKEND="CUDA"
496+
else
497+
HAS_CUDA="OFF"
498+
BACKEND=""
499+
fi
500+
501+
# Install Hypre. See https://hypre.readthedocs.io/en/latest/ch-misc.html#build-system-options
502+
cmake -S src -B build \
503+
-DCMAKE_C_COMPILER=mpicc \
504+
-DCMAKE_CXX_COMPILER=mpicxx \
505+
-DCMAKE_INSTALL_PREFIX="${PARFLOW_DEP_DIR}" \
506+
-DHYPRE_ENABLE_MPI="ON" \
507+
-DHYPRE_ENABLE_CUDA="${HAS_CUDA}"
508+
cmake --build build --parallel 4
509+
cmake --install build
510+
echo "" && echo "Successfully built Hypre ${BACKEND}"
511+
fi
512+
513+
- name: PDI Install
514+
env:
515+
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
516+
if: matrix.config.pdi == 'true'
517+
run: |
518+
if [[ "$CACHE_HIT" != 'true' ]]; then
519+
PDI_VERSION="1.8.1"
520+
URL="https://github.com/pdidev/pdi/archive/refs/tags/1.8.1.tar.gz"
521+
export curr_pdi=$(pwd)
522+
mkdir -p pdi
523+
cd pdi
475524
curl -L $URL | tar --strip-components=1 -xz
476-
cd src
477-
./configure --prefix=$PARFLOW_DEP_DIR
525+
# Configure and install PDI
526+
mkdir build install
527+
cd build
528+
cmake .. -DCMAKE_INSTALL_PREFIX=${PARFLOW_DEP_DIR}
478529
make -j 2 install
479530
fi
480531
532+
export LD_LIBRARY_PATH=${PARFLOW_DEP_DIR}/pdi/install/lib:${LD_LIBRARY_PATH}
533+
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
534+
echo "PDI_FLAGS=-DPDI_ROOT=${PARFLOW_DEP_DIR}/pdi/install" >> $GITHUB_ENV
535+
481536
- name: ParFlow CMake Configure
482537
run: |
483538
cat $HOME/depend/cache-key
@@ -496,21 +551,23 @@ jobs:
496551
-DPARFLOW_AMPS_LAYER=${{ matrix.config.amps_layer }} \
497552
-DMPIEXEC_POSTFLAGS='--oversubscribe' \
498553
-DPARFLOW_ACCELERATOR_BACKEND=${{ matrix.config.backend }} \
554+
-DCMAKE_CUDA_ARCHITECTURES="60;70;75;80" \
499555
-DPARFLOW_AMPS_SEQUENTIAL_IO=true \
500556
-DPARFLOW_HAVE_CLM=${HAVE_CLM} \
501557
-DHYPRE_ROOT=$PARFLOW_DEP_DIR \
502558
-DOAS3_ROOT=$PARFLOW_DEP_DIR \
503559
-DSILO_ROOT=$PARFLOW_DEP_DIR \
504560
-DPARFLOW_ENABLE_PYTHON=${{ matrix.config.python }} \
505561
-DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR \
506-
$NETCDF_FLAGS $KOKKOS_FLAGS $RMM_FLAGS $UMPIRE_FLAGS
562+
$NETCDF_FLAGS $KOKKOS_FLAGS $RMM_FLAGS $UMPIRE_FLAGS $PDI_FLAGS
507563
508564
- name: ParFlow CMake Build
509565
run: (cd build; make -j 2 install)
510566

511567
# Can't test with GPU since have no GPU hardware on testing nodes, GPU test is build only
568+
# PDI testing requires a configuration file for specification tree, so for now, it is only being built and not tested.
512569
- name: ParFlow CTest
513-
if: matrix.config.backend != 'cuda' && matrix.config.backend != 'kokkos'
570+
if: matrix.config.backend != 'cuda' && matrix.config.backend != 'kokkos' && matrix.config.pdi != 'true'
514571
run: |
515572
export OMPI_MCA_rmaps_base_oversubscribe=1
516573
export OMP_NUM_THREADS=1

.github/workflows/macos.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ParFlow MacOS CI Test
1+
name: MacOS CI Tests
22

33
#
44
# Notes
@@ -45,10 +45,6 @@ jobs:
4545
run: |
4646
brew link tcl-tk@8
4747
48-
# Cache dependencies so don't have to rebuild on each test.
49-
# Can flush caches by resetting the CACHE_VERSION secret on GitHub
50-
# settings for the project (using date-timestamp for secret).
51-
5248
- name: Cache dependencies
5349
uses: actions/cache@v4
5450
id: cache-parflow-dependencies
@@ -57,7 +53,7 @@ jobs:
5753
cache-parflow-hit: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
5854
with:
5955
path: "~/depend"
60-
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}
56+
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/macos.yml') }}
6157

6258
- name: Directory Setup
6359
run: |
@@ -82,7 +78,7 @@ jobs:
8278
if [[ "$CACHE_HIT" != 'true' ]]; then
8379
echo "Installing"
8480
cd ~/depend
85-
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}" > ~/depend/cache-key
81+
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/macos.yml') }}" > ~/depend/cache-key
8682
wget -nv --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.tar.gz
8783
tar -xf cmake-3.25.1-linux-x86_64.tar.gz
8884
$HOME/depend/cmake-3.25.1-linux-x86_64/bin/cmake --version

0 commit comments

Comments
 (0)