diff --git a/control/async.c b/control/async.c index d933e381789144622826025f79a1737a3a57d3dc..d877bca7d9d5a0f883eea642dd39565690fad15c 100644 --- a/control/async.c +++ b/control/async.c @@ -48,6 +48,9 @@ int chameleon_sequence_create(CHAM_context_t *chamctxt, RUNTIME_sequence_t **seq return CHAMELEON_ERR_OUT_OF_RESOURCES; } + (*sequence)->comm = chamctxt->comm; + (*sequence)->myrank = RUNTIME_comm_rank( chamctxt ); + RUNTIME_sequence_create( chamctxt, *sequence ); (*sequence)->status = CHAMELEON_SUCCESS; diff --git a/include/chameleon/runtime_struct.h b/include/chameleon/runtime_struct.h index cbedc48a172b5993e08003c5e9ba02cac74addfe..d2122d0838f375986641b8cb922f431a48eabbdf 100644 --- a/include/chameleon/runtime_struct.h +++ b/include/chameleon/runtime_struct.h @@ -84,9 +84,10 @@ typedef struct runtime_request_s { */ typedef struct runtime_sequence_s { int status; /**< Return status registered by the tasks for the request */ + int myrank; /**< MPI Comm rank within the associated communicator */ RUNTIME_request_t *request; /**< Pointer to the request that failed if any, NULL otherwise */ void *schedopt; /**< Specific runtime data pointer to handle the sequence */ - MPI_Comm comm; /**< MPI communicator */ + MPI_Comm comm; /**< MPI communicator */ } RUNTIME_sequence_t; /** diff --git a/runtime/starpu/control/runtime_async.c b/runtime/starpu/control/runtime_async.c index 790181977e43c4d721bdb398f9a79701e0a5f1e7..848d0f7aa54291b4a86546ead770ad2f1c422f4a 100644 --- a/runtime/starpu/control/runtime_async.c +++ b/runtime/starpu/control/runtime_async.c @@ -24,11 +24,10 @@ /** * Create a sequence */ -int RUNTIME_sequence_create( CHAM_context_t *chamctxt, +int RUNTIME_sequence_create( CHAM_context_t *chamctxt, RUNTIME_sequence_t *sequence ) { (void)chamctxt; - sequence->comm = chamctxt->comm; return CHAMELEON_SUCCESS; }