Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 24b346de authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'master' into 'master'

starpu: use starpu_mpi_wait_for_all when available

See merge request !210
parents e68deb3e 71f409c7
No related branches found
No related tags found
1 merge request!210starpu: use starpu_mpi_wait_for_all when available
......@@ -645,6 +645,10 @@ if( CHAMELEON_SCHED_STARPU )
if ( HAVE_STARPU_MPI_INIT_CONF )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_INIT_CONF${ColourReset}")
endif()
check_function_exists(starpu_mpi_wait_for_all HAVE_STARPU_MPI_WAIT_FOR_ALL)
if ( HAVE_STARPU_MPI_WAIT_FOR_ALL )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_WAIT_FOR_ALL${ColourReset}")
endif()
check_function_exists(starpu_mpi_data_migrate HAVE_STARPU_MPI_DATA_MIGRATE)
if ( HAVE_STARPU_MPI_DATA_MIGRATE )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_DATA_MIGRATE${ColourReset}")
......
......@@ -55,9 +55,15 @@ int RUNTIME_sequence_wait( CHAM_context_t *chamctxt,
RUNTIME_progress(chamctxt);
}
starpu_task_wait_for_all();
#if defined(CHAMELEON_USE_MPI)
# if defined(HAVE_STARPU_MPI_WAIT_FOR_ALL)
starpu_mpi_wait_for_all(MPI_COMM_WORLD);
# else
starpu_task_wait_for_all();
starpu_mpi_barrier(MPI_COMM_WORLD);
# endif
#else
starpu_task_wait_for_all();
#endif
return CHAMELEON_SUCCESS;
}
......
......@@ -198,9 +198,17 @@ void RUNTIME_resume( CHAM_context_t *chamctxt )
void RUNTIME_barrier( CHAM_context_t *chamctxt )
{
(void)chamctxt;
starpu_task_wait_for_all();
#if defined(CHAMELEON_USE_MPI)
# if defined(HAVE_STARPU_MPI_WAIT_FOR_ALL)
starpu_mpi_wait_for_all(MPI_COMM_WORLD);
starpu_mpi_barrier(MPI_COMM_WORLD);
# else
starpu_task_wait_for_all();
starpu_mpi_barrier(MPI_COMM_WORLD);
# endif
#else
starpu_task_wait_for_all();
#endif
}
......
......@@ -37,6 +37,7 @@
#cmakedefine HAVE_STARPU_MPI_CACHED_RECEIVE
#cmakedefine HAVE_STARPU_MPI_COMM_GET_ATTR
#cmakedefine HAVE_STARPU_MPI_INIT_CONF
#cmakedefine HAVE_STARPU_MPI_WAIT_FOR_ALL
#if defined(CHAMELEON_USE_MPI)
#include <starpu_mpi.h>
......
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