From 55c47adb8fd058f40500562fecf656f5d5a4e916 Mon Sep 17 00:00:00 2001 From: Daniel Dunning <39738037+djdunning@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:24:23 -0700 Subject: [PATCH] updated voxelizer stuff --- .conda/voxelizer/build.sh | 18 ++++++++++++++++-- .conda/voxelizer/meta.yaml | 15 ++++++++------- lib/Elements | 2 +- src/Voxelizer/CMakeLists.txt | 9 ++++++--- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/.conda/voxelizer/build.sh b/.conda/voxelizer/build.sh index 583dfbeec..e050feafc 100644 --- a/.conda/voxelizer/build.sh +++ b/.conda/voxelizer/build.sh @@ -2,9 +2,23 @@ source "$RECIPE_DIR/../cross-compile-setup.sh" export CMAKE_CXX_FLAGS=$PATCHED_CXXFLAGS -cd src/Voxelizer # Use the --prefix flag here because we are # not using the *host* python to do this. We are (against Anaconda's recommendations) # using the *build* python here, since we actually need to do cross compilation # not really sure how to do the cross compilation with python. -pip install --prefix=$PREFIX +###DANpip install --prefix=$PREFIX + +cd src/Voxelizer +mkdir build +cd build +cmake .. \ + -D CMAKE_BUILD_TYPE:STRING=RELEASE \ + -D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \ + -D CMAKE_CXX_STANDARD:STRING=17 \ + -D VECTOR_ARCH_FLAGS="$VECTOR_ARCH_FLAGS" \ + -D STANDLONE_VOXELIZER=ON \ + $CMAKE_ARGS \ + $SRC_DIR \ + -D CMAKE_CXX_FLAGS="$PATCHED_CXXFLAGS" \ + +make install diff --git a/.conda/voxelizer/meta.yaml b/.conda/voxelizer/meta.yaml index 7343ebf81..fdd0bf912 100644 --- a/.conda/voxelizer/meta.yaml +++ b/.conda/voxelizer/meta.yaml @@ -16,16 +16,17 @@ requirements: - cmake >=3.17.0 - {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux] - {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx] - - python={{ python }} - - pybind11 - - setuptools + - elements + # - python={{ python }} + # - pybind11 + # - setuptools host: - - python={{ python }} + # - python={{ python }} - elements - - llvm-openmp + - llvm-openmp # [osx] run: - - python={{ python }} - - llvm-openmp + # - python={{ python }} + # - llvm-openmp test: imports: diff --git a/lib/Elements b/lib/Elements index 0de655cd2..19b5cad11 160000 --- a/lib/Elements +++ b/lib/Elements @@ -1 +1 @@ -Subproject commit 0de655cd260e60e4f037a78561dddfb9c8757fc7 +Subproject commit 19b5cad11d411a914cf188814afb2bd6180c85b7 diff --git a/src/Voxelizer/CMakeLists.txt b/src/Voxelizer/CMakeLists.txt index d34f4ebc6..4046e0168 100644 --- a/src/Voxelizer/CMakeLists.txt +++ b/src/Voxelizer/CMakeLists.txt @@ -7,6 +7,9 @@ set(CMAKE_CXX_STANDARD 17) #find_package(Kokkos REQUIRED) #find_package(Matar REQUIRED) find_package(Elements REQUIRED) + +# Next chunk is for embedded in Fierro build +if (NOT STANDALONE_VOXELIZER) find_package(MPI REQUIRED) # Assume if the CXX compiler exists, the rest do too. @@ -23,15 +26,15 @@ if(NOT DISTRIBUTION) endif() #add_definitions(-DHAVE_KOKKOS=1) +include_directories(${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) +link_directories(${Trilinos_LIBRARY_DIRS} ${Trilinos_TPL_LIBRARY_DIRS}) +endif() # end of embedded chunk add_library(voxelizer src/stl-to-voxelvtk.cpp) target_include_directories(voxelizer PUBLIC include) #target_link_libraries(voxelizer matar Kokkos::kokkos) target_link_libraries(voxelizer Elements) -include_directories(${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) -link_directories(${Trilinos_LIBRARY_DIRS} ${Trilinos_TPL_LIBRARY_DIRS}) - add_executable(fierro-voxelizer src/main.cpp) target_link_libraries(fierro-voxelizer voxelizer) #target_compile_options(fierro-voxelizer PRIVATE "-fopenmp")