Skip to content

Commit 3af50a2

Browse files
committed
Merge commit '6f14cdbd' into tsmp-pdaf-patched
2 parents 51b2546 + 6f14cdb commit 3af50a2

261 files changed

Lines changed: 2402 additions & 5612 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: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,21 @@ jobs:
121121
amps_layer: mpi1,
122122
netcdf: "true",
123123
memory_manager: "none",
124-
pdi: "false"
124+
pdi: "false",
125+
sundials: "embedded"
126+
}
127+
- {
128+
name: "Ubuntu 24.04 GCC Sundials",
129+
os: ubuntu-24.04,
130+
cudaos: 'ubuntu2404',
131+
cc: "gcc", cxx: "g++", fc: "gfortran",
132+
python: "false",
133+
backend: "none",
134+
amps_layer: mpi1,
135+
netcdf: "true",
136+
memory_manager: "none",
137+
pdi: "false",
138+
sundials: "external"
125139
}
126140
- {
127141
name: "Ubuntu 24.04 LLVM",
@@ -133,7 +147,8 @@ jobs:
133147
amps_layer: mpi1,
134148
netcdf: "true",
135149
memory_manager: "none",
136-
pdi: "false"
150+
pdi: "false",
151+
sundials: "embedded"
137152
}
138153
- {
139154
name: "Ubuntu 22.04 GCC Python",
@@ -145,7 +160,8 @@ jobs:
145160
amps_layer: mpi1,
146161
netcdf: "true",
147162
memory_manager: "none",
148-
pdi: "false"
163+
pdi: "false",
164+
sundials: "embedded"
149165
}
150166
- {
151167
name: "Ubuntu 24.04 GCC Python",
@@ -157,7 +173,8 @@ jobs:
157173
amps_layer: mpi1,
158174
netcdf: "false",
159175
memory_manager: "none",
160-
pdi: "false"
176+
pdi: "false",
177+
sundials: "embedded"
161178
}
162179
- {
163180
name: "Ubuntu 24.04 GCC OMP",
@@ -169,7 +186,8 @@ jobs:
169186
amps_layer: mpi1,
170187
netcdf: "false",
171188
memory_manager: "none",
172-
pdi: "false"
189+
pdi: "false",
190+
sundials: "embedded"
173191
}
174192
- {
175193
name: "Ubuntu 24.04 LLVM OASIS3-MCT Build",
@@ -181,7 +199,8 @@ jobs:
181199
amps_layer: oas3,
182200
netcdf: "true",
183201
memory_manager: "none",
184-
pdi: "false"
202+
pdi: "false",
203+
sundials: "embedded"
185204
}
186205
# - {
187206
# name: "Ubuntu 24.04 GCC CUDA/RMM Build",
@@ -204,7 +223,8 @@ jobs:
204223
amps_layer: mpi1,
205224
netcdf: "false",
206225
memory_manager: "umpire",
207-
pdi: "false"
226+
pdi: "false",
227+
sundials: "embedded"
208228
}
209229
# - {
210230
# name: "Ubuntu 24.04 GCC Kokkos/RMM Build",
@@ -227,7 +247,8 @@ jobs:
227247
amps_layer: mpi1,
228248
netcdf: "false",
229249
memory_manager: "umpire",
230-
pdi: "false"
250+
pdi: "false",
251+
sundials: "embedded"
231252
}
232253
- {
233254
name: "Ubuntu 24.04 GCC PDI Build",
@@ -239,7 +260,8 @@ jobs:
239260
amps_layer: mpi1,
240261
netcdf: "false",
241262
memory_manager: "none",
242-
pdi: "true"
263+
pdi: "true",
264+
sundials: "embedded"
243265
}
244266

