Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mallocMC #5280

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions include/pmacc/PMaccConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ set(_PMACC_MAX_ALPAKA_VERSION 1.2.0)
# do not search for alpaka if it already exists
# for example, a project that includes alpaka via add_subdirectory before including pmacc via add_subdirectory
if(NOT TARGET alpaka::alpaka)

# mallocMC needs this and it must be set before alpaka is added
if(alpaka_ACC_GPU_CUDA_ENABLE OR alpaka_ACC_GPU_HIP_ENABLE)
set(alpaka_INSTALL ON CACHE BOOL "" FORCE)
endif()

# the alpaka provider for the internal alpaka is only available,
# if pmacc is used via add_subdirectory in another project
# or examples are build
Expand Down Expand Up @@ -378,18 +384,17 @@ endif()
################################################################################

if(alpaka_ACC_GPU_CUDA_ENABLE OR alpaka_ACC_GPU_HIP_ENABLE)
set(mallocMC_alpaka_PROVIDER "extern" CACHE STRING "Select which alpaka is used for mallocMC")
find_package(mallocMC 2.6.0 QUIET)
if(PMACC_alpaka_PROVIDER STREQUAL "intern")
set(mallocMC_USE_alpaka "${PMacc_DIR}/../../thirdParty/alpaka" CACHE STRING "Select which alpaka is used for mallocMC")
endif()
find_package(mallocMC 3.0.0 QUIET)

if(NOT mallocMC_FOUND)
message(STATUS "Using mallocMC from thirdParty/ directory")
set(MALLOCMC_ROOT "${PMacc_DIR}/../../thirdParty/mallocMC")
find_package(mallocMC 2.6.0 REQUIRED)
add_subdirectory("${PMacc_DIR}/../../thirdParty/mallocMC" ${CMAKE_BINARY_DIR}/mallocMC)
endif(NOT mallocMC_FOUND)

target_include_directories(pmacc PUBLIC ${mallocMC_INCLUDE_DIRS})
target_link_libraries(pmacc PUBLIC ${mallocMC_LIBRARIES})
target_compile_definitions(pmacc PUBLIC ${mallocMC_DEFINITIONS})
target_link_libraries(pmacc PUBLIC mallocMC::mallocMC)
endif()


Expand Down
158 changes: 0 additions & 158 deletions thirdParty/cmake-modules/FindmallocMC.cmake

This file was deleted.