|
@@ -36,6 +36,8 @@
|
|
|
|
|
|
static void _starpu_mpi_isend_irecv_common(struct _starpu_mpi_req *req, enum starpu_data_access_mode mode, int sequential_consistency)
|
|
|
{
|
|
|
+ unsigned node = STARPU_MAIN_RAM; // For now
|
|
|
+
|
|
|
/* Asynchronously request StarPU to fetch the data in main memory: when
|
|
|
* it is available in main memory, _starpu_mpi_submit_ready_request(req) is called and
|
|
|
* the request is actually submitted */
|
|
@@ -47,19 +49,21 @@ static void _starpu_mpi_isend_irecv_common(struct _starpu_mpi_req *req, enum sta
|
|
|
if (size)
|
|
|
{
|
|
|
/* This will potentially block */
|
|
|
- starpu_memory_allocate(STARPU_MAIN_RAM, size, STARPU_MEMORY_WAIT);
|
|
|
+ starpu_memory_allocate(node, size, STARPU_MEMORY_WAIT);
|
|
|
req->reserved_size = size;
|
|
|
+ /* This also decides where we will store the data */
|
|
|
+ req->node = node;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (sequential_consistency)
|
|
|
{
|
|
|
- starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, STARPU_MAIN_RAM, mode, _starpu_mpi_submit_ready_request, (void *)req, 1 /*sequential consistency*/, 1, &req->pre_sync_jobid, &req->post_sync_jobid);
|
|
|
+ starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, node, mode, _starpu_mpi_submit_ready_request, (void *)req, 1 /*sequential consistency*/, 1, &req->pre_sync_jobid, &req->post_sync_jobid);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
/* post_sync_job_id has already been filled */
|
|
|
- starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, STARPU_MAIN_RAM, mode, _starpu_mpi_submit_ready_request, (void *)req, 0 /*sequential consistency*/, 1, &req->pre_sync_jobid, NULL);
|
|
|
+ starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids(req->data_handle, node, mode, _starpu_mpi_submit_ready_request, (void *)req, 0 /*sequential consistency*/, 1, &req->pre_sync_jobid, NULL);
|
|
|
}
|
|
|
}
|
|
|
|