Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
66bb68e
Use new nwm-ewts libraries and python package
cmaynard-ngwpc Mar 10, 2026
5bbdaa8
Update submodule references to their nwm-ewts feature branches
cmaynard-ngwpc Mar 11, 2026
594b62b
updated Dockerfile to include EWTS
miguelp1986 Mar 13, 2026
777a20b
Updates to Dockerfile comments for clarification
cmaynard-ngwpc Mar 13, 2026
a6b2013
fixing cloning issue with ewts
miguelp1986 Mar 13, 2026
f18db6e
added ewts path to t route build
miguelp1986 Mar 13, 2026
89f1434
dockerfile updates
miguelp1986 Mar 13, 2026
29a5130
dockerfile updates
miguelp1986 Mar 13, 2026
c0cbd83
dockerfile updates
miguelp1986 Mar 13, 2026
74dd81e
fix: change ewts linkage from PRIVATE to PUBLIC in all CMakeLists
miguelp1986 Mar 13, 2026
c10009d
Fix ewts-verify stage to handle lib64 install path
miguelp1986 Mar 13, 2026
1ca5362
removed ewts verification stage
miguelp1986 Mar 13, 2026
d646a59
Update submod refs for ewts python bind
cmaynard-ngwpc Mar 17, 2026
94de310
added ewts build arguments to ngwpc cicd file
miguelp1986 Mar 17, 2026
d6d1e45
added ewts to ngwpc cicd file in codeql step
miguelp1986 Mar 17, 2026
f1be7d5
cicd updates
miguelp1986 Mar 17, 2026
21a25b4
cicd updates
miguelp1986 Mar 17, 2026
0da6047
Add ewts to ngen state saving.
cmaynard-ngwpc Mar 18, 2026
799ab14
Update lstm submod ref
cmaynard-ngwpc Mar 18, 2026
1076cbc
Updates SFT submod ref
cmaynard-ngwpc Mar 19, 2026
dd5e0ed
Updaate SMP submod ref for sac-sma recent merge to development
cmaynard-ngwpc Mar 23, 2026
228b627
Update sac-sma submod ref
cmaynard-ngwpc Mar 24, 2026
7246984
Update submod refs for ewts branches merged to development
cmaynard-ngwpc Mar 25, 2026
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
39 changes: 35 additions & 4 deletions .github/workflows/ngwpc-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ on:
description: 'NGEN_FORCING_IMAGE_TAG'
required: false
type: string
EWTS_ORG:
description: 'EWTS_ORG'
required: false
type: string
EWTS_REF:
description: 'EWTS_REF'
required: false
type: string

permissions:
contents: read
Expand Down Expand Up @@ -149,7 +157,7 @@ jobs:

BOOST_VER=1.86.0
BOOST_UNDERSCORE=1_86_0
PREFIX=/opt/boost-${BOOST_VER}
PREFIX=/usr/local

curl -fL --retry 10 --retry-delay 2 --max-time 600 \
-o /tmp/boost.tar.bz2 \
Expand All @@ -161,7 +169,7 @@ jobs:
./bootstrap.sh --prefix="${PREFIX}"

# Build Boost libraries
./b2 -j"$(nproc)" install \
sudo ./b2 -j"$(nproc)" install \
--with-system \
--with-filesystem \
--with-program_options \
Expand All @@ -170,14 +178,35 @@ jobs:
--with-date_time \
--with-serialization
echo "BOOST_ROOT=${PREFIX}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PREFIX}:${CMAKE_PREFIX_PATH:-}" >> "$GITHUB_ENV"

- name: Build and install EWTS
run: |
set -euo pipefail
EWTS_ORG="${{ inputs.EWTS_ORG || 'NGWPC' }}"
EWTS_REF="${{ inputs.EWTS_REF || 'development' }}"
EWTS_PREFIX=/opt/ewts

git clone --depth 1 -b "${EWTS_REF}" \
"https://github.com/${EWTS_ORG}/nwm-ewts.git" /tmp/nwm-ewts \
|| (git clone "https://github.com/${EWTS_ORG}/nwm-ewts.git" /tmp/nwm-ewts && \
cd /tmp/nwm-ewts && git checkout "${EWTS_REF}")

cd /tmp/nwm-ewts
cmake -S . -B cmake_build \
-DCMAKE_BUILD_TYPE=Release \
-DEWTS_WITH_NGEN=ON \
-DEWTS_BUILD_SHARED=ON
cmake --build cmake_build -j "$(nproc)"
sudo cmake --install cmake_build --prefix "${EWTS_PREFIX}"

