diff --git a/CMakeLists.txt b/CMakeLists.txt index a2cbc5ea..1dec8ccf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,15 +280,31 @@ if (ENABLE_CALIPER) include_directories(tpl/caliper/include) else() find_package(caliper REQUIRED) - find_package(adiak REQUIRED) + #find_package(adiak REQUIRED) endif() + if (DEFINED adiak_DIR) + # First, build Adiak with: + # cd tpl/adiak/ ; mkdir build + # cmake -DBUILD_SHARED_LIBS=Off -DENABLE_MPI=On -DMPI_C_COMPILER=mpiamdclang -DMPI_CXX_COMPILER=mpiamdclang++ -DCMAKE_C_COMPILER=mpiamdclang -DCMAKE_CXX_COMPILER=mpiamdclang++ -DCMAKE_INSTALL_PREFIX=./install .. + # make -j + # Then, set adiak_DIR=tpl/adiak/build/install/lib/cmake/adiak/ when building Kripke. + find_package(adiak REQUIRED) + list(APPEND KRIPKE_DEPENDS caliper adiak::adiak) + else () + # This method requires a modified adiak, where the MPI target is not exported in adiak2/src/CMakeLists.txt. + set(BUILD_SHARED_LIBS False CACHE BOOL "") + add_subdirectory(tpl/adiak2) + include_directories(tpl/adiak2/include) + list(APPEND KRIPKE_DEPENDS caliper adiak) + endif() + # blt_register_library(NAME caliper # INCLUDES ${caliper_INCLUDE_DIR} # LIBRARIES caliper) set(KRIPKE_USE_CALIPER TRUE) - list(APPEND KRIPKE_DEPENDS caliper adiak::adiak) + #list(APPEND KRIPKE_DEPENDS caliper adiak::adiak) endif() message(STATUS "Caliper support is ${KRIPKE_USE_CALIPER}") diff --git a/host-configs/llnl-toss4-MI300A-rocm6-adams.cmake b/host-configs/llnl-toss4-MI300A-rocm6-adams.cmake index 41069784..d15e4b41 100644 --- a/host-configs/llnl-toss4-MI300A-rocm6-adams.cmake +++ b/host-configs/llnl-toss4-MI300A-rocm6-adams.cmake @@ -29,6 +29,8 @@ set(GPU_TARGETS "gfx942" CACHE STRING "") set(AMD_GPU_TARGETS "gfx942" CACHE STRING "") set(ENABLE_CHAI On CACHE BOOL "") +set(ENABLE_CALIPER On CACHE BOOL "") +set(ENABLE_ADIAK On CACHE BOOL "") set(ENABLE_HIP On CACHE BOOL "") set(ENABLE_OPENMP Off CACHE BOOL "") set(ENABLE_MPI On CACHE BOOL "") diff --git a/tpl/adiak b/tpl/adiak new file mode 160000 index 00000000..f08c8375 --- /dev/null +++ b/tpl/adiak @@ -0,0 +1 @@ +Subproject commit f08c8375c613e13e9b9c6a1db271cbf8f0d3f3e3 diff --git a/tpl/adiak2 b/tpl/adiak2 new file mode 160000 index 00000000..f08c8375 --- /dev/null +++ b/tpl/adiak2 @@ -0,0 +1 @@ +Subproject commit f08c8375c613e13e9b9c6a1db271cbf8f0d3f3e3