diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 8c0f79730b..a963deb3b1 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -52,6 +52,10 @@ inputs: required: false description: 'Enable mpi support, only available for Linux runners' default: 'OFF' + build_extern: + required: false + description: 'Use external dependencies where possible' + default: 'OFF' outputs: build-dir: description: "Directory build was performed in" @@ -110,14 +114,14 @@ 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 @@ -185,13 +189,26 @@ 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" + 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 -Wsuggest-override" + if [ ${{ runner.os }} == 'macOS' ] + then + echo "fun:PyType_FromMetaclass" > /tmp/asan_ignore.txt + export CFLAGS="$CFLAGS -fsanitize-ignorelist=/tmp/asan_ignore.txt" + export CXXFLAGS="$CXXFLAGS -fsanitize-ignorelist=/tmp/asan_ignore.txt" + fi . .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_EXTERN_ALL:BOOL=${{ inputs.build_extern }} \ -DNGEN_WITH_BMI_C:BOOL=${{ inputs.bmi_c }} \ -DNGEN_WITH_PYTHON:BOOL=${{ inputs.use_python }} \ -DNGEN_WITH_UDUNITS:BOOL=${{ inputs.use_udunits }} \ @@ -199,7 +216,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 diff --git a/.github/actions/ngen-submod-build/action.yaml b/.github/actions/ngen-submod-build/action.yaml index 349434fa45..0c8fac3153 100644 --- a/.github/actions/ngen-submod-build/action.yaml +++ b/.github/actions/ngen-submod-build/action.yaml @@ -50,6 +50,8 @@ runs: - name: Cmake Initialization id: cmake_init run: | + echo CFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -Werror" >> $GITHUB_ENV + echo CXXFLAGS="-fsanitize=address -O1 -g -fno-omit-frame-pointer -pedantic-errors -Werror -Wpessimizing-move -Wparentheses -Wrange-loop-construct -Wsuggest-override" >> $GITHUB_ENV cmake -B ${{ inputs.mod-dir}}/${{ inputs.build-dir }} -S ${{ inputs.mod-dir }} ${{ inputs.cmake-flags }} echo "build-dir=$(echo ${{ inputs.mod-dir}}/${{ inputs.build-dir }})" >> $GITHUB_OUTPUT shell: bash diff --git a/.github/workflows/module_integration.yml b/.github/workflows/module_integration.yml index b89c629079..1e757032ee 100644 --- a/.github/workflows/module_integration.yml +++ b/.github/workflows/module_integration.yml @@ -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 }} diff --git a/.github/workflows/test_and_validate.yml b/.github/workflows/test_and_validate.yml index 60f4e60aea..29b9e10afe 100644 --- a/.github/workflows/test_and_validate.yml +++ b/.github/workflows/test_and_validate.yml @@ -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 }} @@ -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 }} @@ -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-22.04, macos-15] fail-fast: false runs-on: ${{ matrix.os }} @@ -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 @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -272,6 +273,7 @@ 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 @@ -283,7 +285,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 }} @@ -301,6 +303,7 @@ jobs: - 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ec2c55fb3..2d96422026 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/INSTALL.md b/INSTALL.md index 8b73cb5f97..ad4fad92a2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -35,15 +35,15 @@ cd ngen **Download the Boost Libraries:** ```shell -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 \ - && rm 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 \ + && rm boost_1_86_0.tar.bz2 ``` **Set the ENV for Boost and C compiler:** ```shell -set BOOST_ROOT="/boost_1_79_0" +set BOOST_ROOT="/boost_1_86_0" set CXX=/usr/bin/g++ ``` @@ -79,7 +79,7 @@ The following CMake command will configure the build: ```shell cmake -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - -DBOOST_ROOT=boost_1_79_0 \ + -DBOOST_ROOT=boost_1_86_0 \ -B /build \ -S . ``` diff --git a/doc/BUILDS_AND_CMAKE.md b/doc/BUILDS_AND_CMAKE.md index 1f1dd944b0..f17613262c 100644 --- a/doc/BUILDS_AND_CMAKE.md +++ b/doc/BUILDS_AND_CMAKE.md @@ -104,7 +104,7 @@ In some cases - in particular **Google Test** - the build system will need to be ## Boost ENV Variable -The Boost libraries must be available for the project to compile. The details are discussed more in the [Dependencies](DEPENDENCIES.md) doc, but as a helpful hint, the **BOOST_ROOT** environmental variable can be set to the path of the applicable [Boost root directory](https://www.boost.org/doc/libs/1_79_0/more/getting_started/unix-variants.html#the-boost-distribution). The project's [CMakeLists.txt](../CMakeLists.txt) is written to check for this env variable and use it to set the Boost include directory. +The Boost libraries must be available for the project to compile. The details are discussed more in the [Dependencies](DEPENDENCIES.md) doc, but as a helpful hint, the **BOOST_ROOT** environmental variable can be set to the path of the applicable [Boost root directory](https://www.boost.org/doc/libs/1_86_0/more/getting_started/unix-variants.html#the-boost-distribution). The project's [CMakeLists.txt](../CMakeLists.txt) is written to check for this env variable and use it to set the Boost include directory. Note that if the variable is not set, it may still be possible for CMake to find Boost, although a *status* message will be printed by CMake indicating **BOOST_ROOT** was not set. diff --git a/doc/DEPENDENCIES.md b/doc/DEPENDENCIES.md index 6c48b38f94..e5e16c1d33 100644 --- a/doc/DEPENDENCIES.md +++ b/doc/DEPENDENCIES.md @@ -7,7 +7,7 @@ | [Google Test](#google-test) | submodule | `release-1.10.0` | | | [C/C++ Compiler](#c-and-c-compiler) | external | see below | | | [CMake](#cmake) | external | \>= `3.17` | | -| [Boost (Headers Only)](#boost-headers-only) | external | `1.79.0` | headers only library | +| [Boost (Headers Only)](#boost-headers-only) | external | `1.86.0` | headers only library | | [Udunits libraries](https://www.unidata.ucar.edu/software/udunits) | external | >= 2.0 | Can be installed via package manager or from source | | [MPI](https://www.mpi-forum.org) | external | No current implementation or version requirements | Required for [multi-process distributed execution](DISTRIBUTED_PROCESSING.md) | | [Python 3 Libraries](#python-3-libraries) | external | \>= `3.8.0` | Can be [excluded](#overriding-python-dependency). | @@ -78,7 +78,7 @@ Currently, a version of CMake >= `3.14.0` is required. ## Boost (Headers Only) -Boost libraries are used by this project. In particular, [Boost.Geometry](https://www.boost.org/doc/libs/1_79_0/libs/geometry/doc/html/geometry/compilation.html) is used, but others are also. +Boost libraries are used by this project. In particular, [Boost.Geometry](https://www.boost.org/doc/libs/1_86_0/libs/geometry/doc/html/geometry/compilation.html) is used, but others are also. Currently, only headers-only Boost libraries are utilized. As such, they are not exhaustively listed here since getting one essentially gets them all. @@ -88,7 +88,7 @@ Since only headers-only libraries are needed, the Boost headers simply need to b There are a variety of different ways to get the Boost headers locally. Various OS may have packages specifically to install them, though one should take note of whether such packages provide a version of Boost that meets this project's requirements. -Alternatively, the Boost distribution itself can be manually downloaded and unpacked, as described for both [Unix-variants](https://www.boost.org/doc/libs/1_79_0/more/getting_started/unix-variants.html) and [Windows](https://www.boost.org/doc/libs/1_79_0/more/getting_started/windows.html) on the Boost website. +Alternatively, the Boost distribution itself can be manually downloaded and unpacked, as described for both [Unix-variants](https://www.boost.org/doc/libs/1_86_0/more/getting_started/unix-variants.html) and [Windows](https://www.boost.org/doc/libs/1_86_0/more/getting_started/windows.html) on the Boost website. #### Setting **BOOST_ROOT** @@ -96,11 +96,11 @@ If necessary, the project's CMake config is able to use the value of the **BOOST However, it will often be necessary to set **BOOST_ROOT** if Boost was manually set up by downloading the distribution. -The variable should be set to the value of the **boost root directory**, which is something like `/boost_1_79_0`. +The variable should be set to the value of the **boost root directory**, which is something like `/boost_1_86_0`. ### Version Requirements -At present, a version >= `1.79.0` is required. +At present, a version >= `1.86.0` is required. ## Udunits diff --git a/docker/CENTOS_4.8.5_NGEN_RUN.dockerfile b/docker/CENTOS_4.8.5_NGEN_RUN.dockerfile index 9569428d20..794d40827d 100644 --- a/docker/CENTOS_4.8.5_NGEN_RUN.dockerfile +++ b/docker/CENTOS_4.8.5_NGEN_RUN.dockerfile @@ -19,11 +19,11 @@ ENV CXX=/usr/bin/g++ RUN git submodule update --init --recursive -- test/googletest -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 +RUN 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 -RUN tar -xjf boost_1_79_0.tar.bz2 +RUN tar -xjf boost_1_86_0.tar.bz2 -ENV BOOST_ROOT="boost_1_79_0" +ENV BOOST_ROOT="boost_1_86_0" RUN cmake -B /ngen -S . diff --git a/docker/CENTOS_NGEN_RUN.dockerfile b/docker/CENTOS_NGEN_RUN.dockerfile index 8aee5b9a4b..afaa442d34 100644 --- a/docker/CENTOS_NGEN_RUN.dockerfile +++ b/docker/CENTOS_NGEN_RUN.dockerfile @@ -9,11 +9,11 @@ RUN yum update -y \ && dnf clean all \ && rm -rf /var/cache/yum -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 \ - && rm boost_1_79_0.tar.bz2 +RUN 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 \ + && rm boost_1_86_0.tar.bz2 -ENV BOOST_ROOT="/boost_1_79_0" +ENV BOOST_ROOT="/boost_1_86_0" ENV CXX=/usr/bin/g++ diff --git a/docker/CENTOS_TEST.dockerfile b/docker/CENTOS_TEST.dockerfile index 55271d2755..334ac5d5d7 100644 --- a/docker/CENTOS_TEST.dockerfile +++ b/docker/CENTOS_TEST.dockerfile @@ -11,11 +11,11 @@ ENV CXX=/usr/bin/g++ RUN git submodule update --init --recursive -- test/googletest -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 +RUN curl -L -o boost_1_86_0.tar.bz2 https://sourceforge.net/projects/boost/files/boost/1.79.0/boost_1_86_0.tar.bz2/download -RUN tar -xjf boost_1_79_0.tar.bz2 +RUN tar -xjf boost_1_86_0.tar.bz2 -ENV BOOST_ROOT="boost_1_79_0" +ENV BOOST_ROOT="boost_1_86_0" WORKDIR /ngen diff --git a/docker/CENTOS_latest_NGEN_RUN.dockerfile b/docker/CENTOS_latest_NGEN_RUN.dockerfile index c53a46572e..11963f5209 100644 --- a/docker/CENTOS_latest_NGEN_RUN.dockerfile +++ b/docker/CENTOS_latest_NGEN_RUN.dockerfile @@ -13,11 +13,11 @@ ENV CXX=/usr/bin/g++ RUN git submodule update --init --recursive -- test/googletest -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 +RUN 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 -RUN tar -xjf boost_1_79_0.tar.bz2 +RUN tar -xjf boost_1_86_0.tar.bz2 -ENV BOOST_ROOT="boost_1_79_0" +ENV BOOST_ROOT="boost_1_86_0" WORKDIR /ngen diff --git a/docker/RHEL_TEST.dockerfile b/docker/RHEL_TEST.dockerfile index 9fe3550639..3103bd8464 100644 --- a/docker/RHEL_TEST.dockerfile +++ b/docker/RHEL_TEST.dockerfile @@ -10,11 +10,11 @@ ENV CXX=/usr/bin/g++ RUN git submodule update --init --recursive -- test/googletest -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 +RUN 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 -RUN tar -xjf boost_1_79_0.tar.bz2 +RUN tar -xjf boost_1_86_0.tar.bz2 -ENV BOOST_ROOT="boost_1_79_0" +ENV BOOST_ROOT="boost_1_86_0" WORKDIR /ngen diff --git a/docker/ngen.dockerfile b/docker/ngen.dockerfile index 88d880b98f..2d50a7c1a9 100644 --- a/docker/ngen.dockerfile +++ b/docker/ngen.dockerfile @@ -7,7 +7,7 @@ RUN dnf update -y \ && dnf install -y --allowerasing tar git gcc-c++ gcc make cmake udunits2-devel coreutils \ && dnf clean all -ARG BOOST_VERSION="1.79.0" +ARG BOOST_VERSION="1.86.0" RUN export BOOST_ARCHIVE="boost_$(echo ${BOOST_VERSION} | tr '\.' '_').tar.gz" \ && export BOOST_URL="https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/${BOOST_ARCHIVE}/download" \ && cd / \