Files
rocm-systems/examples/mpi/CMakeLists.txt
T
Jonathan R. Madsen f147670a7a Various optimizations (#192)
* 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
2022-11-01 17:28:12 -05:00

75 строки
2.4 KiB
CMake

cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(omnitrace-mpi-examples 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()
find_package(MPI)
if(NOT MPI_FOUND)
if("${CMAKE_PROJECT_NAME}" STREQUAL "omnitrace" AND "$ENV{OMNITRACE_CI}")
set(_MSG_TYPE STATUS) # don't generate warnings during CI
else()
set(_MSG_TYPE AUTHOR_WARNING)
endif()
message(${_MSG_TYPE} "MPI could not be found. Cannot build omnitrace-mpi target")
return()
endif()
find_package(Threads REQUIRED)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
add_library(mpi-c-interface-library INTERFACE)
target_link_libraries(
mpi-c-interface-library
INTERFACE Threads::Threads MPI::MPI_C
$<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>)
target_compile_options(mpi-c-interface-library INTERFACE -Wno-double-promotion)
add_executable(mpi-allgather allgather.c)
target_link_libraries(mpi-allgather PRIVATE mpi-c-interface-library)
add_executable(mpi-bcast bcast.c)
target_link_libraries(mpi-bcast PRIVATE mpi-c-interface-library)
add_executable(mpi-all2all all2all.c)
target_link_libraries(mpi-all2all PRIVATE mpi-c-interface-library)
add_executable(mpi-reduce reduce.c)
target_link_libraries(mpi-reduce PRIVATE mpi-c-interface-library)
add_executable(mpi-scatter-gather scatter-gather.c)
target_link_libraries(mpi-scatter-gather PRIVATE mpi-c-interface-library)
add_executable(mpi-send-recv send-recv.c)
target_link_libraries(mpi-send-recv PRIVATE mpi-c-interface-library)
add_executable(mpi-allreduce allreduce.c)
target_link_libraries(mpi-allreduce PRIVATE mpi-c-interface-library m)
set(CMAKE_BUILD_TYPE "Release")
add_library(mpi-cxx-interface-library INTERFACE)
target_link_libraries(
mpi-cxx-interface-library
INTERFACE Threads::Threads MPI::MPI_CXX
$<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>)
add_executable(mpi-example mpi.cpp)
target_link_libraries(mpi-example PRIVATE mpi-cxx-interface-library)
if(OMNITRACE_INSTALL_EXAMPLES)
install(
TARGETS mpi-example mpi-allgather mpi-bcast mpi-all2all mpi-reduce
mpi-scatter-gather mpi-send-recv
DESTINATION bin
COMPONENT omnitrace-examples)
endif()