From aa0ade21760984c61e79d8860b2565290107fe5f Mon Sep 17 00:00:00 2001 From: "Short, Dan" Date: Tue, 6 Feb 2024 10:28:08 +0000 Subject: [PATCH 1/8] Update supported python versions Target current supported versions. --- .github/workflows/python_package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index ca28fa3..37b2bf7 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.10 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: 3.10.9 + python-version: 3.12.1 - name: Build plasma source run: | pip install --upgrade pip @@ -36,7 +36,7 @@ jobs: needs: build strategy: matrix: - python-version: [3.9.16, 3.10.9] + python-version: [3.9.16, 3.10.9, 3.11.7, 3.12.1] steps: - uses: actions/checkout@v2 @@ -63,7 +63,7 @@ jobs: needs: build strategy: matrix: - python-version: [3.9.16, 3.10.9] + python-version: [3.9.16, 3.10.9, 3.11.7, 3.12.1] steps: - uses: actions/checkout@v2 From b98293f2f43fb622d14325cb405af7ee0f695a27 Mon Sep 17 00:00:00 2001 From: "Short, Dan" Date: Tue, 6 Feb 2024 10:28:52 +0000 Subject: [PATCH 2/8] Update pybind11 Move to 2.11.1. --- pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybind11 b/pybind11 index d54d6d8..8a099e4 160000 --- a/pybind11 +++ b/pybind11 @@ -1 +1 @@ -Subproject commit d54d6d8c613914a7063897d5ddddc62348ffe74a +Subproject commit 8a099e44b3d5f85b20f05828d919d2332a8de841 From d2145c5476e1eede68e9e879370df724af6abab7 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:20:27 +0000 Subject: [PATCH 3/8] Pin OpenMC version Move to latest release version at 0.14.0. --- .github/workflows/cmake_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_build_and_test.yml b/.github/workflows/cmake_build_and_test.yml index a71270f..bf8f39d 100644 --- a/.github/workflows/cmake_build_and_test.yml +++ b/.github/workflows/cmake_build_and_test.yml @@ -21,7 +21,7 @@ jobs: cd /opt git clone https://github.com/openmc-dev/openmc.git cd openmc - git checkout develop + git checkout 0.14.0 mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=.. .. make From d81e0ff518cf62ece959a42d7c833e2e3709b240 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:29:20 +0000 Subject: [PATCH 4/8] Fix tag --- .github/workflows/cmake_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake_build_and_test.yml b/.github/workflows/cmake_build_and_test.yml index bf8f39d..34fa041 100644 --- a/.github/workflows/cmake_build_and_test.yml +++ b/.github/workflows/cmake_build_and_test.yml @@ -21,7 +21,7 @@ jobs: cd /opt git clone https://github.com/openmc-dev/openmc.git cd openmc - git checkout 0.14.0 + git checkout v0.14.0 mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=.. .. make From d904a3bf7163567ad1acf0fc5c3a8aedf94ed4e6 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:39:48 +0000 Subject: [PATCH 5/8] Add HDF5 dependency source_sampling.so now needs HDF5 due to upstream changes. --- parametric_plasma_source/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parametric_plasma_source/CMakeLists.txt b/parametric_plasma_source/CMakeLists.txt index a29e4c1..e7a3a42 100644 --- a/parametric_plasma_source/CMakeLists.txt +++ b/parametric_plasma_source/CMakeLists.txt @@ -57,13 +57,16 @@ if(OpenMC_FOUND) add_library(source_sampling SHARED ${source_sampling_SOURCES}) + find_package(HDF5 REQUIRED) + find_library(OPENMC_LIB openmc HINTS ${OPENMC_LIB_DIR} OPTIONAL) if (OPENMC_LIB) set_target_properties(source_sampling PROPERTIES PREFIX "") set_target_properties(source_sampling PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(source_sampling PUBLIC ${OPENMC_INC_DIR}) - target_link_libraries(source_sampling ${OPENMC_LIB} gfortran) + target_include_directories(source_sampling PUBLIC ${HDF5_INCLUDE_DIRS}) + target_link_libraries(source_sampling ${OPENMC_LIB} ${HDF5_LIBRARIES}) endif() # Build source_generator if OpenMC is available @@ -73,8 +76,6 @@ if(OpenMC_FOUND) add_executable(source_generator ${source_generator_SOURCES}) - find_package(HDF5 REQUIRED) - set_target_properties(source_generator PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(source_generator PUBLIC ${OPENMC_INC_DIR}) target_include_directories(source_generator PUBLIC ${HDF5_INCLUDE_DIRS}) From 729a0ef79ad50cb528967d49488d968794695ec6 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:48:28 +0000 Subject: [PATCH 6/8] Update class name to match changes in OpenMC CustomSourceWrapper --> CompiledSourceWrapper. --- parametric_plasma_source/src/source_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parametric_plasma_source/src/source_generator.cpp b/parametric_plasma_source/src/source_generator.cpp index d7eb50a..f6f01c9 100644 --- a/parametric_plasma_source/src/source_generator.cpp +++ b/parametric_plasma_source/src/source_generator.cpp @@ -141,7 +141,7 @@ int main(int argc, char* argv[]) } std::cout << "Sampling source:" << std::endl; - openmc::model::external_sources.push_back(std::make_unique(path_source_library, source_parameters)); + openmc::model::external_sources.push_back(std::make_unique(path_source_library, source_parameters)); openmc::calculate_work(); openmc::allocate_banks(); openmc::initialize_source(); From 2b865c71e6ed9e203df1de335698bc5d6e5a66e6 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:58:37 +0000 Subject: [PATCH 7/8] Pin OpenMC for python tests Pins OpenMC to latest release version (v0.14.0). --- .github/workflows/python_package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index 37b2bf7..d6dda34 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -82,7 +82,7 @@ jobs: sudo apt install g++ cmake libhdf5-dev git clone https://github.com/openmc-dev/openmc.git cd openmc - git checkout develop + git checkout v0.14.0 mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=.. .. make From 26b75d851921824ac5d0fae21dec44bcdcf1ab69 Mon Sep 17 00:00:00 2001 From: Dan Short <66615563+DanShort12@users.noreply.github.com> Date: Tue, 6 Feb 2024 21:14:09 +0000 Subject: [PATCH 8/8] Update README Describes the support for OpenMC v0.14.0. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ebb0c7b..af06e66 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,13 @@ The package can be built and installed in editable mode by: Compiling of the parametric plasma source from source is another method of using the software. -First clone the openmc repository into your home directory +First clone the openmc repository into your home directory (we currently support OpenMC v0.14.0) + ```bash cd ~ -git clone https://github.com/openmc-dev/openmc.git +git clone -b v0.14.0 --depth 1 https://github.com/openmc-dev/openmc.git ``` + Then clone the parametric plasma source repository ```bash @@ -49,7 +51,7 @@ git clone https://github.com/open-radiation-sources/parametric-plasma-source.git ``` Then create a build folder and compile from the folder. This assumes that -openmc repository was cloned into your home directory ```/opt/openmc```. +openmc repository was cloned into a directory at `/opt/openmc`. ```bash cd parametric-plasma-source