Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 90e56f6

Browse files
committed
using TBB, better GC
1 parent 9803955 commit 90e56f6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ find_package(pybind11 CONFIG)
2020
find_package(MPI REQUIRED)
2121
#find_package(OpenMP)
2222

23-
set(MKL_LIBRARIES -L$ENV{MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -ltbb -lpthread -lrt -ldl -lm)
23+
set(MKL_LIBRARIES -L$ENV{MKLROOT}/lib -lmkl_intel_lp64 -lmkl_tbb_thread -lmkl_core -ltbb -lpthread -lrt -ldl -lm)
2424
#set(CMAKE_INSTALL_RPATH $ENV{MKLROOT}/lib)
2525
# Use -fPIC even if statically compiled
2626
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -42,7 +42,7 @@ set(MyCppSources ${MyCppSources} ${P2C_HPP})
4242

4343
pybind11_add_module(_ddptensor MODULE ${MyCppSources})
4444

45-
target_compile_definitions(_ddptensor PRIVATE XTENSOR_USE_XSIMD=1 XTENSOR_USE_OPENMP=1 DDPT_2TYPES=1 USE_MKL=1)
45+
target_compile_definitions(_ddptensor PRIVATE XTENSOR_USE_XSIMD=1 XTENSOR_USE_TBB=1 DDPT_2TYPES=1 USE_MKL=1)
4646
target_include_directories(_ddptensor PRIVATE
4747
${PROJECT_SOURCE_DIR}/src/include
4848
${PROJECT_SOURCE_DIR}/third_party/xtl/include
@@ -52,5 +52,5 @@ target_include_directories(_ddptensor PRIVATE
5252
${PROJECT_SOURCE_DIR}/third_party/bitsery/include
5353
${MPI_INCLUDE_PATH} $ENV{MKLROOT}/include
5454
${pybind11_INCLUDE_DIRS})
55-
target_compile_options(_ddptensor PRIVATE -fopenmp)
55+
#target_compile_options(_ddptensor PRIVATE -fopenmp)
5656
target_link_libraries(_ddptensor PRIVATE ${MPI_C_LIBRARIES} ${MKL_LIBRARIES})

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def build_cmake(self, ext):
2929
extdir.parent.mkdir(parents=True, exist_ok=True)
3030

3131
# example of cmake args
32-
config = 'Debug'# if self.debug else 'Release' #'RelWithDebInfo'
32+
config = 'Debug' if self.debug else 'Release' # 'RelWithDebInfo' #'Release'
3333
cmake_args = [
3434
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + str(extdir.parent.absolute()),
3535
'-DCMAKE_BUILD_TYPE=' + config

src/include/ddptensor/x.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ namespace x
123123

124124
~DPTensorX()
125125
{
126-
// if(_id != Mediator::LOCAL_ONLY && theMediator) theMediator->unregister_array(_id);
126+
if(_id != Mediator::LOCAL_ONLY && theMediator) theMediator->unregister_array(_id);
127127
}
128128

129129
bool is_sliced() const

0 commit comments

Comments
 (0)