Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
df1532f
Add documentation on running NextGen on CONUS
stcui007 Apr 16, 2024
a7e5940
Correct some formatting errors
stcui007 Apr 16, 2024
448987c
Some minor format correction
stcui007 Apr 16, 2024
253c2c3
Reorder the sections a bit
stcui007 Apr 16, 2024
bb34ce5
Incorporate reviewer's comments
stcui007 Apr 19, 2024
69f9c44
Discussion on specifying output file directory
stcui007 Apr 22, 2024
bfc32f2
Minor corrections based on reviewer comments
stcui007 Apr 23, 2024
297e20c
Test CsvPerFeatureForcingProvider with base CatchmentAggrDataSelector…
PhilMiller Apr 30, 2024
a6c8a4f
Test NetCDFPerFeatureForcingProvider with base CatchmentAggrDataSelec…
PhilMiller Apr 30, 2024
ceb7c01
Delete defunct {CSV,BMI,NetCDF}DataSelector classes
PhilMiller Apr 30, 2024
dd66466
Delete never-implemented stub definition of AsyncDataProvider
PhilMiller Apr 30, 2024
a53a32a
Update csv2catchmentnetcdf.py issue #710
Ben-Choat Jan 18, 2024
c33fdaa
Abolish old NGEN_BMI_C_LIB_ACTIVE
PhilMiller May 3, 2024
01cd25b
Abolish old NGEN_BMI_FORTRAN_ACTIVE
PhilMiller May 3, 2024
f9f7d08
Print binary's built configuration before running
PhilMiller May 3, 2024
bd1e477
Include NGenConfig.h that provides new macros
PhilMiller May 3, 2024
09cf4d8
Include config header in Fortran files
PhilMiller May 3, 2024
2f5d3e0
CMake: Link config header into relevant source components
PhilMiller May 3, 2024
431852b
Header in fortran formulation
PhilMiller May 3, 2024
095bdfa
Correct testing of NGEN_WITH_FOO to #if instead of #ifdef
PhilMiller May 3, 2024
bdba108
Another missing include
PhilMiller May 3, 2024
7b48e54
Fix workflow change
PhilMiller May 3, 2024
153b832
Fix typo in macro
PhilMiller May 3, 2024
45ab529
More macro test fixes
PhilMiller May 3, 2024
a03b7dc
Remove old doc describing LSTM build, since that moved to its own repo
PhilMiller May 6, 2024
6ca743f
Replace uses of old macro NGEN_ROUTING_ACTIVE
PhilMiller May 6, 2024
3e187bc
Delete disused dockerfile
PhilMiller May 6, 2024
94836b3
Replace uses of old macro NGEN_MPI_ACTIVE
PhilMiller May 6, 2024
3711cfe
Replace uses of old macro NETCDF_ACTIVE
PhilMiller May 7, 2024
da2107a
Replace uses of old macro ACTIVATE_PYTHON with NGEN_WITH_PYTHON
PhilMiller May 7, 2024
1c6110d
Typo fix
PhilMiller May 7, 2024
8523c17
Link routing adapter against config header
PhilMiller May 7, 2024
e3a5ec2
feat: example grid data selector
program-- Apr 15, 2024
b50839a
feat: more grid data selector constructors and tests
program-- Apr 22, 2024
a9c7645
GridDataSelector: add throw in boundary-based constructor as temporar…
program-- Apr 22, 2024
7edfcf3
GridDataSelector: point-based constructor impl
program-- Apr 22, 2024
6239645
GridDataSelector: cleanup unimplemented poylgon constructor and add t…
program-- Apr 23, 2024
1eacbd2
GridDataSelector: fix col/row indexing
program-- Apr 23, 2024
bd5d444
fix: try to fix overflow
program-- Apr 25, 2024
a5e2bea
fix: reserve -> resize and use vector::at instead of operator[]
program-- Apr 26, 2024
f47c4f9
tests: add documentation and a simple point test for GridDataSelector…
program-- Apr 26, 2024
6083e6d
fix: use std::array instead of implicit initializer list for coordina…
program-- Apr 26, 2024
cd05e9e
rev: remove redundant test assertion
program-- Apr 29, 2024
07b25f1
rev: address reviewer comments; feat: add boundary-constructor
program-- Apr 30, 2024
c854603
rev: modify ExtentSelection test lower bounds; add TODO about polygon…
program-- May 8, 2024
193ef67
fix(bmi): re-throw exceptions as std::runtime_error with original err…
hellkite500 Apr 20, 2024
3d8a357
Realization configs and routing config for ngen with routing
stcui007 Apr 26, 2024
518619f
Update documentation
stcui007 May 1, 2024
1b4b821
Add total time to the tables
stcui007 May 1, 2024
28f5885
Incorporate reviwer's suggestions
stcui007 May 6, 2024
c8682d0
Delete never-used Nexus_Manager code that uses class Formulation unex…
PhilMiller May 4, 2024
451c4c6
Test: Specify Catchment_Formulation when iterating over (catchment) F…
PhilMiller May 4, 2024
84d3681
Refactor: Move virtual get_response from Formulation to Catchment_For…
PhilMiller May 4, 2024
2712783
Refactor: Move virtual get_output_header_line from Formulation to Cat…
PhilMiller May 4, 2024
f504dbb
Refactor: Move virtual get_output_line_for_timestep from Formulation …
PhilMiller May 4, 2024
2d2ff55
Make non-overridden protected member functions non-virtual
PhilMiller May 4, 2024
f18b679
Bmi_Formulation: Share single copies of required and optional configu…
PhilMiller May 4, 2024
f943886
Refactor: consolidate duplicate implementations into Bmi_Module_Formu…
PhilMiller May 4, 2024
ecf035d
Refactor Bmi_Formulation: Share duplicate implementations of scalar g…
PhilMiller May 4, 2024
1dc985e
Remove scalar overload of get_var_value_as_double
PhilMiller May 7, 2024
feb0af0
Typo fix
PhilMiller May 7, 2024
332e5d7
Fix all instances of typo interperter
PhilMiller May 16, 2024
58a9bd0
Fix all instances of typo recieve
PhilMiller May 16, 2024
6114cd5
Drop 'using std::shared_ptr' from high-level header
PhilMiller May 16, 2024
70545d1
Routing test: Minor cleanups
PhilMiller May 20, 2024
1baa888
Fix NetCDF file close error running MPI
stcui007 May 10, 2024
dddde24
DataProvider: Add new virtual method finalize()
PhilMiller May 10, 2024
c8ba77d
Call down through new `DataProvider::finalize()` and implement for Ne…
PhilMiller May 10, 2024
565a962
Delete dis-used, undocumented typedef
PhilMiller May 15, 2024
f376c36
Move NetCDFPerFeatureProvider cleanup call from ~Formulation_Manager …
PhilMiller May 15, 2024
d2e30cf
Document added finalize() methods
PhilMiller May 15, 2024
8bd3c7f
Avoid trying to call finalize() on a non-existent forcing
PhilMiller May 15, 2024
d6b932e
Add no-op WrapperDataProvider::finalize
PhilMiller May 15, 2024
9666472
CsvPerFeatureForcingProvider: Delete unused pointer members
PhilMiller May 15, 2024
9b53818
Bmi_Multi_Formulation: implement finalize()
PhilMiller May 15, 2024
0818a5b
Formulation_Manager::finalize(): treat domain_formulations elements t…
PhilMiller May 15, 2024
b33550a
Clarify dispatch behavior of finalize() calls
PhilMiller May 30, 2024
94ce654
Refactor to move forcing member down closer to where it's used
PhilMiller May 30, 2024
9abd2d3
chore: Fix warnings from -Wsuggest-override (#827)
PhilMiller Jun 3, 2024
1f6756e
geojson FeatureVisitor: add virtual dtor to match virtual operation m…
PhilMiller Jun 7, 2024
c497bfd
Formulation_Manager: drop 'virtual', since there's nothing else to dy…
PhilMiller Jun 7, 2024
6746a46
HydrofabricSubsetter: drop 'virtual', since there's nothing else to d…
PhilMiller Jun 7, 2024
84d71ea
Update both BMI C++ header copies to reflect virtual destructor (#832)
PhilMiller Jun 11, 2024
b627f9c
#570: Remove 'uses_forcing_file' and 'forcing_file'(_path)
PhilMiller May 30, 2024
84ae99c
Rename uses_forcing_file constant to reflect it now being optional/de…
PhilMiller Jun 7, 2024
74a3ef3
ci: install t-route mods in non-editable mode
aaraney Jun 12, 2024
88bfa20
chore: update cxx dependent modules per #835
hellkite500 Jun 12, 2024
950bddd
chore: bump cfe submodule to v1.0.0 tag
hellkite500 Jun 12, 2024
d5a0171
Update ET for .gitignore
PhilMiller Jun 20, 2024
2bdce49
Drop Bmi_Adapter::output stream member, and replace uses with warning…
PhilMiller Jun 26, 2024
3279399
Bmi_Adapter class hierarchy: drop StreamHandler constructor arguments
PhilMiller Jun 26, 2024
69a77de
Clear out and fix up header includes
PhilMiller Jun 26, 2024
db9bc20
Add one more missing <iostream> that was revealed by the Forcings Eng…
PhilMiller Jun 26, 2024
5d479f5
cmake(test): update documentation for `ngen_add_test`
program-- Jun 26, 2024
e5d8e83
Bmi_Adapter: remove disused member 'bool allow_model_exceed_end_time'
PhilMiller Jun 26, 2024
303eb81
Bmi_Adapter: Drop constructor arguments for allow_model_exceed_end_time
PhilMiller Jun 26, 2024
97325a8
Clean up mis-use of 'using namespace models::bmi' in header
PhilMiller Jun 27, 2024
b839ee0
Clean up mis-use of 'using namespace hy_features::hydrolocation' in h…
PhilMiller Jun 27, 2024
b5e5361
Drop extraneous 'friend' declarations
PhilMiller Jun 27, 2024
2d1a381
refactor: simplify generic data provider to type alias
program-- Jun 25, 2024
ee77fc0
refactor: separate NullForcingProvider into header/source files
program-- Jun 25, 2024
004fdb0
feat: implement Forcings Engine data provider base class
program-- Jun 25, 2024
c39df49
rev: simplify construction; include ctime header; safer fp conversion
program-- Jun 25, 2024
7987d76
rev: fix bmi_ member shadowing; add more docs; rm time_current_index_
program-- Jun 26, 2024
adc71c2
Typo fix in comment
PhilMiller Jun 26, 2024
cef9813
Add header necessitated by #840 dropping some includes
PhilMiller Jun 26, 2024
7c408c6
rev: remove StreamHandler arg to match #840 changes
program-- Jun 26, 2024
f309759
rev: std headers; const ref string arg; rm StreamHandler include
program-- Jun 26, 2024
f76c784
rev: add forcings engine test file; add explicit template instatiation
program-- Jun 26, 2024
a2e4ad6
rev: Drop argument that was rebased out of Bmi_Py_Adapter constructor
PhilMiller Jun 27, 2024
c53584a
rev: add NGEN_WITH_PYTHON guard to ForcingsEngineDataProvider.hpp
program-- Jul 1, 2024
0917f9b
chore: change permissions to 644
aaraney Jul 3, 2024
444583c
chore(cmake): fail if numpy>=2.0.0 is detected
aaraney Jul 17, 2024
bf62fad
refactor(DataProvider): add const and noexcept specifiers to virtual …
program-- Jul 3, 2024
42bf188
refactor(DataProvider): add const and noexcept specifiers to derived …
program-- Jul 3, 2024
3a20481
refactor(core): add const specifier
program-- Jul 3, 2024
621748d
refactor(forcing): add const specifier
program-- Jul 3, 2024
9d8ea4a
refactor(realizations): add const specifier
program-- Jul 3, 2024
b0fde21
fix(ForcingsEngineDataProvider): remove noexcept specifiers
program-- Jul 3, 2024
ed5c9a9
tests(Bmi_Multi_Formulation): check get_available_variable_names
program-- Jul 18, 2024
9fc3182
refactor(Bmi_Multi_Formulation): initialize available_forcings in ini…
program-- Jul 18, 2024
b024779
refactor(ForcingsEngineDataProvider): move time and init members into…
program-- Jul 3, 2024
a63cc26
feat(ForcingsEngineDataProvider): add ensure_variable member for alia…
program-- Jul 3, 2024
8dcbc20
Fix output_root
stcui007 Jul 17, 2024
83eadd2
Add output_root dir in realization
stcui007 Jul 17, 2024
34d5690
Incorporate reviewer's suggestion
stcui007 Jul 17, 2024
16a6e22
Revision after reviewer's comments
stcui007 Jul 17, 2024
9143e8d
Using a placeholder output_root dir
stcui007 Jul 18, 2024
fd4a7e2
Add example_realization_config.json
stcui007 Jul 18, 2024
f370752
Create the directory in code instead of manually
stcui007 Jul 19, 2024
863433f
Generalize to include the case no output_root in realization
stcui007 Jul 19, 2024
1bba73d
Remove the modified realization files
stcui007 Jul 22, 2024
8a99092
Add back the realization files w/ or w/o output_root
stcui007 Jul 22, 2024
15618a1
First pass to address reviewer's comments
stcui007 Jul 23, 2024
87d14fb
Revise throw message
stcui007 Jul 23, 2024
2d03653
Minor revision
stcui007 Jul 23, 2024
653a2de
Change a C to C++ header
stcui007 Jul 24, 2024
f15b0b1
Incorporate reviewer's suggestions
stcui007 Jul 24, 2024
7abdb5d
Remove duplicate outputs of realization config in MPI computation
stcui007 Aug 5, 2024
088fc26
Removing passing mpi_rank through functions
stcui007 Aug 6, 2024
5638330
feat(ForcingsEngine): impl Lumped Forcings Engine Data Provider
program-- Jul 1, 2024
a02fcb3
fix: moving temporary strings
program-- Jul 1, 2024
8c8e7b0
rev: add type aliases to `DataProvider` class; include `init` path in…
program-- Jul 1, 2024
9166fd3
fix(ForcingsEngineLumpedDataProvider): use base class ensure_variable
program-- Jul 29, 2024
3615fac
docs(ForcingsEngineLumpedDataProvider): docs for divide() and divide_…
program-- Jul 29, 2024
a754cf2
feat: use AORC S3 forcings engine module for tests
program-- Aug 8, 2024
eebc24b
fix(ForcingsEngineLumpedDataProvider): handle divide_index and fix ge…
program-- Aug 9, 2024
ca3d6aa
build(ForcingsEngineLumpedDataProviderTest): configure aorc config fi…
program-- Aug 9, 2024
761d910
fix(ForcingsEngineLumpedDataProviderTest): typo
program-- Aug 9, 2024
94ca8f9
fix: don't reuse global model params, fixes #871 and #872
hellkite500 Aug 16, 2024
ad667f1
test: add test case for multiple missing formulations when linking ex…
hellkite500 Aug 16, 2024
2ffedf8
cmake(test): fix forcings engine compile def for `test_all` target
program-- Aug 16, 2024
1cb6e41
feat(cmake): include git commit id in configuration summary
program-- Aug 22, 2024
ad55e71
ci: brew prefix
aaraney Sep 6, 2024
230929a
ci(ngen-submod-build): bump default mac gfortran from 11 to 12
aaraney Sep 10, 2024
f321889
Move merged CONUS realization configs to data/baseline/realizations/
stcui007 Sep 26, 2024
e6e331b
Adding doc on release management.
robertbartel Oct 2, 2024
058de96
Updating doc on Git usage to be more technical.
robertbartel Oct 2, 2024
31c860d
Move practical, day-to-day Git info to CONTRIBUTING.md.
robertbartel Oct 2, 2024
cdce746
Move ngen build project to "current" version.
robertbartel Oct 7, 2024
61bcbad
Clarify steps in release management doc.
robertbartel Oct 7, 2024
15920e3
Bump to version 0.3.0.
robertbartel Oct 15, 2024
285827f
Run test/validate on release branches.
robertbartel Oct 15, 2024
eea997d
Apply other Actions to release branches.
robertbartel Oct 15, 2024
60d2a2b
Update Actions to install 1.x numpy.
robertbartel Oct 15, 2024
c321cb3
Fix Action to strictly require numpy < 2.0.
robertbartel Oct 15, 2024
17c2984
Change Action numpy fix to use constraints.
robertbartel Oct 15, 2024
baf28e8
Fix placement of constraints.txt in Action.
robertbartel Oct 15, 2024
4fb5bb6
Updated license file to reflect OWP government language
Brian-Cosgrove Jan 30, 2025
4728dbc
Stop ignoring include/NGenConfig.h, since it should no longer exist i…
PhilMiller May 29, 2025
e03f459
Fix a bunch of typos in comments
PhilMiller Aug 8, 2025
14c310b
ci: update test runner to macos-15
hellkite500 Oct 24, 2025
5ea014c
fix(boost): updgrade boost for fixing https://github.com/boostorg/mpl…
hellkite500 Oct 24, 2025
8e798ad
ci: avoid false positive vtable ODR when loading CPP test lib (https:…
hellkite500 Oct 24, 2025
77e38ea
ci: for runners with cmake version 4, need to enforce a mininmum cmak…
hellkite500 Oct 24, 2025
d1e69d0
ci(tmp): try mac 26 runners
aaraney Oct 24, 2025
2865744
ci(tmp): force clang on linux
aaraney Oct 24, 2025
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
35 changes: 25 additions & 10 deletions .github/actions/ngen-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ runs:
elif [ ${{ runner.os }} == 'macOS' ]
then
brew install netcdf netcdf-cxx netcdf-fortran
echo "LIBRARY_PATH=/usr/local/lib/:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L/usr/local/lib" >> $GITHUB_ENV
echo "LIBRARY_PATH=$(brew --prefix)/lib/:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$(brew --prefix)/lib/:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix)/lib" >> $GITHUB_ENV
echo "LIB=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "NETCDF=/usr/local" >> $GITHUB_ENV
echo "NETCDF=$(brew --prefix)" >> $GITHUB_ENV
fi
shell: bash

Expand All @@ -110,14 +110,20 @@ runs:
id: cache-boost-dep
uses: actions/cache@v4
with:
path: boost_1_79_0
path: boost_1_86_0
key: unix-boost-dep

- name: Get Boost Dependency
if: steps.cache-boost-dep.outputs.cache-hit != 'true'
run: |
curl -L -o boost_1_79_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.79.0/boost_1_79_0.tar.bz2/download
tar xjf boost_1_79_0.tar.bz2
curl -L -o boost_1_86_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2/download
tar xjf boost_1_86_0.tar.bz2
shell: bash

- name: Set Pip Constraints
run: |
echo "numpy<2.0" > $GITHUB_WORKSPACE/constraints.txt
echo "PIP_CONSTRAINT=$GITHUB_WORKSPACE/constraints.txt" >> $GITHUB_ENV
shell: bash

- name: Cache Python Dependencies
Expand Down Expand Up @@ -179,12 +185,19 @@ runs:

- name: Cmake Initialization
id: cmake_init
# NOTE: -DCMAKE_POLICY_VERSION_MINIMUM=3.5 is required to use cmake version 4
# and with older pybind11 versions, the minimum cmake version is set to 3.4
# which causes cmake configuration to fail.
run: |
export BOOST_ROOT="$(pwd)/boost_1_79_0"
which apt && sudo apt update && sudo apt install clang-17 && export CC=clang && export CXX=clang++ && echo "USING CLANG"
export BOOST_ROOT="$(pwd)/boost_1_86_0"
export CFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -Werror"
export CXXFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -pedantic-errors -Werror -Wpessimizing-move -Wparentheses -Wrange-loop-construct"
export CXXFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -pedantic-errors -Werror -Wpessimizing-move -Wparentheses -Wrange-loop-construct -Wsuggest-override"
. .venv/bin/activate
[ ! -d "$BOOST_ROOT" ] && echo "Error: no Boost root found at $BOOST_ROOT" && exit 1
echo "Cmake Version:"
which cmake
cmake --version
cmake -B ${{ inputs.build-dir }} \
-DNGEN_WITH_BMI_C:BOOL=${{ inputs.bmi_c }} \
-DNGEN_WITH_PYTHON:BOOL=${{ inputs.use_python }} \
Expand All @@ -193,7 +206,9 @@ runs:
-DNGEN_WITH_ROUTING:BOOL=${{ inputs.use_troute }} \
-DNGEN_WITH_NETCDF:BOOL=${{ inputs.use_netcdf }} \
-DNGEN_WITH_SQLITE:BOOL=${{ inputs.use_sqlite }} \
-DNGEN_WITH_MPI:BOOL=${{ inputs.use_mpi }} -S .
-DNGEN_WITH_MPI:BOOL=${{ inputs.use_mpi }} \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -S .

echo "build-dir=$(echo ${{ inputs.build-dir }})" >> $GITHUB_OUTPUT
shell: bash

Expand Down
4 changes: 3 additions & 1 deletion .github/actions/ngen-submod-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ runs:
if: |
runner.os == 'macOS'
run: |
echo "FC=gfortran-11" >> $GITHUB_ENV
# see macOS image readmes for supported versions
# https://github.com/actions/runner-images/tree/main/images/macos
echo FC="gfortran-12" >> $GITHUB_ENV
shell: bash

- name: Cmake Initialization
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/Example_model_run.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Build and Run NGEN on example data

on:
push:
branches: [ release-* ]
pull_request:
branches: [ master ]
branches: [ master, release-* ]
jobs:
Build_and_Run_Model:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Documentation
# events but only for the master branch
on:
push:
branches: [ master ]
branches: [ master, release-* ]
#pull_request:
#branches: [ master ]

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/module_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Module Integration Tests
# Controls when the action will run.
on:
push:
branches: [ master, dev, notreal ]
branches: [ master, dev, notreal, release-* ]
pull_request:
branches: [ master, dev, notreal ]
branches: [ master, dev, notreal, release-* ]
workflow_dispatch:

env:
Expand All @@ -22,7 +22,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -43,11 +43,13 @@ jobs:
- name: Run surfacebmi plus cfebmi
run: |
inputfile='data/example_bmi_multi_realization_config.json'
./cmake_build/ngen || true
./cmake_build/ngen data/catchment_data.geojson "cat-27" data/nexus_data.geojson "nex-26" $inputfile

- name: Run surfacebmi, cfebmi and petbmi
run: |
inputfile='data/example_bmi_multi_realization_config_w_noah_pet_cfe.json'
./cmake_build/ngen || true
./cmake_build/ngen data/catchment_data.geojson "cat-27" data/nexus_data.geojson "nex-26" $inputfile

# Run t-route/pybind integration test
Expand Down Expand Up @@ -117,14 +119,10 @@ jobs:
export LIBRARY_PATH=/usr/local/lib/gcc/11/
export LD_LIBRARY_PATH=/usr/local/lib/gcc/11/
fi
sed -i.bak 's/NETCDF}"/NETCDF}\/include"/' compiler.sh
export NETCDFALTERNATIVE=${NETCDF}/include
export FC=gfortran
export F90=gfortran
./compiler.sh
cd src
pip install troute-nwm/
pip install --install-option="--use-cython" troute-network/
pip install --install-option="--use-cython" troute-routing/
./compiler.sh no-e

deactivate

Expand Down
50 changes: 41 additions & 9 deletions .github/workflows/test_and_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Testing and Validation
# Controls when the action will run.
on:
push:
branches: [ master, dev, notreal ]
branches: [ master, dev, notreal, release-* ]
pull_request:
branches: [ master, dev, notreal ]
branches: [ master, dev, notreal, release-* ]
workflow_dispatch:

env:
Expand All @@ -24,7 +24,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-24.04, macos-26]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -139,6 +139,7 @@ jobs:
- name: Run Tests
run: |
cd ./cmake_build/test/
export ASAN_OPTIONS=${ASAN_OPTIONS}:detect_odr_violation=0
./test_bmi_cpp
cd ../../
timeout-minutes: 15
Expand All @@ -151,7 +152,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -182,7 +183,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -215,7 +216,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -250,7 +251,7 @@ jobs:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -272,12 +273,43 @@ jobs:
- name: Run Unit Tests
run: |
. .venv/bin/activate
export ASAN_OPTIONS=${ASAN_OPTIONS}:detect_odr_violation=0
./cmake_build/test/test_bmi_multi
timeout-minutes: 15

- name: Clean Up Unit Test Build
uses: ./.github/actions/clean-build

# Run BMI protocol tests in linux/unix environment
test_bmi_protocols:
# The type of runner that the job will run on
strategy:
matrix:
os: [ubuntu-22.04, macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build BMI Protocol Unit Tests
uses: ./.github/actions/ngen-build
with:
targets: "test_bmi_protocols"
build-cores: ${{ env.LINUX_NUM_PROC_CORES }}

- name: run_bmi_protocol_tests
run: |
cd ./cmake_build/test/
export ASAN_OPTIONS=${ASAN_OPTIONS}:detect_odr_violation=0
./test_bmi_protocols
cd ../../
timeout-minutes: 15

- name: Clean Up BMI Protocol Unit Test Build
uses: ./.github/actions/clean-build

# TODO: fails due to compilation error, at least in large part due to use of POSIX functions not supported on Windows.
# TODO: Need to determine whether Windows support (in particular, development environment support) is necessary.
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ data/hydrofabric/huc01_demo/
# NGen build-related items
.venv
boost_*
include/NGenConfig.h

# Large Example Datasets for certain tests #
############################################
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tasks:
./compiler.sh
popd
pip install pyyaml bmipy
cmake -S . -B cmake_build -DBMI_C_LIB_ACTIVE=1 -DBMI_FORTRAN_ACTIVE=1 -DNGEN_ACTIVATE_ROUTING=1
cmake -S . -B cmake_build -DNGEN_WITH_BMI_C=ON -DNGEN_WITH_BMI_FORTRAN=ON -DNGEN_ACTIVATE_ROUTING=1
cmake --build cmake_build --target all
- name: Workshell
before: |
Expand Down
26 changes: 10 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ list(APPEND CMAKE_MODULE_PATH "${NGEN_MOD_DIR}")
# (1) finds Git package
# (2) Sets ${NGEN_HAS_GIT_DIR} to ON/OFF if ${NGEN_ROOT_DIR}/.git exists
# (3) Function `git_update_submodule` which updates a given submodule
# (4) Sets ${NGEN_GIT_COMMIT} to the current commit hash if available
include(GitUpdateSubmodules)

# NGen CMake module for automating external subdirectory builds (i.e. testbmicpp)
Expand Down Expand Up @@ -113,7 +114,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

# Define project version and use via generated config header
project(ngen VERSION 0.1.0)
project(ngen VERSION 0.3.0)

add_executable(ngen "${NGEN_SRC_DIR}/NGen.cpp")

Expand All @@ -139,7 +140,6 @@ endif()
# If MPI support is enabled, set the C++ compiler to "mpicxx"
if(NGEN_WITH_MPI)
find_package(MPI REQUIRED)
add_compile_definitions(NGEN_MPI_ACTIVE)
endif()

# -----------------------------------------------------------------------------
Expand All @@ -165,7 +165,7 @@ add_compile_definitions(NGEN_SHARED_LIB_EXTENSION)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.79.0 REQUIRED)
find_package(Boost 1.86.0 REQUIRED)

# -----------------------------------------------------------------------------
if(NGEN_WITH_SQLITE)
Expand Down Expand Up @@ -196,8 +196,6 @@ if(NGEN_WITH_NETCDF)
set(NetCDF_CXX_LIBRARY "${PROJECT_BINARY_DIR}/extern-libs/netcdf-cxx4/libnetcdf-cxx4.a")
target_link_libraries(NetCDF INTERFACE netcdf-cxx4)
endif()

add_compile_definitions(NETCDF_ACTIVE)
endif()

if(NGEN_WITH_EXTERN_SLOTH)
Expand All @@ -216,8 +214,6 @@ endif()
# -----------------------------------------------------------------------------
# Handle several steps for BMI C library logic and dependencies, at top level, if functionality is turned on
if(NGEN_WITH_BMI_C)
add_compile_definitions(NGEN_BMI_C_LIB_ACTIVE)

if(NGEN_WITH_EXTERN_TOPMODEL)
add_external_subdirectory(
SOURCE "${NGEN_EXT_DIR}/topmodel"
Expand Down Expand Up @@ -249,8 +245,6 @@ endif()
# -----------------------------------------------------------------------------
# Configure whether Fortran BMI functionality is active
if(NGEN_WITH_BMI_FORTRAN)
add_compile_definitions(NGEN_BMI_FORTRAN_ACTIVE)

add_external_subdirectory(
SOURCE "${NGEN_EXT_DIR}/iso_c_fortran_bmi"
OUTPUT "${NGEN_EXT_DIR}/iso_c_fortran_bmi/cmake_build"
Expand All @@ -269,17 +263,14 @@ endif()

# -----------------------------------------------------------------------------
if(NGEN_WITH_PYTHON)
add_compile_definitions(ACTIVATE_PYTHON=true)
find_package(Python 3.6.8 REQUIRED COMPONENTS Interpreter Development NumPy)
if(${Python_NumPy_VERSION} VERSION_GREATER_EQUAL 2)
message(FATAL_ERROR "Found numpy version \"${Python_NumPy_VERSION}\"; numpy>=2.0.0 is not currently supported")
endif()
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) # Case-sensitive difference
add_subdirectory(extern/pybind11 pybind11)
endif()

# -----------------------------------------------------------------------------
if(NGEN_WITH_ROUTING)
add_compile_definitions(NGEN_ROUTING_ACTIVE)
endif()

# -----------------------------------------------------------------------------
if(NGEN_QUIET)
set(UDUNITS_QUIET true)
Expand Down Expand Up @@ -416,7 +407,10 @@ ngen_multiline_message(
" C Compiler: ${CMAKE_C_COMPILER}"
" C Flags: ${CMAKE_C_FLAGS}"
" CXX Compiler: ${CMAKE_CXX_COMPILER}"
" CXX Flags: ${CMAKE_CXX_FLAGS}"
" CXX Flags: ${CMAKE_CXX_FLAGS}")
ngen_dependent_multiline_message(NGEN_HAS_GIT_DIR
" Git Commit ID: ${NGEN_GIT_COMMIT}")
ngen_multiline_message(
" Flags:"
" NGEN_WITH_MPI: ${NGEN_WITH_MPI}"
" NGEN_WITH_NETCDF: ${NGEN_WITH_NETCDF}"
Expand Down
Loading
Loading