echo "EWTS_PREFIX=${EWTS_PREFIX}" >> "$GITHUB_ENV"

- name: Build C++ code
env:
PYTHONPATH: ${{ env.PYTHONPATH }}
run: |
cmake -B cmake_build -S . \
-DCMAKE_PREFIX_PATH="${BOOST_ROOT}" \
-DCMAKE_PREFIX_PATH="${EWTS_PREFIX};${BOOST_ROOT}" \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBOOST_ROOT="${BOOST_ROOT}" \
-DPYTHON_EXECUTABLE=$(which python3) \
Expand Down Expand Up @@ -241,6 +270,8 @@ jobs:
build-args: |
ORG=${{ needs.setup.outputs.org }}
NGEN_FORCING_IMAGE_TAG=${{ inputs.NGEN_FORCING_IMAGE_TAG || 'latest' }}
EWTS_ORG=${{ inputs.EWTS_ORG || 'NGWPC' }}
EWTS_REF=${{ inputs.EWTS_REF || 'development' }}
IMAGE_SOURCE=https://github.com/${{ github.repository }}
IMAGE_VENDOR=${{ github.repository_owner }}
IMAGE_VERSION=${{ needs.setup.outputs.clean_ref }}
Expand Down
35 changes: 33 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# ngen/CMakeLists.txt
#

# Ensure CMake policies have defaults depending on the CMake version used
# between the two versions specified. e.g. if 3.18 is used, then 3.18 defaults
# will be used instead of 3.17 defaults.
Expand Down Expand Up @@ -118,6 +122,30 @@ project(ngen VERSION 0.3.0)

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

# --- EWTS (installed from nwm-ewts) ---
find_package(ewts CONFIG REQUIRED)

if(DEFINED ewts_VERSION AND NOT "${ewts_VERSION}" STREQUAL "")
set(NGEN_EWTS_VERSION "${ewts_VERSION}")
else()
set(NGEN_EWTS_VERSION "<unknown>")
endif()

if(DEFINED EWTS_NGWPC_VERSION AND NOT "${EWTS_NGWPC_VERSION}" STREQUAL "")
set(NGEN_EWTS_NGWPC_VERSION "${EWTS_NGWPC_VERSION}")
else()
set(NGEN_EWTS_NGWPC_VERSION "<unknown>")
endif()

get_filename_component(EWTS_PREFIX "${ewts_DIR}" DIRECTORY)
get_filename_component(EWTS_PREFIX "${EWTS_PREFIX}" DIRECTORY)
get_filename_component(EWTS_PREFIX "${EWTS_PREFIX}" DIRECTORY)

message(STATUS "Found EWTS: ${EWTS_PREFIX} (found version ${ewts_VERSION})")

# NGen itself uses the NGen-specific EWTS logger/bridge
target_link_libraries(ngen PRIVATE ewts::ewts_ngen_bridge)

# Dependencies ================================================================

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -286,7 +314,6 @@ if(UDUNITS_QUIET)
add_compile_definitions(UDUNITS_QUIET)
endif()


# -----------------------------------------------------------------------------
# Project Targets
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -359,6 +386,7 @@ if(NGEN_WITH_ROUTING)
endif()

add_executable(partitionGenerator src/partitionGenerator.cpp)
target_link_libraries(partitionGenerator PRIVATE ewts::ewts_ngen_bridge)
target_link_libraries(partitionGenerator PUBLIC NGen::logging)
target_include_directories(partitionGenerator PUBLIC "${PROJECT_BINARY_DIR}/include")
if(NGEN_WITH_SQLITE)
Expand Down Expand Up @@ -449,7 +477,10 @@ ngen_multiline_message(
" Boost:"
" Version: ${Boost_VERSION}"
" Include: ${Boost_INCLUDE_DIRS}"
" Library: ${Boost_LIBRARY_DIRS}")
" Library: ${Boost_LIBRARY_DIRS}"
" EWTS:"
" Package Version: ${NGEN_EWTS_VERSION}"
" NGWPC Version: ${NGEN_EWTS_NGWPC_VERSION}")
ngen_dependent_multiline_message(INTEL_DPCPP
" Intel DPC++:"
" Version: ${SYCL_LANGUAGE_VERSION}"
Expand Down
Loading
Loading