|
@@ -54,9 +54,16 @@ static void _starpu_mpi_set_src_node_id()
|
|
|
|
|
|
int _starpu_mpi_common_mp_init()
|
|
|
{
|
|
|
- if (mpi_initialized || MPI_Init(_starpu_get_argc(), _starpu_get_argv()) != MPI_SUCCESS)
|
|
|
+ int thread_support;
|
|
|
+ if (mpi_initialized || MPI_Init_thread(_starpu_get_argc(), _starpu_get_argv(), MPI_THREAD_MULTIPLE, &thread_support) != MPI_SUCCESS)
|
|
|
return 0;
|
|
|
|
|
|
+ if (thread_support != MPI_THREAD_MULTIPLE)
|
|
|
+ {
|
|
|
+ fprintf(stderr, "MPI doesn't support MPI_THREAD_MULTIPLE option. MPI Master-Slave can have problems if multiple slaves are launched. \n");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
mpi_initialized = 1;
|
|
|
|
|
|
/* Find which node is the master */
|