|
@@ -94,7 +94,7 @@ static void _starpu_mpi_request_init(struct _starpu_mpi_req **req)
|
|
|
(*req)->datatype = 0;
|
|
|
(*req)->ptr = NULL;
|
|
|
(*req)->count = -1;
|
|
|
- (*req)->user_datatype = -1;
|
|
|
+ (*req)->registered_datatype = -1;
|
|
|
|
|
|
(*req)->node_tag.rank = -1;
|
|
|
(*req)->node_tag.data_tag = -1;
|
|
@@ -167,8 +167,8 @@ static void _starpu_mpi_submit_ready_request(void *arg)
|
|
|
* before the next submission of the envelope-catching request. */
|
|
|
if (req->is_internal_req)
|
|
|
{
|
|
|
- _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->user_datatype);
|
|
|
- if (req->user_datatype == 0)
|
|
|
+ _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->registered_datatype);
|
|
|
+ if (req->registered_datatype == 1)
|
|
|
{
|
|
|
req->count = 1;
|
|
|
req->ptr = starpu_data_get_local_ptr(req->data_handle);
|
|
@@ -180,9 +180,9 @@ static void _starpu_mpi_submit_ready_request(void *arg)
|
|
|
STARPU_MPI_ASSERT_MSG(req->ptr, "cannot allocate message of size %ld\n", req->count);
|
|
|
}
|
|
|
|
|
|
- _STARPU_MPI_DEBUG(3, "Pushing internal starpu_mpi_irecv request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d \n",
|
|
|
+ _STARPU_MPI_DEBUG(3, "Pushing internal starpu_mpi_irecv request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d \n",
|
|
|
req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr,
|
|
|
- _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype);
|
|
|
+ _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype);
|
|
|
_starpu_mpi_req_list_push_front(ready_requests, req);
|
|
|
|
|
|
/* inform the starpu mpi thread that the request has been pushed in the ready_requests list */
|
|
@@ -233,8 +233,8 @@ static void _starpu_mpi_submit_ready_request(void *arg)
|
|
|
if (sync_req)
|
|
|
{
|
|
|
req->sync = 1;
|
|
|
- _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->user_datatype);
|
|
|
- if (req->user_datatype == 0)
|
|
|
+ _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->registered_datatype);
|
|
|
+ if (req->registered_datatype == 1)
|
|
|
{
|
|
|
req->count = 1;
|
|
|
req->ptr = starpu_data_get_local_ptr(req->data_handle);
|
|
@@ -260,8 +260,9 @@ static void _starpu_mpi_submit_ready_request(void *arg)
|
|
|
else
|
|
|
{
|
|
|
_starpu_mpi_req_list_push_front(ready_requests, req);
|
|
|
- _STARPU_MPI_DEBUG(3, "Pushing new request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d \n",
|
|
|
- req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype);
|
|
|
+ _STARPU_MPI_DEBUG(3, "Pushing new request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d \n",
|
|
|
+ req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr,
|
|
|
+ _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype);
|
|
|
}
|
|
|
|
|
|
newer_requests = 1;
|
|
@@ -321,7 +322,7 @@ static void _starpu_mpi_isend_data_func(struct _starpu_mpi_req *req)
|
|
|
{
|
|
|
_STARPU_MPI_LOG_IN();
|
|
|
|
|
|
- _STARPU_MPI_DEBUG(20, "post MPI isend request %p type %s tag %d src %d data %p datasize %ld ptr %p datatype '%s' count %d user_datatype %d sync %d\n", req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, starpu_data_get_size(req->data_handle), req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype, req->sync);
|
|
|
+ _STARPU_MPI_DEBUG(20, "post MPI isend request %p type %s tag %d src %d data %p datasize %ld ptr %p datatype '%s' count %d registered_datatype %d sync %d\n", req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, starpu_data_get_size(req->data_handle), req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype, req->sync);
|
|
|
|
|
|
_starpu_mpi_comm_amounts_inc(req->node_tag.comm, req->node_tag.rank, req->datatype, req->count);
|
|
|
|
|
@@ -355,14 +356,14 @@ static void _starpu_mpi_isend_data_func(struct _starpu_mpi_req *req)
|
|
|
|
|
|
static void _starpu_mpi_isend_size_func(struct _starpu_mpi_req *req)
|
|
|
{
|
|
|
- _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->user_datatype);
|
|
|
+ _starpu_mpi_handle_allocate_datatype(req->data_handle, &req->datatype, &req->registered_datatype);
|
|
|
|
|
|
req->envelope = calloc(1,sizeof(struct _starpu_mpi_envelope));
|
|
|
req->envelope->mode = _STARPU_MPI_ENVELOPE_DATA;
|
|
|
req->envelope->data_tag = req->node_tag.data_tag;
|
|
|
req->envelope->sync = req->sync;
|
|
|
|
|
|
- if (req->user_datatype == 0)
|
|
|
+ if (req->registered_datatype == 1)
|
|
|
{
|
|
|
int size;
|
|
|
req->count = 1;
|
|
@@ -505,7 +506,7 @@ static void _starpu_mpi_irecv_data_func(struct _starpu_mpi_req *req)
|
|
|
{
|
|
|
_STARPU_MPI_LOG_IN();
|
|
|
|
|
|
- _STARPU_MPI_DEBUG(20, "post MPI irecv request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d \n", req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype);
|
|
|
+ _STARPU_MPI_DEBUG(20, "post MPI irecv request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d \n", req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype);
|
|
|
|
|
|
_STARPU_MPI_TRACE_IRECV_SUBMIT_BEGIN(req->node_tag.rank, req->node_tag.data_tag);
|
|
|
|
|
@@ -707,8 +708,8 @@ static void _starpu_mpi_test_func(struct _starpu_mpi_req *testing_req)
|
|
|
/* Which is the mpi request we are testing for ? */
|
|
|
struct _starpu_mpi_req *req = testing_req->other_request;
|
|
|
|
|
|
- _STARPU_MPI_DEBUG(2, "Test request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d \n",
|
|
|
- req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype);
|
|
|
+ _STARPU_MPI_DEBUG(2, "Test request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d \n",
|
|
|
+ req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype);
|
|
|
|
|
|
_STARPU_MPI_TRACE_UTESTING_BEGIN(req->node_tag.rank, req->node_tag.data_tag);
|
|
|
|
|
@@ -893,9 +894,9 @@ static void _starpu_mpi_handle_request_termination(struct _starpu_mpi_req *req)
|
|
|
{
|
|
|
_STARPU_MPI_LOG_IN();
|
|
|
|
|
|
- _STARPU_MPI_DEBUG(2, "complete MPI request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d internal_req %p\n",
|
|
|
+ _STARPU_MPI_DEBUG(2, "complete MPI request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d internal_req %p\n",
|
|
|
req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr,
|
|
|
- _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype, req->internal_req);
|
|
|
+ _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype, req->internal_req);
|
|
|
|
|
|
if (req->internal_req)
|
|
|
{
|
|
@@ -909,7 +910,7 @@ static void _starpu_mpi_handle_request_termination(struct _starpu_mpi_req *req)
|
|
|
{
|
|
|
if (req->request_type == RECV_REQ || req->request_type == SEND_REQ)
|
|
|
{
|
|
|
- if (req->user_datatype == 1)
|
|
|
+ if (req->registered_datatype == 0)
|
|
|
{
|
|
|
if (req->request_type == SEND_REQ)
|
|
|
{
|
|
@@ -1118,8 +1119,8 @@ static void _starpu_mpi_handle_ready_request(struct _starpu_mpi_req *req)
|
|
|
STARPU_MPI_ASSERT_MSG(req, "Invalid request");
|
|
|
|
|
|
/* submit the request to MPI */
|
|
|
- _STARPU_MPI_DEBUG(2, "Handling new request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d user_datatype %d \n",
|
|
|
- req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->user_datatype);
|
|
|
+ _STARPU_MPI_DEBUG(2, "Handling new request %p type %s tag %d src %d data %p ptr %p datatype '%s' count %d registered_datatype %d \n",
|
|
|
+ req, _starpu_mpi_request_type(req->request_type), req->node_tag.data_tag, req->node_tag.rank, req->data_handle, req->ptr, _starpu_mpi_datatype(req->datatype), (int)req->count, req->registered_datatype);
|
|
|
req->func(req);
|
|
|
|
|
|
_STARPU_MPI_LOG_OUT();
|
|
@@ -1401,8 +1402,8 @@ static void *_starpu_mpi_progress_thread_func(void *arg)
|
|
|
_STARPU_MPI_DEBUG(2000, "Request sync %d\n", envelope->sync);
|
|
|
|
|
|
early_request->sync = envelope->sync;
|
|
|
- _starpu_mpi_handle_allocate_datatype(early_request->data_handle, &early_request->datatype, &early_request->user_datatype);
|
|
|
- if (early_request->user_datatype == 0)
|
|
|
+ _starpu_mpi_handle_allocate_datatype(early_request->data_handle, &early_request->datatype, &early_request->registered_datatype);
|
|
|
+ if (early_request->registered_datatype == 1)
|
|
|
{
|
|
|
early_request->count = 1;
|
|
|
early_request->ptr = starpu_data_get_local_ptr(early_request->data_handle);
|