Skip to content

Commit

Permalink
Switch to dakota 6.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wvangeit committed Dec 16, 2024
1 parent d06cbb3 commit ad86559
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ cache-clean:

get-dakota-src:
rm -rf dakota
git clone -j4 --branch v6.20.0 --depth 1 https://github.com/snl-dakota/dakota.git
git clone -j4 --branch v6.21.0 --depth 1 https://github.com/snl-dakota/dakota.git
cd dakota && \
git submodule update --init packages/external && \
git submodule update --init packages/pecos && \
git submodule update --init packages/surfpack && \
git apply ../src_patches/dakota-src.patch && \
git apply ../src_patches/findpython.patch && \
git apply ../src_patches/boost.patch && \
git apply ../src_patches/dakenv_restart.patch && \
git apply ../src_patches/cstdint_dak_types.patch && \
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ local_scheme = "no-local-version"

[tool.cibuildwheel]
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel} && ./scripts/fix_wheel.sh {dest_dir}"
build-verbosity = 2
build-verbosity = 1

[tool.cibuildwheel.environment]
BOOST_LIBRARYDIR = "/usr/lib64/boost1.78"
Expand All @@ -59,7 +59,7 @@ before-all = [
"tar xzvf sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz",
"cp sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/",
"pip install setuptools_scm",
"python -m setuptools_scm --force-write-version-files"
"python -m setuptools_scm --force-write-version-files",
]
skip = "*-musllinux_*"
manylinux-x86_64-image="quay.io/pypa/manylinux_2_28_x86_64:2024-12-05-7ed1b2d"
Expand All @@ -79,6 +79,7 @@ DAKOTA_PYTHON_WRAPPER = "ON"
DAKOTA_PYTHON_DIRECT_INTERFACE = "ON"
BUILD_SHARED_LIBS = "OFF"
CMAKE_POSITION_INDEPENDENT_CODE = "ON"
# CMAKE_VERBOSE_MAKEFILE = "ON"

[tool.pytest.ini_options]
addopts = "--ignore=dakota/"
13 changes: 13 additions & 0 deletions src_patches/findpython.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cmake/DakotaFindPython.cmake b/cmake/DakotaFindPython.cmake
index 9ffa1ca..d7a2152 100644
--- a/cmake/DakotaFindPython.cmake
+++ b/cmake/DakotaFindPython.cmake
@@ -8,7 +8,7 @@ macro(dakota_find_python)
if(DAKOTA_PYTHON_DIRECT_INTERFACE OR DAKOTA_PYTHON_SURROGATES OR
DAKOTA_PYTHON_WRAPPER OR DAKOTA_PYBIND11)
message(STATUS "Dakota enabling Python (Development) for direct or surrogate interface")
- list(APPEND dakota_python_components Development)
+ list(APPEND dakota_python_components Development.Module)

if (DAKOTA_PYTHON_DIRECT_INTERFACE_LEGACY)
if (DAKOTA_PYTHON_DIRECT_INTERFACE)
21 changes: 21 additions & 0 deletions src_patches/pythoninclude.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1cce3d2..2670950 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -325,11 +325,11 @@ if(DAKOTA_PYTHON_DIRECT_INTERFACE)
# TODO: Use target_definitions
# If not, use Python_LIBRARY_DIRS

- if(DAKOTA_PYTHON_DIRECT_INTERFACE_LEGACY)
- list(APPEND EXT_TPL_INCDIRS ${Python_INCLUDE_DIRS})
- add_definitions("-DDAKOTA_PYTHON_LEGACY")
- list(APPEND EXT_TPL_LIBS ${Python_LIBRARIES})
- endif()
+ # if(DAKOTA_PYTHON_DIRECT_INTERFACE_LEGACY)
+ list(APPEND EXT_TPL_INCDIRS ${Python_INCLUDE_DIRS})
+ # add_definitions("-DDAKOTA_PYTHON_LEGACY")
+ list(APPEND EXT_TPL_LIBS ${Python_LIBRARIES})
+ # endif()
# Pybind11 is also included alongside older Python interface
list(APPEND EXT_TPL_INCDIRS ${pybind11_INCLUDE_DIR})
add_definitions("-DDAKOTA_PYBIND11")

0 comments on commit ad86559

Please sign in to comment.