5a1cec92e8
* CDash name prefix {{ repo_owner }}-{{ ref_name }}
- remove /merge from CI name
* disable using BFD when sampling_include_inlines is OFF
- this consumes a lot of memory
* Improve finalization of rocprofiler
* update timemory submodule
- disable OMPT thread begin/end callbacks
- support hierarchies in signal handlers
- update operation::pop_node debugging
- settings_update_type + setting_supported_data_types
- fixed parsing args in timemory_init
* Improve timemory build time
* Remove kokkosp restrictions for perfetto
* omnitrace exe signal handler update
- configure signal handlers before main to allow libomnitrace to override
* Backtrace and timemory submodule updates
- Use unwind::cache w/o inline info
- update timemory submodule
- unwind::cache updates
- filepath updates
- fix termination_signal_message
- fix vsettings::report_change
* Update dyninst submodule
- updates BinaryEdit::getResolvedLibraryPath
* update timemory submodule
- update CpuArch support
* Cleanup configure warnings
* Update examples cmake and workflows
- (Mostly) eliminate configuration warnings
* omnitrace exe updates
- pass environ to BPatch::processCreate
- avoid trailing ":" in DYNINST_REWRITER_PATHS
* Update dyninst submodule
- Add flags to DyninstOptimization.cmake
- Remove strtok from BinaryEdit::getResolvedLibraryPath
* examples/mpi CMakeLists.txt update
- STATUS message about missing MPI during CI, otherwise AUTHOR_WARNING
* Dev build and linker flags
- use -gsplit-dwarf when OMNITRACE_BUILD_DEVELOPER is ON
- disable when OMNITRACE_BUILD_NUMBER > 1
- OMNITRACE_BUILD_LINKER option
- add -fuse-ld=${OMNITRACE_BUILD_LINKER}
- omnitrace_add_cache_option function
* Update workflows to set OMNITRACE_BUILD_NUMBER
* Fix generator expressions for -fuse-ld
* Suppress some configuration warnings during CI
- helps to keep track of real warnings when they arise
* Update timemory and dyninst submodules with CMP0135
* Add -V flag to run-ci script
[ROCm/rocprofiler-systems commit: f147670a7a]
84 lines
2.7 KiB
CMake
84 lines
2.7 KiB
CMake
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
|
|
|
project(omnitrace-lulesh-example LANGUAGES C CXX)
|
|
|
|
if(OMNITRACE_DISABLE_EXAMPLES)
|
|
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
|
|
|
|
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
|
|
OMNITRACE_DISABLE_EXAMPLES)
|
|
return()
|
|
endif()
|
|
endif()
|
|
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
|
|
option(LULESH_BUILD_KOKKOS "Build Kokkos from submodule" ON)
|
|
if(LULESH_BUILD_KOKKOS)
|
|
add_subdirectory(external)
|
|
if(LULESH_USE_CUDA)
|
|
kokkos_compilation(PROJECT COMPILER ${Kokkos_NVCC_WRAPPER})
|
|
elseif(LULESH_USE_HIP AND NOT "${CMAKE_CXX_COMPILER}" MATCHES "hipcc")
|
|
if(NOT HIPCC_EXECUTABLE)
|
|
find_package(hip QUIET HINTS ${ROCmVersion_DIR} PATHS ${ROCmVersion_DIR})
|
|
|
|
find_program(
|
|
HIPCC_EXECUTABLE
|
|
NAMES hipcc
|
|
HINTS ${ROCmVersion_DIR} ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCmVersion_DIR} ${ROCM_PATH} ENV ROCM_PATH /opt/rocm)
|
|
mark_as_advanced(HIPCC_EXECUTABLE)
|
|
endif()
|
|
kokkos_compilation(PROJECT COMPILER ${HIPCC_EXECUTABLE})
|
|
endif()
|
|
else()
|
|
find_package(Kokkos REQUIRED COMPONENTS separable_compilation)
|
|
kokkos_compilation(PROJECT)
|
|
endif()
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|
set(CMAKE_BUILD_TYPE
|
|
"Release"
|
|
CACHE STRING "CMake build type" FORCE)
|
|
endif()
|
|
|
|
option(LULESH_USE_MPI "Enable MPI" OFF)
|
|
add_library(lulesh-mpi INTERFACE)
|
|
if(LULESH_USE_MPI)
|
|
find_package(MPI REQUIRED)
|
|
target_compile_definitions(lulesh-mpi INTERFACE USE_MPI=1)
|
|
target_link_libraries(lulesh-mpi INTERFACE MPI::MPI_C MPI::MPI_CXX)
|
|
else()
|
|
target_compile_definitions(lulesh-mpi INTERFACE USE_MPI=0)
|
|
endif()
|
|
|
|
if(NOT TARGET Kokkos::kokkos)
|
|
find_package(Kokkos REQUIRED)
|
|
endif()
|
|
|
|
file(GLOB headers ${PROJECT_SOURCE_DIR}/*.h ${PROJECT_SOURCE_DIR}/*.hxx)
|
|
file(GLOB sources ${PROJECT_SOURCE_DIR}/*.cc)
|
|
|
|
add_executable(lulesh ${sources} ${headers})
|
|
target_include_directories(lulesh PRIVATE ${PROJECT_SOURCE_DIR}/includes)
|
|
target_link_libraries(lulesh PRIVATE Kokkos::kokkos lulesh-mpi)
|
|
|
|
if(OMNITRACE_INSTALL_EXAMPLES)
|
|
if(LULESH_BUILD_KOKKOS)
|
|
install(
|
|
TARGETS kokkoscore kokkoscontainers
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
COMPONENT omnitrace-examples)
|
|
set_target_properties(lulesh PROPERTIES INSTALL_RPATH
|
|
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
|
endif()
|
|
install(
|
|
TARGETS lulesh
|
|
DESTINATION bin
|
|
COMPONENT omnitrace-examples)
|
|
endif()
|