浏览代码

mpi/src/starpu_mpi.c: use correct types to initialise mpi objects, and set the default handler to MPI_ERRORS_RETURN, the default MPI_ERRORS_ARE_FATAL exits the program and hence does not allow to see a backtrace

Nathalie Furmento 11 年之前
父节点
当前提交
0362a99418
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      mpi/src/starpu_mpi.c

+ 4 - 3
mpi/src/starpu_mpi.c

@@ -250,7 +250,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req *req)
 	/* Initialize the request structure */
 	/* Initialize the request structure */
 	req->data_handle = NULL;
 	req->data_handle = NULL;
 
 
-	req->datatype = NULL;
+	req->datatype = 0;
 	req->ptr = NULL;
 	req->ptr = NULL;
 	req->count = -1;
 	req->count = -1;
 	req->user_datatype = -1;
 	req->user_datatype = -1;
@@ -262,7 +262,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req *req)
 	req->func = NULL;
 	req->func = NULL;
 
 
 	req->status = NULL;
 	req->status = NULL;
-	req->request = NULL;
+	req->request = 0;
 	req->flag = NULL;
 	req->flag = NULL;
 
 
 	req->ret = -1;
 	req->ret = -1;
@@ -283,7 +283,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req *req)
 	req->callback = NULL;
 	req->callback = NULL;
 	req->callback_arg = NULL;
 	req->callback_arg = NULL;
 
 
-	req->size_req = NULL;
+	req->size_req = 0;
 	req->internal_req = NULL;
 	req->internal_req = NULL;
 	req->is_internal_req = 0;
 	req->is_internal_req = 0;
 	req->envelope = NULL;
 	req->envelope = NULL;
@@ -1237,6 +1237,7 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
 
 
 	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 	MPI_Comm_size(MPI_COMM_WORLD, &worldsize);
 	MPI_Comm_size(MPI_COMM_WORLD, &worldsize);
+	MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
 
 
 	{
 	{
 		TRACE_MPI_START(rank, worldsize);
 		TRACE_MPI_START(rank, worldsize);