Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
55f2164
refactors build system
ryanmrichard Jul 1, 2026
4d17c14
disable MPI tests for now
ryanmrichard Jul 1, 2026
e3d59bc
update distribution name
ryanmrichard Jul 1, 2026
91a898e
pass includes to catch2_tests directly
ryanmrichard Jul 2, 2026
3fd7d76
add dependency
ryanmrichard Jul 2, 2026
262b19e
code factorization
ryanmrichard Jul 7, 2026
2de1718
Retarget NWChemEx/ -> ryanmrichard/ for fork testing; adopt test_nwx_…
ryanmrichard Jul 8, 2026
9e9f09f
Trigger CI (NWXCMake PIC fix landed on fork)
ryanmrichard Jul 8, 2026
53daea5
isort: reorder conftest.py imports (parallelzone before pytest)
ryanmrichard Jul 8, 2026
3f6ecaf
Use steady_clock instead of high_resolution_clock in CPU::profile_it
ryanmrichard Jul 8, 2026
93a9edb
Relax CPU::profile_it wall_time assertion to >= 0
ryanmrichard Jul 8, 2026
2dafc8a
Add TestPyPI publish job to merge.yaml; retarget NWXCMake build dep t…
ryanmrichard Jul 9, 2026
9814fd5
Use shared deploy_to_pypi.yaml (fixes macOS-leg publish failure)
ryanmrichard Jul 9, 2026
7c3c795
Inline deploy_to_pypi (reusable workflows unsupported by PyPI trusted…
ryanmrichard Jul 9, 2026
33df2f1
deploy_to_pypi: install MPI inside the cibuildwheel manylinux/macOS c…
ryanmrichard Jul 9, 2026
ce39496
Retrigger CI: nwxcmake now installs transitive shared deps for wheel …
ryanmrichard Jul 10, 2026
91848ca
Retrigger CI: fixed wheel rpath for shared transitive deps
ryanmrichard Jul 10, 2026
431bb9e
Retrigger CI: debug verbosity bump for wheel build
ryanmrichard Jul 10, 2026
e9e0ffb
Retrigger CI: force CMAKE_INSTALL_LIBDIR=lib (fixes manylinux2014 lib…
ryanmrichard Jul 10, 2026
a8647db
deploy_to_pypi: add extra_index_url (parallelzone depends on nwchemex…
ryanmrichard Jul 10, 2026
a04d2de
Re-trigger CI to rebuild wheel with OpenMPI 4.1.6 fix (matches Ubuntu…
ryanmrichard Jul 12, 2026
58c016e
Re-trigger CI to rebuild wheel with OpenMPI --enable-mpirun-prefix-by…
ryanmrichard Jul 12, 2026
854405b
Re-trigger CI to rebuild wheel with OpenMPI --disable-dlopen fix
ryanmrichard Jul 12, 2026
4e71a59
Republish: pick up build_pypi_dist fix (stop vendoring MPI, require s…
ryanmrichard Jul 12, 2026
9117428
Republish: fix build_pypi_dist to use exact sonames for auditwheel --…
ryanmrichard Jul 13, 2026
3d43d81
use fork
ryanmrichard Jul 15, 2026
06c027b
update pyproject.toml
ryanmrichard Aug 3, 2026
f0e9f0c
add pre-commit to gitignore
ryanmrichard Aug 3, 2026
69e3b16
update pyproject.toml
ryanmrichard Aug 3, 2026
7a0a375
adds python build
ryanmrichard Aug 4, 2026
ce6d75c
move nwxcmake/pybind11 to project
ryanmrichard Aug 5, 2026
e021ef2
update nightly
ryanmrichard Aug 5, 2026
e7e93d1
Migrate CI and dependencies from ryanmrichard to NWChemEx
ryanmrichard Aug 5, 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
46 changes: 46 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,49 @@ jobs:
with:
doc_target: "parallelzone_cxx_api"
secrets: inherit

platform_matrix:
uses: NWChemEx/.github/.github/workflows/platform_matrix.yaml@master

build_pypi_dist:
needs: [tag-commit, platform_matrix]
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.platform_matrix.outputs.release_matrix) }}
runs-on: ${{ matrix.os }}
steps:
- name: Build PyPI Distribution
uses: NWChemEx/.github/.github/actions/build_pypi_dist@master
with:
cibw_build: ${{ matrix.cibw_build }}
build_sdist: ${{ matrix.os == 'ubuntu-latest' && 'true' || 'false' }}
needs_mpi: "true"

- name: Upload Distribution Artifact
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: dist/

# A separate, ubuntu-only publish job (rather than a publish step per
# build_pypi_dist leg) because pypa/gh-action-pypi-publish only runs on
# Linux, and because PyPI trusted publishing does not support reusable
# workflows (this job must be defined directly here, not delegated).
deploy_to_pypi:
needs: build_pypi_dist
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download All Distributions
uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
13 changes: 10 additions & 3 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@
#

name: Nightly Workflow
# Re-runs the same build/test jobs pull_request.yaml runs, on a schedule, to
# catch breakage that originates outside the repo (upstream dependency
# releases, refreshed GitHub runner images) rather than from a code change.
# Keep the job list below in sync with pull_request.yaml.

on:
schedule:
- cron: "0 6 * * *" # Every day at 06:00 UTC (00:00 CST)

jobs:
test_library:
uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master
test_cmake_build:
uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master
with:
compilers: '["gcc-14", "clang-18"]'
run_python_tests: "true"

test_pip_build:
uses: NWChemEx/.github/.github/workflows/test_nwx_pip_build.yaml@master
9 changes: 6 additions & 3 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ jobs:
with:
doc_target: "parallelzone_cxx_api"

test_library:
uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master
test_cmake_build:
uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master
with:
compilers: '["gcc-14", "clang-18"]'
run_python_tests: "true"

test_pip_build:
uses: NWChemEx/.github/.github/workflows/test_nwx_pip_build.yaml@master
25 changes: 0 additions & 25 deletions .github/workflows/run_tests_on_master.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ toolchain.cmake

# For development often install to a subdirectory of the repo called "install"
install/

# PyTest's cache directory
.pytest_cache/

# Automatically installed in dev mode
.pre-commit-config.yaml
192 changes: 75 additions & 117 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,147 +14,105 @@

cmake_minimum_required(VERSION 3.14)

# Downloads common CMake modules used throughout NWChemEx
# Put the shared NWXCMake modules on CMAKE_MODULE_PATH *before* project() so
# nwx_set_version() is available to compute the project version.
include(cmake/get_nwx_cmake.cmake)

#Sets the version to whatever git thinks it is
include(get_version_from_git)
get_version_from_git(parallelzone_version "${CMAKE_CURRENT_LIST_DIR}")
include(nwx_set_version)
nwx_set_version(parallelzone_version "${CMAKE_CURRENT_LIST_DIR}")
project(parallelzone VERSION "${parallelzone_version}" LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)

include(get_cmaize)
include(nwx_find_package)
include(disable_in_source_builds)
include(set_default_nwx_options)

# Work out the project paths
set(project_inc_dir "${CMAKE_CURRENT_LIST_DIR}/include/${PROJECT_NAME}")
set(project_src_dir "${CMAKE_CURRENT_LIST_DIR}/src/${PROJECT_NAME}")

# Builds C++ API documentation
### Options ###
option(BUILD_CPP_JOULES "Enable energy usage tracking with CPP Joules library?" OFF)
option(BUILD_CUDA_BINDINGS "Enable CUDA Bindings" OFF)
option(BUILD_HIP_BINDINGS "Enable HIP Bindings" OFF)
option(BUILD_SYCL_BINDINGS "Enable SYCL Bindings" OFF)
option(BUILD_PAPI_BINDINGS "Enable PAPI Bindings" OFF)

# Project paths (relative dirs are resolved against CMAKE_CURRENT_SOURCE_DIR by
# the NWXCMake helpers). project_priv_dir is the private source root the C++
# tests include detail_ headers from as <parallelzone/.../detail_/...>.
set(project_inc_dir "cxx/include")
set(project_src_dir "cxx/src")
set(project_priv_dir "${CMAKE_CURRENT_LIST_DIR}/cxx/src")

# Builds C++ API documentation (no-op unless BUILD_DOCS is on)
include(nwx_cxx_api_docs)
nwx_cxx_api_docs("README.md" "${project_inc_dir}" "${project_src_dir}")

### Options ###
cmaize_option_list(
BUILD_TESTING OFF "Should we build the tests?"
BUILD_PYBIND11_PYBINDINGS ON "Should we build pybind11 python bindings?"
BUILD_CPP_JOULES OFF "Enable energy usage tracking with CPP Joules library?"
BUILD_CUDA_BINDINGS OFF "Enable CUDA Bindings"
BUILD_HIP_BINDINGS OFF "Enable HIP Bindings"
BUILD_SYCL_BINDINGS OFF "Enable SYCL Bindings"
BUILD_PAPI_BINDINGS OFF "Enable PAPI Bindings"
)

if (BUILD_CUDA_BINDING OR BUILD_HIP_BINDINGS OR BUILD_SYCL_BINDING)
include(build_device)
if(BUILD_CUDA_BINDINGS OR BUILD_HIP_BINDINGS OR BUILD_SYCL_BINDINGS)
include(build_device)
endif()

### Dependendencies ###
### Dependencies ###
include(nwx_find_mpi)
nwx_find_mpi()

nwx_find_package(
MPI
REQUIRED
TARGETS
mpi "MPI::MPI_CXX"
)
set(project_depends mpi)

cmaize_find_or_build_dependency(
spdlog
URL github.com/gabime/spdlog
VERSION v1.16.0
BUILD_TARGET spdlog
FIND_TARGET spdlog::spdlog
CMAKE_ARGS SPDLOG_INSTALL=ON
)
list(APPEND project_depends spdlog)
include(get_dependencies)
get_dependencies(spdlog cereal)

set(project_depends MPI::MPI_CXX spdlog::spdlog cereal::cereal)

# PAPI bindings are enabled, leading to building PAPI with CUDA or ROCm support
if("${BUILD_PAPI_BINDINGS}")
if(BUILD_PAPI_BINDINGS)
include(build_papi)
endif ()
endif()

if("${BUILD_CPP_JOULES}")
cmaize_find_or_build_dependency(
if(BUILD_CPP_JOULES)
include(FetchContent)
FetchContent_Declare(
cpp_joules
BUILD_CPP_JOULES
URL github.com/rishalab/CPPJoules
VERSION main
BUILD_TARGET CPP_Joules
FIND_TARGET CPP_Joules::CPP_Joules
GIT_REPOSITORY https://github.com/rishalab/CPPJoules
GIT_TAG main
)
list(APPEND project_depends cpp_joules)
FetchContent_MakeAvailable(cpp_joules)
list(APPEND project_depends CPP_Joules::CPP_Joules)
endif()

cmaize_find_or_build_dependency(
cereal
URL github.com/USCiLab/cereal
VERSION v1.3.2
BUILD_TARGET cereal
FIND_TARGET cereal::cereal
CMAKE_ARGS JUST_INSTALL_CEREAL=ON
)
list(APPEND project_depends cereal)

cmaize_add_library(
${PROJECT_NAME}
SOURCE_DIR "${project_src_dir}"
INCLUDE_DIRS "${project_inc_dir}"
DEPENDS "${project_depends}"
### Library ###
include(nwx_library)
nwx_library(
${PROJECT_NAME} "${project_inc_dir}" "${project_src_dir}" ${project_depends}
)

if("${BUILD_CPP_JOULES}")
target_compile_definitions("${PROJECT_NAME}" PRIVATE BUILD_CPP_JOULES)
if(BUILD_CPP_JOULES)
target_compile_definitions(${PROJECT_NAME} PRIVATE BUILD_CPP_JOULES)
endif()

# N.B. this is a no-op if BUILD_PYBIND11_PYBINDINGS is not turned on
include(nwx_pybind11)
nwx_add_pybind11_module(
### Python bindings (no-op unless BUILD_PYBIND11_BINDINGS is on) ###
include(nwx_python_module)
nwx_python_module(${PROJECT_NAME} "${project_src_dir}")

### Tests ###
include(catch2_tests_from_dir)
catch2_tests_from_dir(
test_unit_parallelzone
"tests/cxx/unit_tests"
${PROJECT_NAME}
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/src/python"
DEPENDS "${PROJECT_NAME}"
PRIVATE_INCLUDES "${project_priv_dir}"
)
catch2_tests_from_dir(
test_parallelzone_docs
"tests/cxx/doc_snippets"
${PROJECT_NAME}
PRIVATE_INCLUDES "${project_priv_dir}"
)

if("${BUILD_TESTING}")
set(CXX_TEST_DIR "${CMAKE_CURRENT_LIST_DIR}/tests/cxx")
set(PYTHON_TEST_DIR "${CMAKE_CURRENT_LIST_DIR}/tests/python")

include(get_catch2)

cmaize_add_tests(
test_unit_parallelzone
SOURCE_DIR "${CXX_TEST_DIR}/unit_tests"
INCLUDE_DIRS "${project_src_dir}"
DEPENDS Catch2::Catch2 ${PROJECT_NAME}
)

cmaize_add_tests(
test_parallelzone_docs
SOURCE_DIR "${CXX_TEST_DIR}/doc_snippets"
INCLUDE_DIRS "${project_src_dir}"
DEPENDS Catch2::Catch2 ${PROJECT_NAME}
)

# N.B. these are no-ops if BUILD_PYBIND11_PYBINDINGS is not turned on
nwx_pybind11_tests(
py_parallelzone "${PYTHON_TEST_DIR}/unit_tests/test_parallelzone.py"
)

nwx_pybind11_tests(
py_doc_snippets "${PYTHON_TEST_DIR}/doc_snippets/test_doc_snippets.py"
)

add_test(
NAME "test_pz_under_mpi"
COMMAND "${MPIEXEC_EXECUTABLE}" "${MPIEXEC_NUMPROC_FLAG}" "2"
"${CMAKE_BINARY_DIR}/test_unit_parallelzone"
)

add_test(
NAME "test_pz_docs_under_mpi"
COMMAND "${MPIEXEC_EXECUTABLE}" "${MPIEXEC_NUMPROC_FLAG}" "2"
"${CMAKE_BINARY_DIR}/test_parallelzone_docs"
)
endif()
# Also run the C++ tests under MPI with 2 ranks.
include(nwx_mpi_test)
#nwx_mpi_test(test_pz_under_mpi test_unit_parallelzone NPROC 2)
#nwx_mpi_test(test_pz_docs_under_mpi test_parallelzone_docs NPROC 2)

cmaize_add_package(${PROJECT_NAME} NAMESPACE nwx::)
# Python tests (no-op unless BUILD_PYBIND11_BINDINGS is on)
include(nwx_python_test)
nwx_python_test(
py_parallelzone
"${CMAKE_CURRENT_LIST_DIR}/tests/python/unit_tests/test_parallelzone.py"
)
nwx_python_test(
py_doc_snippets
"${CMAKE_CURRENT_LIST_DIR}/tests/python/doc_snippets/test_doc_snippets.py"
)
Loading
Loading