Add variants with nodes
This commit is contained in:
parent
c543a5582c
commit
71bbd6d7c6
@ -90,5 +90,9 @@ cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
find_package(MPI)
|
||||
find_package(Nanos6)
|
||||
find_package(Nodes)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
include(FeatureSummary)
|
||||
feature_summary(WHAT ALL)
|
||||
|
@ -2,19 +2,34 @@ if(NOT MPI_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_library(heat_mpi_common STATIC main.c utils.c)
|
||||
target_link_libraries(heat_mpi_common PUBLIC heat_common MPI::MPI_C)
|
||||
|
||||
macro(mk_heat_mpi NAME SOURCE)
|
||||
add_executable(${NAME} ${SOURCE} main.c utils.c)
|
||||
target_link_libraries(${NAME} PRIVATE heat_common MPI::MPI_C)
|
||||
add_executable(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE heat_mpi_common)
|
||||
install(TARGETS ${NAME} RUNTIME DESTINATION bin)
|
||||
endmacro()
|
||||
|
||||
mk_heat_mpi(heat_mpi solver_mpi.c)
|
||||
mk_heat_mpi(heat_mpi_nbuffer solver_mpi_nbuffer.c)
|
||||
|
||||
macro(mk_heat_mpi_oss NAME SOURCE)
|
||||
mk_heat_mpi(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE Nanos6::wrapper)
|
||||
endmacro()
|
||||
if(NANOS6_FOUND)
|
||||
macro(mk_heat_mpi_nanos6 NAME SOURCE)
|
||||
mk_heat_mpi(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE Nanos6::wrapper)
|
||||
endmacro()
|
||||
|
||||
mk_heat_mpi_oss(heat_mpi_ompss2_forkjoin solver_mpi_ompss2_forkjoin.c)
|
||||
mk_heat_mpi_oss(heat_mpi_ompss2_tasks solver_mpi_ompss2_tasks.c)
|
||||
mk_heat_mpi_nanos6(heat_mpi_nanos6_forkjoin solver_mpi_ompss2_forkjoin.c)
|
||||
mk_heat_mpi_nanos6(heat_mpi_nanos6_tasks solver_mpi_ompss2_tasks.c)
|
||||
endif()
|
||||
|
||||
if(NODES_FOUND)
|
||||
macro(mk_heat_mpi_nodes NAME SOURCE)
|
||||
mk_heat_mpi(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE Nodes::wrapper)
|
||||
endmacro()
|
||||
|
||||
mk_heat_mpi_nodes(heat_mpi_nodes_forkjoin solver_mpi_ompss2_forkjoin.c)
|
||||
mk_heat_mpi_nodes(heat_mpi_nodes_tasks solver_mpi_ompss2_tasks.c)
|
||||
endif()
|
||||
|
@ -1,10 +1,25 @@
|
||||
add_executable(heat_seq main.c solver_seq.c)
|
||||
target_link_libraries(heat_seq PUBLIC heat_common)
|
||||
add_library(heat_seq_common STATIC main.c)
|
||||
target_link_libraries(heat_seq_common PUBLIC heat_common)
|
||||
|
||||
add_executable(heat_ompss2 main.c solver_ompss2.c)
|
||||
target_link_libraries(heat_ompss2 PRIVATE heat_common
|
||||
Nanos6::wrapper)
|
||||
add_executable(heat_seq solver_seq.c)
|
||||
target_link_libraries(heat_seq PUBLIC heat_seq_common)
|
||||
|
||||
add_executable(heat_ompss2_residual main.c solver_ompss2_residual.c)
|
||||
target_link_libraries(heat_ompss2_residual PRIVATE heat_common
|
||||
Nanos6::wrapper)
|
||||
if(NANOS6_FOUND)
|
||||
macro(mk_heat_nanos6 NAME SOURCE)
|
||||
add_executable(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE heat_seq_common Nanos6::wrapper)
|
||||
install(TARGETS ${NAME} RUNTIME DESTINATION bin)
|
||||
endmacro()
|
||||
mk_heat_nanos6(heat_nanos6 solver_ompss2.c)
|
||||
mk_heat_nanos6(heat_nanos6_residual solver_ompss2_residual.c)
|
||||
endif()
|
||||
|
||||
if(NODES_FOUND)
|
||||
macro(mk_heat_nodes NAME SOURCE)
|
||||
add_executable(${NAME} ${SOURCE})
|
||||
target_link_libraries(${NAME} PRIVATE heat_seq_common Nodes::wrapper)
|
||||
install(TARGETS ${NAME} RUNTIME DESTINATION bin)
|
||||
endmacro()
|
||||
mk_heat_nodes(heat_nodes solver_ompss2.c)
|
||||
mk_heat_nodes(heat_nodes_residual solver_ompss2_residual.c)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user