1
1

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.
Этот коммит содержится в:
George Bosilca 2005-02-24 00:12:26 +00:00
родитель 52529660e2
Коммит 33f62c7f75
5 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -66,6 +66,7 @@ struct ompi_status_public_t {
int MPI_TAG; int MPI_TAG;
int MPI_ERROR; int MPI_ERROR;
int _count; int _count;
int _cancelled;
}; };
typedef struct ompi_status_public_t ompi_status_public_t; typedef struct ompi_status_public_t ompi_status_public_t;

Просмотреть файл

@ -95,7 +95,7 @@
parameter (MPI_CART=1) parameter (MPI_CART=1)
parameter (MPI_GRAPH=2) parameter (MPI_GRAPH=2)
parameter (MPI_KEYVAL_INVALID=-1) parameter (MPI_KEYVAL_INVALID=-1)
parameter (MPI_STATUS_SIZE=4) parameter (MPI_STATUS_SIZE=5)
parameter (MPI_SOURCE=1) parameter (MPI_SOURCE=1)
parameter (MPI_TAG=2) parameter (MPI_TAG=2)
parameter (MPI_ERROR=3) parameter (MPI_ERROR=3)

Просмотреть файл

@ -36,7 +36,7 @@ int MPI_Status_set_cancelled(MPI_Status *status, int flag)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME); 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);
} }

Просмотреть файл

@ -33,6 +33,7 @@ static const char FUNC_NAME[] = "MPI_Test_cancelled";
int MPI_Test_cancelled(MPI_Status *status, int *flag) int MPI_Test_cancelled(MPI_Status *status, int *flag)
{ {
int rc = MPI_SUCCESS; int rc = MPI_SUCCESS;
if (MPI_PARAM_CHECK) { if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME); OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == flag || NULL == status) { if (NULL == flag || NULL == status) {
@ -40,7 +41,7 @@ int MPI_Test_cancelled(MPI_Status *status, int *flag)
} }
} }
*flag = 0; *flag = status->_cancelled;
return rc; 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_TAG = MPI_ANY_TAG;
ompi_request_null.req_status.MPI_ERROR = MPI_SUCCESS; ompi_request_null.req_status.MPI_ERROR = MPI_SUCCESS;
ompi_request_null.req_status._count = 0; 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_state = OMPI_REQUEST_INACTIVE;
ompi_request_null.req_complete = true; 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_TAG = MPI_ANY_TAG;
ompi_status_empty.MPI_ERROR = MPI_SUCCESS; ompi_status_empty.MPI_ERROR = MPI_SUCCESS;
ompi_status_empty._count = 0; ompi_status_empty._count = 0;
ompi_status_empty._cancelled = 0;
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }