Skip to content

Commit 79c779d

Browse files
committed
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-pdaf-CI
2 parents ea0c571 + fa51ec6 commit 79c779d

1,206 files changed

Lines changed: 17924 additions & 6442 deletions

File tree

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: 176 additions & 39 deletions
Large diffs are not rendered by default.

.github/workflows/macos.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
name: ParFlow MacOS CI Test
1+
name: MacOS CI Tests
22

33
#
44
# Notes
55
# Currently using GCC for the build rather than Clang
6-
# Python 3.12 used rather than more current available versions since Numba library does not work with later versions
6+
# Python 3.13 used rather than more current available versions since Numba library does not work with later versions
77

88
on: [push, pull_request]
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
build:
1216
name: ${{ matrix.config.name }}
@@ -27,9 +31,10 @@ jobs:
2731

2832
steps:
2933
- uses: actions/checkout@v4
34+
3035
- uses: actions/setup-python@v5
3136
with:
32-
python-version: '3.12'
37+
python-version: '3.13'
3338
- uses: fortran-lang/setup-fortran@v1
3439
with:
3540
compiler: gcc
@@ -45,10 +50,6 @@ jobs:
4550
run: |
4651
brew link tcl-tk@8
4752
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-
5253
- name: Cache dependencies
5354
uses: actions/cache@v4
5455
id: cache-parflow-dependencies
@@ -57,7 +58,7 @@ jobs:
5758
cache-parflow-hit: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
5859
with:
5960
path: "~/depend"
60-
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}
61+
key: cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/macos.yml') }}
6162

6263
- name: Directory Setup
6364
run: |
@@ -71,8 +72,10 @@ jobs:
7172
echo "$HOME/depend/bin" >> $GITHUB_PATH
7273
export LD_LIBRARY_PATH=${PARFLOW_DEP_DIR}/lib64:${PARFLOW_DEP_DIR}/lib:${LD_LIBRARY_PATH}
7374
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
74-
export PARFLOW_PYTHON3=/opt/homebrew/bin/python3.12
75+
export PARFLOW_PYTHON3=/opt/homebrew/bin/python3.13
7576
echo "PARFLOW_PYTHON3=${PARFLOW_PYTHON3}" >> $GITHUB_ENV
77+
echo "Python version:"
78+
$PARFLOW_PYTHON3 --version
7679
7780
- name: CMake Install
7881
if: matrix.config.os != 'macos-14'
@@ -82,7 +85,7 @@ jobs:
8285
if [[ "$CACHE_HIT" != 'true' ]]; then
8386
echo "Installing"
8487
cd ~/depend
85-
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ secrets.CACHE_VERSION }}" > ~/depend/cache-key
88+
echo "cache-${{ matrix.config.os }}-${{ matrix.config.backend }}-${{ hashfiles('**/.github/workflows/macos.yml') }}" > ~/depend/cache-key
8689
wget -nv --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1-linux-x86_64.tar.gz
8790
tar -xf cmake-3.25.1-linux-x86_64.tar.gz
8891
$HOME/depend/cmake-3.25.1-linux-x86_64/bin/cmake --version
@@ -102,7 +105,7 @@ jobs:
102105
cd netcdf-c
103106
curl -L $URL | tar --strip-components=1 -xz
104107
CC=mpicc CPPFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib/ ./configure --prefix=$PARFLOW_DEP_DIR
105-
make
108+
make -j 3
106109
make install
107110
cd ..
108111
@@ -111,7 +114,7 @@ jobs:
111114
cd netcdf-fortran
112115
curl -L $URL | tar --strip-components=1 -xz
113116
CC=mpicc FC=mpifort CPPFLAGS=-I${PARFLOW_DEP_DIR}/include LDFLAGS=-L${PARFLOW_DEP_DIR}/lib ./configure --prefix=${PARFLOW_DEP_DIR}
114-
make
117+
make -j 3
115118
make install
116119
fi
117120
echo "NETCDF_FLAGS=-DNETCDF_DIR=$PARFLOW_DEP_DIR -DPARFLOW_ENABLE_HDF5=TRUE" >> $GITHUB_ENV
@@ -121,26 +124,26 @@ jobs:
121124
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
122125
run: |
123126
if [[ "$CACHE_HIT" != 'true' ]]; then
124-
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.11.tar.gz
127+
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.12.0.tar.gz
125128
mkdir silo
126129
cd silo
127130
curl -L $URL | tar --strip-components=1 -xz
128-
./configure --disable-silex --disable-hzip --disable-fpzip --prefix=$PARFLOW_DEP_DIR --disable-fortran --with-readline=no
129-
make -j 2 install
131+
./configure --disable-silex --disable-hzip --disable-fpzip --enable-shared=yes --disable-fortran --with-readline=no --prefix=$PARFLOW_DEP_DIR
132+
make -j 3 install
130133
fi
131134
132135
- name: HYPRE Install
133136
env:
134137
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
135138
run: |
136139
if [[ "$CACHE_HIT" != 'true' ]]; then
137-
URL=https://github.com/hypre-space/hypre/archive/v2.26.0.tar.gz
140+
URL=https://github.com/hypre-space/hypre/archive/v2.33.0.tar.gz
138141
mkdir hypre
139142
cd hypre
140143
curl -L $URL | tar --strip-components=1 -xz
141144
cd src
142145
CC=mpicc CXX=mpic++ FC=mpif77 F77=mpif90 ./configure --prefix=$PARFLOW_DEP_DIR
143-
make -j 2 install
146+
make -j 3 install
144147
fi
145148
146149
- name: ParFlow CMake Configure
@@ -152,7 +155,7 @@ jobs:
152155
CC=mpicc CXX=mpicxx F77=mpif77 FC=mpif90 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Wall -Werror -Wno-unused-result -Wno-unused-function" -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_AMPS_LAYER=${{ matrix.config.amps_layer }} -DPARFLOW_ACCELERATOR_BACKEND=${{ matrix.config.backend }} -DPARFLOW_AMPS_SEQUENTIAL_IO=true -DPARFLOW_HAVE_CLM=${HAVE_CLM} -DHYPRE_ROOT=$PARFLOW_DEP_DIR -DOAS3_ROOT=$PARFLOW_DEP_DIR -DSILO_ROOT=$PARFLOW_DEP_DIR -DPARFLOW_ENABLE_PYTHON=${{ matrix.config.python }} $NETCDF_FLAGS $KOKKOS_FLAGS $RMM_FLAGS -DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR -DTCL_INCLUDE_PATH=/opt/homebrew/bin/usr/include -DTCL_LIBRARY=/opt/homebrew/lib/libtcl8.6.dylib -DTCL_TCLSH=/opt/homebrew/bin/tclsh8.6 -DPython3_EXECUTABLE=$PARFLOW_PYTHON3
153156
154157
- name: ParFlow CMake Build
155-
run: (cd build; make -j 2 VERBOSE=1 install)
158+
run: (cd build; make -j 3 VERBOSE=1 install)
156159

