Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b4c9ffb3 authored by THIBAULT Samuel's avatar THIBAULT Samuel Committed by Mathieu Faverge
Browse files

starpu: Use starpu_mpi_interface_datatype_node_register when available

starpu_mpi_interface_datatype_node_register will allow StarPU-MPI to use
NUMA buffers and GPUDirect.
parent 2b1afed3
No related branches found
No related tags found
1 merge request!241starpu: Use starpu_mpi_interface_datatype_node_register when available
...@@ -84,8 +84,11 @@ if ( STARPU_FOUND ) ...@@ -84,8 +84,11 @@ if ( STARPU_FOUND )
set(CHAMELEON_USE_MIGRATE "OFF") set(CHAMELEON_USE_MIGRATE "OFF")
message("-- ${Blue}CHAMELEON_USE_MIGRATE is turned OFF because starpu_mpi_data_migrate not found${ColourReset}") message("-- ${Blue}CHAMELEON_USE_MIGRATE is turned OFF because starpu_mpi_data_migrate not found${ColourReset}")
endif() endif()
check_function_exists(starpu_mpi_interface_datatype_node_register HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER)
check_function_exists(starpu_mpi_interface_datatype_register HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER) check_function_exists(starpu_mpi_interface_datatype_register HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER)
if ( HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER ) if ( HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER${ColourReset}")
elseif ( HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER${ColourReset}") message("-- ${Blue}Add definition HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER${ColourReset}")
else() else()
if( CHAMELEON_USE_MPI_DATATYPES ) if( CHAMELEON_USE_MPI_DATATYPES )
......
...@@ -38,9 +38,10 @@ ...@@ -38,9 +38,10 @@
#cmakedefine HAVE_STARPU_MPI_COMM_GET_ATTR #cmakedefine HAVE_STARPU_MPI_COMM_GET_ATTR
#cmakedefine HAVE_STARPU_MPI_INIT_CONF #cmakedefine HAVE_STARPU_MPI_INIT_CONF
#cmakedefine HAVE_STARPU_MPI_WAIT_FOR_ALL #cmakedefine HAVE_STARPU_MPI_WAIT_FOR_ALL
#cmakedefine HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER
#cmakedefine HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER #cmakedefine HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER
#if !defined(HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER) && defined(CHAMELEON_USE_MPI_DATATYPES) #if (!defined(HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER) && !defined(HAVE_STARPU_MPI_INTERFACE_DATATYPE_REGISTER)) && defined(CHAMELEON_USE_MPI_DATATYPES)
#error "This version of StarPU does not support MPI datatypes (Please compile with -DCHAMELEON_USE_MPI_DATATYPES=OFF)" #error "This version of StarPU does not support MPI datatypes (Please compile with -DCHAMELEON_USE_MPI_DATATYPES=OFF)"
#endif #endif
......
...@@ -500,13 +500,14 @@ cti_handle_get_allocsize( starpu_data_handle_t handle ) ...@@ -500,13 +500,14 @@ cti_handle_get_allocsize( starpu_data_handle_t handle )
#if defined(CHAMELEON_USE_MPI_DATATYPES) #if defined(CHAMELEON_USE_MPI_DATATYPES)
int int
cti_allocate_datatype( starpu_data_handle_t handle, cti_allocate_datatype_node( starpu_data_handle_t handle,
MPI_Datatype *datatype ) unsigned node,
MPI_Datatype *datatype )
{ {
int ret; int ret;
starpu_cham_tile_interface_t *cham_tile_interface = (starpu_cham_tile_interface_t *) starpu_cham_tile_interface_t *cham_tile_interface = (starpu_cham_tile_interface_t *)
starpu_data_get_interface_on_node( handle, STARPU_MAIN_RAM ); starpu_data_get_interface_on_node( handle, node );
size_t m = cham_tile_interface->tile.m; size_t m = cham_tile_interface->tile.m;
size_t n = cham_tile_interface->tile.n; size_t n = cham_tile_interface->tile.n;
...@@ -522,6 +523,13 @@ cti_allocate_datatype( starpu_data_handle_t handle, ...@@ -522,6 +523,13 @@ cti_allocate_datatype( starpu_data_handle_t handle,
return 0; return 0;
} }
int
cti_allocate_datatype( starpu_data_handle_t handle,
MPI_Datatype *datatype )
{
return cti_allocate_datatype_node( handle, STARPU_MAIN_RAM, datatype );
}
void void
cti_free_datatype( MPI_Datatype *datatype ) cti_free_datatype( MPI_Datatype *datatype )
{ {
...@@ -536,9 +544,15 @@ starpu_cham_tile_interface_init() ...@@ -536,9 +544,15 @@ starpu_cham_tile_interface_init()
{ {
starpu_interface_cham_tile_ops.interfaceid = starpu_data_interface_get_next_id(); starpu_interface_cham_tile_ops.interfaceid = starpu_data_interface_get_next_id();
#if defined(CHAMELEON_USE_MPI_DATATYPES) #if defined(CHAMELEON_USE_MPI_DATATYPES)
#if defined(HAVE_STARPU_MPI_INTERFACE_DATATYPE_NODE_REGISTER)
starpu_mpi_interface_datatype_node_register( starpu_interface_cham_tile_ops.interfaceid,
cti_allocate_datatype_node,
cti_free_datatype );
#else
starpu_mpi_interface_datatype_register( starpu_interface_cham_tile_ops.interfaceid, starpu_mpi_interface_datatype_register( starpu_interface_cham_tile_ops.interfaceid,
cti_allocate_datatype, cti_allocate_datatype,
cti_free_datatype ); cti_free_datatype );
#endif
#endif #endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment