Skip to content

Commit

Permalink
Merge pull request #23 from ITISFoundation/dakota6210
Browse files Browse the repository at this point in the history
Switch to dakota 6.21.0
  • Loading branch information
wvangeit authored Dec 16, 2024
2 parents d06cbb3 + 424dba5 commit 031e6c7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 192 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
all:


wheel: cache-clean clean
CIBW_BUILD=cp311*x86_64 cibuildwheel --platform linux

Expand All @@ -21,17 +20,16 @@ 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/pythoninclude.patch && \
git apply ../src_patches/boost.patch && \
git apply ../src_patches/dakenv_restart.patch && \
git apply ../src_patches/cstdint_dak_types.patch && \
git apply --whitespace=nowarn ../src_patches/adaptsampl_batch.patch && \
find . \( -name \*.cpp -o -name \*.hpp -o -name \*.c -o -name \*.h \) -exec \
sed -i -E -f ../src_patches/replace_old_macros_numpy.sed {} +
git apply --whitespace=nowarn ../src_patches/adaptsampl_batch.patch
cd dakota/packages/external && \
git apply ../../../src_patches/cstdint.patch
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/"
21 changes: 0 additions & 21 deletions src_patches/dakota-src.patch

This file was deleted.

13 changes: 2 additions & 11 deletions src_patches/find_python.patch → src_patches/findpython.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
diff --git a/cmake/DakotaFindPython.cmake b/cmake/DakotaFindPython.cmake
index 9ffa1ca..8edd853 100644
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)
+ list(APPEND dakota_python_components Development.Module)

if (DAKOTA_PYTHON_DIRECT_INTERFACE_LEGACY)
if (DAKOTA_PYTHON_DIRECT_INTERFACE)
@@ -31,7 +31,7 @@ macro(dakota_find_python)

endif()

- find_package(Python REQUIRED ${dakota_python_components})
+ # find_package(Python REQUIRED ${dakota_python_components})

if (DAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY)
message(STATUS "NumPy version ${Python_NumPy_VERSION} found at ${Python_NumPy_INCLUDE_DIRS}")
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")
152 changes: 0 additions & 152 deletions src_patches/replace_old_macros_numpy.sed

This file was deleted.

0 comments on commit 031e6c7

Please sign in to comment.