157160
# Can't test with GPU since have no GPU hardware on testing nodes, GPU test is build only
158161
- name: ParFlow CTest

.github/workflows/self_hosted.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: GPU CI Tests
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
test-gpu:
11+
# only run GPU test if in parflow project
12+
if: github.repository == 'parflow/parflow'
13+
name: ${{ matrix.config.name }}
14+
runs-on: self-hosted
15+
strategy:
16+
matrix:
17+
config:
18+
# - {
19+
# name: "Self-Hosted CUDA/RMM",
20+
# memory_manager: "rmm"
21+
# }
22+
- {
23+
name: "Self-Hosted CUDA/Umpire",
24+
memory_manager: "umpire"
25+
}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Directory Setup
31+
run: |
32+
mkdir -p ${{ github.workspace }}/install ${{ github.workspace }}/depend/{include,lib,lib64,bin}
33+
echo "PARFLOW_DIR=${{ github.workspace }}/install" >> $GITHUB_ENV
34+
echo "PARFLOW_DEP_DIR=${{ github.workspace }}/depend" >> $GITHUB_ENV
35+
echo "LD_LIBRARY_PATH=${{ github.workspace }}/depend/lib:${{ github.workspace }}/depend/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
36+
echo "${{ github.workspace }}/depend/bin" >> $GITHUB_PATH
37+
echo "${{ github.workspace }}/install/bin" >> $GITHUB_PATH
38+
39+
- name: Install RMM
40+
if: matrix.config.memory_manager == 'rmm'
41+
run: |
42+
module purge
43+
module load cudatoolkit/12.6
44+
module load openmpi/cuda-12.6/gcc/4.1.6
45+
git clone --depth 1 -b v25.08.00 --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git
46+
cd rmm
47+
mkdir build && cd build
48+
cmake .. -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depend/rmm -DBUILD_TESTS=OFF
49+
make -j
50+
make install
51+
echo "RMM_FLAGS=-DRMM_ROOT=$GITHUB_WORKSPACE/depend/rmm" >> $GITHUB_ENV
52+
53+
- name: Install Umpire
54+
if: matrix.config.memory_manager == 'umpire'
55+
run: |
56+
module purge
57+
module load cudatoolkit/12.6
58+
module load openmpi/cuda-12.6/gcc/4.1.6
59+
git clone --depth 1 -b v2025.03.1 --recursive https://github.com/LLNL/Umpire.git
60+
module list
61+
cd Umpire
62+
mkdir build && cd build
63+
cmake .. -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depend/Umpire -DENABLE_CUDA=On
64+
make -j
65+
make install
66+
echo "UMPIRE_FLAGS=-DUMPIRE_ROOT=$GITHUB_WORKSPACE/depend/Umpire" >> $GITHUB_ENV
67+
68+
- name: Configure ParFlow
69+
run: |
70+
module purge
71+
module load anaconda3/2024.6
72+
module load cudatoolkit/12.6
73+
module load openmpi/cuda-12.6/gcc/4.1.6
74+
cmake -Bbuild \
75+
-DCMAKE_BUILD_TYPE=Release \
76+
-DPARFLOW_ENABLE_TIMING=TRUE \
77+
-DPARFLOW_AMPS_LAYER=mpi1 \
78+
-DPARFLOW_ACCELERATOR_BACKEND=cuda \
79+
-DCMAKE_C_FLAGS=-lcuda \
80+
-DPARFLOW_AMPS_SEQUENTIAL_IO=TRUE \
81+
-DPARFLOW_HAVE_CLM=ON \
82+
-DPARFLOW_ENABLE_PYTHON=TRUE \
83+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
84+
-DCMAKE_CUDA_ARCHITECTURES=90 \
85+
$RMM_FLAGS $UMPIRE_FLAGS
86+
87+
- name: Build ParFlow
88+
run: |
89+
cd build
90+
make
91+
make install
92+
93+
- name: Run ParFlow Tests (GPU)
94+
run: |
95+
cd build
96+
ctest --output-on-failure

0 commit comments

Comments
 (0)