Add a new entry in the MPI_Status struct. We need a place to keep the cancelled flag which can
be set using MPI_Status_set_cancelled. This commit was SVN r4522.
Этот коммит содержится в:
родитель
52529660e2
Коммит
33f62c7f75
@ -66,6 +66,7 @@ struct ompi_status_public_t {
|
||||
int MPI_TAG;
|
||||
int MPI_ERROR;
|
||||
int _count;
|
||||
int _cancelled;
|
||||
};
|
||||
typedef struct ompi_status_public_t ompi_status_public_t;
|
||||
|
||||
|
@ -95,7 +95,7 @@
|
||||
parameter (MPI_CART=1)
|
||||
parameter (MPI_GRAPH=2)
|
||||
parameter (MPI_KEYVAL_INVALID=-1)
|
||||
parameter (MPI_STATUS_SIZE=4)
|
||||
parameter (MPI_STATUS_SIZE=5)
|
||||
parameter (MPI_SOURCE=1)
|
||||
parameter (MPI_TAG=2)
|
||||
parameter (MPI_ERROR=3)
|
||||
|
@ -32,11 +32,11 @@ static const char FUNC_NAME[] = "MPI_Status_set_cancelled";
|
||||
|
||||
int MPI_Status_set_cancelled(MPI_Status *status, int flag)
|
||||
{
|
||||
if (MPI_PARAM_CHECK) {
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
}
|
||||
if (MPI_PARAM_CHECK) {
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
}
|
||||
|
||||
/* This function is not yet implemented */
|
||||
status->_cancelled = flag;
|
||||
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_OTHER, FUNC_NAME);
|
||||
}
|
||||
|
@ -32,15 +32,16 @@ static const char FUNC_NAME[] = "MPI_Test_cancelled";
|
||||
|
||||
int MPI_Test_cancelled(MPI_Status *status, int *flag)
|
||||
{
|
||||
int rc = MPI_SUCCESS;
|
||||
if (MPI_PARAM_CHECK) {
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
if (NULL == flag || NULL == status) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
int rc = MPI_SUCCESS;
|
||||
|
||||
*flag = 0;
|
||||
return rc;
|
||||
if (MPI_PARAM_CHECK) {
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
if (NULL == flag || NULL == status) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
*flag = status->_cancelled;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,7 @@ int ompi_request_init(void)
|
||||
ompi_request_null.req_status.MPI_TAG = MPI_ANY_TAG;
|
||||
ompi_request_null.req_status.MPI_ERROR = MPI_SUCCESS;
|
||||
ompi_request_null.req_status._count = 0;
|
||||
ompi_request_null.req_status._cancelled = 0;
|
||||
|
||||
ompi_request_null.req_state = OMPI_REQUEST_INACTIVE;
|
||||
ompi_request_null.req_complete = true;
|
||||
@ -88,6 +89,7 @@ int ompi_request_init(void)
|
||||
ompi_status_empty.MPI_TAG = MPI_ANY_TAG;
|
||||
ompi_status_empty.MPI_ERROR = MPI_SUCCESS;
|
||||
ompi_status_empty._count = 0;
|
||||
ompi_status_empty._cancelled = 0;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user