From 57de3cece6158e9fe0a1a27ad69fa53c05826ec2 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 14:27:34 -0600 Subject: [PATCH 01/11] (Issue #19) Automatically & temporarily install ninja for building pkg. Without this change, Meson failed in a macOS system with no ninja installation. With the change, it installed and the package tests ran through successfully. --- README.md | 10 +++------- openbtmixing_pypkg/pyproject.toml | 1 + 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b4a77ef..5752add 100644 --- a/README.md +++ b/README.md @@ -35,8 +35,8 @@ the above * the [Meson build system](https://mesonbuild.com) and its prerequistes such as Python 3 and [ninja](https://ninja-build.org). -While Meson is used internally to build the Python package, it is installed -automatically just for building the package. +While both Meson and ninja are used internally to build the Python package, they +are installed automatically just for building the package. The Meson build system is setup to automatically detect the compiler suite and MPI installation to use. If Eigen already exists in the system and Meson can @@ -104,12 +104,8 @@ $ python The package can also be built and installed from a clone of this repository with ``` $ cd /path/to/OpenBT/openbtmixing_pypkg -$ python -m build --sdist -$ python -m pip install -v dist/openbtmixing-.tar.gz +$ python -m pip install . ``` -where we assume that the [build](https://build.pypa.io/en/stable/index.html) -package has already been installed. - Developers can setup a virtual environment with a developer/editable mode installation of the package with ``` diff --git a/openbtmixing_pypkg/pyproject.toml b/openbtmixing_pypkg/pyproject.toml index 29848b6..975c9fa 100644 --- a/openbtmixing_pypkg/pyproject.toml +++ b/openbtmixing_pypkg/pyproject.toml @@ -1,6 +1,7 @@ [build-system] requires = [ "setuptools", + "ninja", "meson>=1.6.0" ] build-backend = "setuptools.build_meta" From fb889d65428fde7527a55746a4630a1b72d043dc Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 15:07:15 -0600 Subject: [PATCH 02/11] macos-13 action runner is deprecated. This was the only Intel-based macOS runner that we were running on. So include the macOS-15-intel runner now as well. --- .github/workflows/test_CLTs.yml | 2 +- .github/workflows/test_anaconda.yml | 8 +++----- .github/workflows/test_py_sdist.yml | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_CLTs.yml b/.github/workflows/test_CLTs.yml index 503d8b4..3be91ea 100644 --- a/.github/workflows/test_CLTs.yml +++ b/.github/workflows/test_CLTs.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13, macos-14, macos-15, + os: [macos-14, macos-15, macos-15-intel, ubuntu-22.04, ubuntu-24.04] mpi_impl: ["openmpi", "mpich"] python-version: ["3.13"] diff --git a/.github/workflows/test_anaconda.yml b/.github/workflows/test_anaconda.yml index 4643af1..3f5275c 100644 --- a/.github/workflows/test_anaconda.yml +++ b/.github/workflows/test_anaconda.yml @@ -23,14 +23,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13, macos-14, macos-15, + os: [macos-14, macos-15, macos-15-intel, ubuntu-22.04, ubuntu-24.04] mpi_impl: ["openmpi"] python-version: ["3.12"] miniconda-version: [py312_24.11.1-0] exclude: # Prebuilt Intel MPI package not available for macOS - - os: [macos-13, macos-14, macos-15] + - os: [macos-14, macos-15, macos-15-intel] mpi_impl: "impi_rt" steps: @@ -48,7 +48,6 @@ jobs: which python which pip python --version - python -m pip install build conda info conda list python -m pip list @@ -68,7 +67,6 @@ jobs: run: | which python pushd $PKG_ROOT - python -m build --sdist - python -m pip install -v dist/openbtmixing-*.tar.gz + python -m pip install . popd $CLONE_PATH/tools/test_python_installation.py diff --git a/.github/workflows/test_py_sdist.yml b/.github/workflows/test_py_sdist.yml index dfe969e..3981dc7 100644 --- a/.github/workflows/test_py_sdist.yml +++ b/.github/workflows/test_py_sdist.yml @@ -20,7 +20,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-13, macos-14, macos-15, + os: [macos-14, macos-15, macos-15-intel, ubuntu-22.04, ubuntu-24.04] mpi_impl: ["openmpi", "mpich"] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] From a53310eaedf7bf6230016159d561ddf7925bb9a1 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 16:18:19 -0600 Subject: [PATCH 03/11] Try Python 3.14. --- .github/workflows/measure_coverage.yml | 4 ++-- .github/workflows/test_CLTs.yml | 2 +- .github/workflows/test_py_devmode.yml | 4 ++-- .github/workflows/test_py_sdist.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/measure_coverage.yml b/.github/workflows/measure_coverage.yml index f10e691..4f63f91 100644 --- a/.github/workflows/measure_coverage.yml +++ b/.github/workflows/measure_coverage.yml @@ -17,10 +17,10 @@ jobs: #####----- FULL TESTING WITH COVERAGE # This also confirms that tox with coverage & report works. coverage: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: - python-version: ["3.13"] + python-version: ["3.14"] steps: ##-- Setup Testing Environment diff --git a/.github/workflows/test_CLTs.yml b/.github/workflows/test_CLTs.yml index 3be91ea..e70246c 100644 --- a/.github/workflows/test_CLTs.yml +++ b/.github/workflows/test_CLTs.yml @@ -24,7 +24,7 @@ jobs: os: [macos-14, macos-15, macos-15-intel, ubuntu-22.04, ubuntu-24.04] mpi_impl: ["openmpi", "mpich"] - python-version: ["3.13"] + python-version: ["3.14"] steps: ##-- Setup Testing Environment diff --git a/.github/workflows/test_py_devmode.yml b/.github/workflows/test_py_devmode.yml index 0576b9b..1c83e90 100644 --- a/.github/workflows/test_py_devmode.yml +++ b/.github/workflows/test_py_devmode.yml @@ -18,8 +18,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-14, ubuntu-22.04] - python-version: ["3.13"] + os: [macos-15, ubuntu-24.04] + python-version: ["3.14"] steps: ##-- Setup Testing Environment diff --git a/.github/workflows/test_py_sdist.yml b/.github/workflows/test_py_sdist.yml index 3981dc7..4300d06 100644 --- a/.github/workflows/test_py_sdist.yml +++ b/.github/workflows/test_py_sdist.yml @@ -23,7 +23,7 @@ jobs: os: [macos-14, macos-15, macos-15-intel, ubuntu-22.04, ubuntu-24.04] mpi_impl: ["openmpi", "mpich"] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] exclude: # MPICH+Ubuntu24.04 tests presently fail because they detect only one # MPI process instead of two. I suspect that this is related to using From 24b8f71c9fd4dc9ec2b3efe7c827fb31fbe32b82 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 17:09:52 -0600 Subject: [PATCH 04/11] 3.14 worked in general. See if this fixes extra actions. --- .github/workflows/measure_coverage.yml | 2 +- .github/workflows/test_py_devmode.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/measure_coverage.yml b/.github/workflows/measure_coverage.yml index 4f63f91..d88ce30 100644 --- a/.github/workflows/measure_coverage.yml +++ b/.github/workflows/measure_coverage.yml @@ -29,7 +29,7 @@ jobs: - name: Install mpich run: | sudo apt-get update - sudo apt-get -y install mpich + sudo apt-get -y install mpich libmpich-dev - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/test_py_devmode.yml b/.github/workflows/test_py_devmode.yml index 1c83e90..18382f1 100644 --- a/.github/workflows/test_py_devmode.yml +++ b/.github/workflows/test_py_devmode.yml @@ -29,7 +29,7 @@ jobs: run: | if [ "${{ runner.os }}" = "Linux" ]; then sudo apt-get update - sudo apt-get -y install mpich + sudo apt-get -y install mpich libmpich-dev elif [ "${{ runner.os }}" = "macOS" ]; then brew install mpich fi From 83e1e779b11f922c5aee751f8e46ecdd4ffea83f Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 17:20:04 -0600 Subject: [PATCH 05/11] Go back to Ubuntu 22. According to exclude comments in test_py_sdist, MPICH and Ubuntu 24 don't work correctly. --- .github/workflows/measure_coverage.yml | 4 ++-- .github/workflows/test_py_devmode.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/measure_coverage.yml b/.github/workflows/measure_coverage.yml index d88ce30..1a8c675 100644 --- a/.github/workflows/measure_coverage.yml +++ b/.github/workflows/measure_coverage.yml @@ -17,7 +17,7 @@ jobs: #####----- FULL TESTING WITH COVERAGE # This also confirms that tox with coverage & report works. coverage: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: ["3.14"] @@ -29,7 +29,7 @@ jobs: - name: Install mpich run: | sudo apt-get update - sudo apt-get -y install mpich libmpich-dev + sudo apt-get -y install mpich - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/test_py_devmode.yml b/.github/workflows/test_py_devmode.yml index 18382f1..3602b5f 100644 --- a/.github/workflows/test_py_devmode.yml +++ b/.github/workflows/test_py_devmode.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-15, ubuntu-24.04] + os: [macos-15, ubuntu-22.04] python-version: ["3.14"] steps: @@ -29,7 +29,7 @@ jobs: run: | if [ "${{ runner.os }}" = "Linux" ]; then sudo apt-get update - sudo apt-get -y install mpich libmpich-dev + sudo apt-get -y install mpich elif [ "${{ runner.os }}" = "macOS" ]; then brew install mpich fi From 0d70925e6aafbac2ecc458ab63e4a2bb77e382b8 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 17:39:08 -0600 Subject: [PATCH 06/11] Try using latest and greatest Eigen version. Build fails if you try to build with C++-11 standard with error message that states that 14 is needed. --- README.md | 2 +- meson.build | 4 ++-- subprojects/eigen.wrap | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5752add..a75d028 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ implementation provided by the user. ## Requirements Before building and installing the Python package, users must provide -* a compiler suite that includes a C++ compiler that supports the C++11 +* a compiler suite that includes a C++ compiler that supports the C++14 standard, * an MPI installation that is compatible with the compiler suite, and * optionally the [Eigen software package](https://gitlab.com/libeigen/eigen). diff --git a/meson.build b/meson.build index bddeae6..1ff649e 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # ----- SPECIFY PROJECT -# eigen dependency requires at least C++11 +# eigen dependency requires at least C++14 # # The version provided here is the version of the C++ library and command line # tools. The Python package maintains a separate version. If the C++ code is @@ -14,7 +14,7 @@ project('openbtmixing', 'cpp', license: 'MIT', license_files: 'LICENSE', default_options: [ - 'cpp_std=c++11', + 'cpp_std=c++14', 'buildtype=debug', 'default_library=shared', 'b_ndebug=if-release', diff --git a/subprojects/eigen.wrap b/subprojects/eigen.wrap index becc476..79465dd 100644 --- a/subprojects/eigen.wrap +++ b/subprojects/eigen.wrap @@ -1,13 +1,13 @@ [wrap-file] -directory = eigen-3.4.0 -source_url = https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2 -source_filename = eigen-3.4.0.tar.bz2 -source_hash = b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626 -patch_filename = eigen_3.4.0-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/eigen_3.4.0-2/get_patch -patch_hash = cb764fd9fec02d94aaa2ec673d473793c0d05da4f4154c142f76ef923ea68178 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/eigen_3.4.0-2/eigen-3.4.0.tar.bz2 -wrapdb_version = 3.4.0-2 +directory = eigen-5.0.1 +source_url = https://gitlab.com/libeigen/eigen/-/archive/5.0.1/eigen-5.0.1.tar.bz2 +source_filename = eigen-5.0.1.tar.bz2 +source_hash = e4de6b08f33fd8b8985d2f204381408c660bffa6170ac65b68ae1bd3cd575c0a +patch_filename = eigen_5.0.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/eigen_5.0.1-1/get_patch +patch_hash = 23407632af9388f4585547028c4ed363ff54875872cbf3e89c2085a14397f555 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/eigen_5.0.1-1/eigen-5.0.1.tar.bz2 +wrapdb_version = 5.0.1-1 [provide] -eigen3 = eigen_dep +dependency_names = eigen3 From 81106bcdb558e03580575ba6a4680cda05cbe343 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Mon, 15 Dec 2025 18:31:36 -0600 Subject: [PATCH 07/11] Get rid of variable warning. --- meson.build | 2 +- subprojects/README.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1ff649e..f861425 100644 --- a/meson.build +++ b/meson.build @@ -29,7 +29,7 @@ project('openbtmixing', 'cpp', # If users have a local install of eigen that can be discovered with pkg-config # or other Meson tricks, then that installation will be used. Otherwise, meson # will download the specific tarball as defined in eigen.wrap and use that. -eigen_dep = dependency('eigen3', fallback: ['eigen', 'eigen_dep']) +eigen_dep = dependency('eigen3', fallback: 'eigen') deps_all = [eigen_dep] # ----- USER ARGUMENTS diff --git a/subprojects/README.md b/subprojects/README.md index df2aeed..397cd1c 100644 --- a/subprojects/README.md +++ b/subprojects/README.md @@ -5,3 +5,8 @@ History ---------- * Pulled down `eigen.wrap` from meson's wrapDB as part of switching from autotools to meson. + +2025-12-15 +---------- +* Pulled down `eigen.wrap` from meson's wrapDB so that OpenBT can use the eigen + implementations for the newest major version (v5). From 049ebbe1760406ec30275de8ac524e376394374c Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Wed, 17 Dec 2025 14:45:03 -0600 Subject: [PATCH 08/11] (Issue #19) This would be a patch update. --- openbtmixing_pypkg/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbtmixing_pypkg/VERSION b/openbtmixing_pypkg/VERSION index 45a1b3f..781dcb0 100644 --- a/openbtmixing_pypkg/VERSION +++ b/openbtmixing_pypkg/VERSION @@ -1 +1 @@ -1.1.2 +1.1.3 From 1c64164edc4646b9721c989b793378e427856caa Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Fri, 13 Feb 2026 10:39:58 -0600 Subject: [PATCH 09/11] (Issue #19) Add MPI installation troubleshooting hints. These lines were originally in the Taweret installations docs. However, they are most useful here. They are being simultaneously removed from the Taweret docs. This (hopefully) finalizes the decoupling of these two packages. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index a75d028..1c622b9 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,11 @@ must provide * an MPI installation that is compatible with the compiler suite, and * optionally the [Eigen software package](https://gitlab.com/libeigen/eigen). +Note that if installing MPI using a package manager, related developer library +packages such as ``libopenmpi-dev`` or ``libmpich-dev`` might need to be +installed in addition to the base MPI packages such as ``openmpi-bin`` or +``mpich``. + To build and install just the bare C++ tools, users must provide in addition to the above * the [Meson build system](https://mesonbuild.com) and its prerequistes such as From ade1ee843d9afc5fcbf7a5b49db035c4fbe7ef21 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Fri, 13 Feb 2026 14:23:00 -0600 Subject: [PATCH 10/11] (Issue #19) Clean as part of PR review. Installation logs generated when installing the package indicate that the codecs package is now deprecated. We followed suggestions in the log to just use open. This issue was already found and handled identically with surmise. IIRC, the use of codecs was actually causing issues with surmise at some point. I did one successful build with these changes in place. --- .github/workflows/test_py_devmode.yml | 2 +- openbtmixing_pypkg/setup.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_py_devmode.yml b/.github/workflows/test_py_devmode.yml index 3602b5f..1c83e90 100644 --- a/.github/workflows/test_py_devmode.yml +++ b/.github/workflows/test_py_devmode.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-15, ubuntu-22.04] + os: [macos-15, ubuntu-24.04] python-version: ["3.14"] steps: diff --git a/openbtmixing_pypkg/setup.py b/openbtmixing_pypkg/setup.py index 5273765..8d1181f 100644 --- a/openbtmixing_pypkg/setup.py +++ b/openbtmixing_pypkg/setup.py @@ -1,7 +1,6 @@ import os import sys import shutil -import codecs import subprocess as sbp @@ -104,7 +103,7 @@ def run(self, *args, **kwargs): # ----- SPECIFY THE PACKAGE def readme_md(): fname = PKG_ROOT.joinpath("README.md") - with codecs.open(fname, "r", encoding="utf8") as fptr: + with open(fname, "r", encoding="utf8") as fptr: return fptr.read() From 5e99c8d91ab4b137841be5296daae55d117b64f7 Mon Sep 17 00:00:00 2001 From: Jared O'Neal Date: Fri, 13 Feb 2026 14:33:32 -0600 Subject: [PATCH 11/11] (Issue #19) Try Open-MPI for sake of Ubuntu 24.04. See notes in test_py_sdist.yml --- .github/workflows/test_py_devmode.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_py_devmode.yml b/.github/workflows/test_py_devmode.yml index 1c83e90..5bac601 100644 --- a/.github/workflows/test_py_devmode.yml +++ b/.github/workflows/test_py_devmode.yml @@ -25,13 +25,13 @@ jobs: ##-- Setup Testing Environment - name: Checkout OpenBTMixing uses: actions/checkout@v4 - - name: Install MPICH + - name: Install Open-MPI run: | if [ "${{ runner.os }}" = "Linux" ]; then sudo apt-get update - sudo apt-get -y install mpich + sudo apt-get -y install openmpi-bin libopenmpi-dev elif [ "${{ runner.os }}" = "macOS" ]; then - brew install mpich + brew install open-mpi fi - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5