Commit 3cd4d5ca authored by Antoine Jego's avatar Antoine Jego
Browse files

preprocessing checking starpu available functions

parent aa097eaa
......@@ -107,20 +107,24 @@ find_package(LAPACKE REQUIRED)
# Add the unique executable ...
# -------------
add_library(Dense_matrices dsmat.c)
add_library(Tile_interface optional_tile_interface.c)
#add_library(Dense_matrices dsmat.c)
#add_library(Tile_interface optional_tile_interface.c)
add_executable( starpu_example_dgemm starpu_example_dgemm.c dsmat.c optional_tile_interface.c )
if( ENABLE_MPI )
target_link_libraries( Dense_matrices PUBLIC MPI::MPI_C )
target_link_libraries( Tile_interface PUBLIC MPI::MPI_C )
# target_link_libraries( Dense_matrices PUBLIC MPI::MPI_C )
# target_link_libraries( Tile_interface PUBLIC MPI::MPI_C )
target_link_libraries( starpu_example_dgemm PUBLIC MPI::MPI_C )
target_compile_definitions( starpu_example_dgemm PUBLIC ENABLE_MPI )
endif()
if(ENABLE_STARPU)
target_link_libraries( Dense_matrices PRIVATE MORSE::STARPU )
target_link_libraries( Tile_interface PRIVATE MORSE::STARPU )
# target_link_libraries( Dense_matrices PRIVATE MORSE::STARPU )
# target_link_libraries( Tile_interface PRIVATE MORSE::STARPU )
target_link_libraries( starpu_example_dgemm PRIVATE MORSE::STARPU )
target_compile_definitions( starpu_example_dgemm PUBLIC ENABLE_STARPU )
check_function_exists(starpu_data_peek HAVE_STARPU_DATA_PEEK)
if (ENABLE_MPI)
check_function_exists(starpu_mpi_interface_datatype_node_register HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER)
endif()
endif()
target_link_libraries( starpu_example_dgemm PUBLIC MORSE::LAPACKE )
target_link_libraries( starpu_example_dgemm PUBLIC MORSE::CBLAS )
......
......@@ -426,8 +426,10 @@ struct starpu_data_interface_ops starpu_interface_tile_ops =
.compare = ti_compare,
.alloc_compare = ti_alloc_compare,
.display = ti_display,
.pack_data = ti_pack_data,
#if defined (HAVE_STARPU_DATA_PEEK)
.peek_data = ti_peek_data,
#endif
.pack_data = ti_pack_data,
.unpack_data = ti_unpack_data,
.describe = ti_describe,
.copy_methods =&ti_copy_methods,
......@@ -462,9 +464,15 @@ starpu_tile_interface_register()
if ( starpu_interface_tile_ops.interfaceid == STARPU_UNKNOWN_INTERFACE_ID )
{
starpu_interface_tile_ops.interfaceid = starpu_data_interface_get_next_id();
#if defined (HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER)
starpu_mpi_interface_datatype_node_register( starpu_interface_tile_ops.interfaceid,
ti_allocate_datatype_node,
ti_free_datatype );
#else
starpu_mpi_interface_datatype_register( starpu_interface_tile_ops.interfaceid,
ti_allocate_datatype_node,
ti_free_datatype );
#endif
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment