b1191b2831
* Added new tests validating gotcha wrappers
* Update MPI example to use thread
* Tweaks to mpi-flat test and mpi_gotcha
- enabled MPI_Comm_size and MPI_Comm_rank in mpip so disabled them at runtime
- set test to collapse threads and processes
* Tweak to test and example
- mpi test sets GOTCHA_DEBUG=1 in env
- removed checking for MPI_{Comm_dup,Comm_group,Group_incl}
- tweaked tests so pthread_join is where it is expected
27 lines
651 B
CMake
27 lines
651 B
CMake
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
|
|
|
project(omnitrace-mpi-example LANGUAGES CXX)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
find_package(MPI)
|
|
if(NOT MPI_FOUND)
|
|
message(AUTHOR_WARNING "MPI could not be found. Cannot build omnitrace-mpi target")
|
|
return()
|
|
endif()
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
add_executable(mpi-example mpi.cpp)
|
|
|
|
target_link_libraries(
|
|
mpi-example PRIVATE MPI::MPI_CXX Threads::Threads
|
|
$<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>)
|
|
|
|
if(OMNITRACE_INSTALL_EXAMPLES)
|
|
install(
|
|
TARGETS mpi-example
|
|
DESTINATION bin
|
|
COMPONENT omnitrace-examples)
|
|
endif()
|