245267
steps:
@@ -363,7 +385,7 @@ jobs:
363385
if: (matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos') && matrix.config.memory_manager == 'rmm'
364386
run: |
365387
if [[ "$CACHE_HIT" != 'true' ]]; then
366-
git clone --branch main --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git
388+
git clone --depth 1 -b v25.08.00 --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git
367389
cd rmm
368390
mkdir build
369391
cd build
@@ -379,7 +401,7 @@ jobs:
379401
if: (matrix.config.backend == 'cuda' || matrix.config.backend == 'kokkos') && matrix.config.memory_manager == 'umpire'
380402
run: |
381403
if [[ "$CACHE_HIT" != 'true' ]]; then
382-
git clone -b v2025.03.1 --recursive https://github.com/LLNL/Umpire.git
404+
git clone --depth 1 -b v2025.03.1 --single-branch --recursive https://github.com/LLNL/Umpire.git
383405
cd Umpire
384406
cmake -S . -B build \
385407
-DCMAKE_CXX_COMPILER=mpicxx \
@@ -472,11 +494,11 @@ jobs:
472494
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
473495
run: |
474496
if [[ "$CACHE_HIT" != 'true' ]]; then
475-
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.11.tar.gz
497+
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.11.1.tar.gz
476498
mkdir silo
477499
cd silo
478500
curl -L $URL | tar --strip-components=1 -xz
479-
./configure --disable-silex --disable-hzip --disable-fpzip --prefix=$PARFLOW_DEP_DIR
501+
./configure --disable-silex --disable-hzip --disable-fpzip --enable-shared=yes --prefix=$PARFLOW_DEP_DIR
480502
make -j 2 install
481503
fi
482504
@@ -499,7 +521,7 @@ jobs:
499521
fi
500522
501523
# Install Hypre. See https://hypre.readthedocs.io/en/latest/ch-misc.html#build-system-options
502-
cmake -S src -B build \
524+
cmake -S src -B build \
503525
-DCMAKE_C_COMPILER=mpicc \
504526
-DCMAKE_CXX_COMPILER=mpicxx \
505527
-DCMAKE_INSTALL_PREFIX="${PARFLOW_DEP_DIR}" \
@@ -510,6 +532,25 @@ jobs:
510532
echo "" && echo "Successfully built Hypre ${BACKEND}"
511533
fi
512534
535+
- name: Sundials Install
536+
env:
537+
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
538+
if: matrix.config.sundials == 'external'
539+
run: |
540+
if [[ "$CACHE_HIT" != 'true' ]]; then
541+
# Download
542+
wget https://github.com/llnl/sundials/archive/v7.4.0.tar.gz
543+
tar xf v7.4.0.tar.gz
544+
cd sundials-7.4.0
545+
cmake -S . -B build \
546+
-DCMAKE_C_COMPILER=mpicc \
547+
-DCMAKE_CXX_COMPILER=mpicxx \
548+
-DCMAKE_INSTALL_PREFIX="${PARFLOW_DEP_DIR}"
549+
cmake --build build --parallel 4
550+
cmake --install build
551+
echo "SUNDIALS_FLAGS=-DSUNDIALS_ROOT=${PARFLOW_DEP_DIR}" >> $GITHUB_ENV
552+
fi
553+
513554
- name: PDI Install
514555
env:
515556
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
@@ -559,7 +600,7 @@ jobs:
559600
-DSILO_ROOT=$PARFLOW_DEP_DIR \
560601
-DPARFLOW_ENABLE_PYTHON=${{ matrix.config.python }} \
561602
-DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR \
562-
$NETCDF_FLAGS $KOKKOS_FLAGS $RMM_FLAGS $UMPIRE_FLAGS $PDI_FLAGS
603+
$NETCDF_FLAGS $KOKKOS_FLAGS $RMM_FLAGS $UMPIRE_FLAGS $PDI_FLAGS $SUNDIALS_FLAGS
563604
564605
- name: ParFlow CMake Build
565606
run: (cd build; make -j 2 install)

.github/workflows/macos.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: MacOS CI Tests
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

@@ -27,9 +27,10 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@v4
30+
3031
- uses: actions/setup-python@v5
3132
with:
32-
python-version: '3.12'
33+
python-version: '3.13'
3334
- uses: fortran-lang/setup-fortran@v1
3435
with:
3536
compiler: gcc
@@ -67,8 +68,10 @@ jobs:
6768
echo "$HOME/depend/bin" >> $GITHUB_PATH
6869
export LD_LIBRARY_PATH=${PARFLOW_DEP_DIR}/lib64:${PARFLOW_DEP_DIR}/lib:${LD_LIBRARY_PATH}
6970
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
70-
export PARFLOW_PYTHON3=/opt/homebrew/bin/python3.12
71+
export PARFLOW_PYTHON3=/opt/homebrew/bin/python3.13
7172
echo "PARFLOW_PYTHON3=${PARFLOW_PYTHON3}" >> $GITHUB_ENV
73+
echo "Python version:"
74+
$PARFLOW_PYTHON3 --version
7275
7376
- name: CMake Install
7477
if: matrix.config.os != 'macos-14'
@@ -98,7 +101,7 @@ jobs:
98101
cd netcdf-c
99102
curl -L $URL | tar --strip-components=1 -xz
100103
CC=mpicc CPPFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib/ ./configure --prefix=$PARFLOW_DEP_DIR
101-
make
104+
make -j 3
102105
make install
103106
cd ..
104107
@@ -107,7 +110,7 @@ jobs:
107110
cd netcdf-fortran
108111
curl -L $URL | tar --strip-components=1 -xz
109112
CC=mpicc FC=mpifort CPPFLAGS=-I${PARFLOW_DEP_DIR}/include LDFLAGS=-L${PARFLOW_DEP_DIR}/lib ./configure --prefix=${PARFLOW_DEP_DIR}
110-
make
113+
make -j 3
111114
make install
112115
fi
113116
echo "NETCDF_FLAGS=-DNETCDF_DIR=$PARFLOW_DEP_DIR -DPARFLOW_ENABLE_HDF5=TRUE" >> $GITHUB_ENV
@@ -117,12 +120,12 @@ jobs:
117120
CACHE_HIT: ${{steps.cache-parflow-dependencies.outputs.cache-hit}}
118121
run: |
119122
if [[ "$CACHE_HIT" != 'true' ]]; then
120-
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.11.tar.gz
123+
URL=https://github.com/LLNL/Silo/archive/refs/tags/4.11.1.tar.gz
121124
mkdir silo
122125
cd silo
123126
curl -L $URL | tar --strip-components=1 -xz
124-
./configure --disable-silex --disable-hzip --disable-fpzip --prefix=$PARFLOW_DEP_DIR --disable-fortran --with-readline=no
125-
make -j 2 install
127+
./configure --disable-silex --disable-hzip --disable-fpzip --enable-shared=yes --disable-fortran --with-readline=no --prefix=$PARFLOW_DEP_DIR
128+
make -j 3 install
126129
fi
127130
128131
- name: HYPRE Install
@@ -136,7 +139,7 @@ jobs:
136139
curl -L $URL | tar --strip-components=1 -xz
137140
cd src
138141
CC=mpicc CXX=mpic++ FC=mpif77 F77=mpif90 ./configure --prefix=$PARFLOW_DEP_DIR
139-
make -j 2 install
142+
make -j 3 install
140143
fi
141144
142145
- name: ParFlow CMake Configure
@@ -148,7 +151,7 @@ jobs:
148151
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
149152
150153
- name: ParFlow CMake Build
151-
run: (cd build; make -j 2 VERBOSE=1 install)
154+
run: (cd build; make -j 3 VERBOSE=1 install)
152155

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

.github/workflows/self_hosted.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
module purge
3939
module load cudatoolkit/12.6
4040
module load openmpi/cuda-12.6/gcc/4.1.6
41-
git clone --branch main --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git
41+
git clone --depth 1 -b v25.08.00 --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git
4242
cd rmm
4343
mkdir build && cd build
4444
cmake .. -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depend/rmm -DBUILD_TESTS=OFF
@@ -52,7 +52,7 @@ jobs:
5252
module purge
5353
module load cudatoolkit/12.6
5454
module load openmpi/cuda-12.6/gcc/4.1.6
55-
git clone --recursive https://github.com/LLNL/Umpire.git
55+
git clone --depth 1 -b v2025.03.1 --recursive https://github.com/LLNL/Umpire.git
5656
module list
5757
cd Umpire
5858
mkdir build && cd build

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,13 @@ endif (${PARFLOW_ENABLE_SZLIB} OR DEFINED SZLIB_ROOT)
374374
#-----------------------------------------------------------------------------
375375
option(PARFLOW_ENABLE_SUNDIALS "Build with SUNDIALS" "OFF")
376376
if (${PARFLOW_ENABLE_SUNDIALS} OR DEFINED SUNDIALS_ROOT)
377-
find_package(SUNDIALS COMPONENTS sundials_cvode sundials_kinsol)
377+
find_package(SUNDIALS COMPONENTS sundials_cvode sundials_kinsol sundials_core sundials_sunlinsolspgmr)
378378
if (${SUNDIALS_FOUND})
379379
set(PARFLOW_HAVE_SUNDIALS "yes")
380380
set(HAVE_SUNDIALS ${PARFLOW_HAVE_SUNDIALS})
381381
endif (${SUNDIALS_FOUND})
382+
else ()
383+
message (STATUS "Found KINSOL: embedded")
382384
endif (${PARFLOW_ENABLE_SUNDIALS} OR DEFINED SUNDIALS_ROOT)
383385

384386
#-----------------------------------------------------------------------------

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,21 @@ Here are some common packages:
361361
- __SZLIB__: builds ParFlow with SZlib compression library
362362
- __ZLIB__: builds ParFlow with Zlib compression library
363363

364+
### KINSOL Solver
365+
366+
There are two compile options for the KINSOL solver used by ParFlow.
367+
The current default is to use an old version of KINSOL that is
368+
embedded in ParFlow. The newer option is to use KINSOL from the
369+
SUNDIALS package. To use the SUNDIALS package you will need to have a
370+
SUNDIALS install that includes KINSOL and specify during the CMake configuration:
371+
372+
```shell
373+
-DSUNDIALS_ROOT=<directory of the location of sundials install>
374+
```
375+
376+
The GitHub repository for [SUNDIALS](https://github.com/LLNL/sundials)
377+
has downloads and build instructions.
378+
364379
### How to specify the launcher command used to run MPI applications
365380

366381
There are multiple ways to run MPI applications such as mpiexec,

0 commit comments

Comments
 (0)