1
1

Consistency in handling OPAL_ENABLE_FT_CR.

I am not sure if we should continue to maintain the request support
for FT_CR, but I tried here to simplify the code while maintaining
the same meaning.
Этот коммит содержится в:
George Bosilca 2016-06-03 00:54:24 +09:00
родитель 483b9c370a
Коммит fc5d458249
2 изменённых файлов: 31 добавлений и 17 удалений

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

@ -49,7 +49,11 @@ int ompi_request_default_test(ompi_request_t ** rptr,
}
if( REQUEST_COMPLETE(request) ) {
OMPI_CRCP_REQUEST_COMPLETE(request);
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
*completed = true;
/* For a generalized request, we *have* to call the query_fn
@ -120,7 +124,11 @@ int ompi_request_default_test_any(
}
if( REQUEST_COMPLETE(request) ) {
OMPI_CRCP_REQUEST_COMPLETE(request);
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
*index = i;
*completed = true;
@ -226,7 +234,11 @@ int ompi_request_default_test_all(
if (OMPI_REQUEST_GEN == request->req_type) {
ompi_grequest_invoke_query(request, &request->req_status);
}
OMPI_CRCP_REQUEST_COMPLETE(request);
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
statuses[i] = request->req_status;
if( request->req_persistent ) {
request->req_state = OMPI_REQUEST_INACTIVE;
@ -257,7 +269,11 @@ int ompi_request_default_test_all(
if (OMPI_REQUEST_GEN == request->req_type) {
ompi_grequest_invoke_query(request, &request->req_status);
}
OMPI_CRCP_REQUEST_COMPLETE(request);
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
if( request->req_persistent ) {
request->req_state = OMPI_REQUEST_INACTIVE;
continue;
@ -285,7 +301,7 @@ int ompi_request_default_test_some(
int * indices,
ompi_status_public_t * statuses)
{
size_t i, num_requests_null_inactive=0, num_requests_done = 0;
size_t i, num_requests_null_inactive = 0, num_requests_done = 0;
int rc = OMPI_SUCCESS;
ompi_request_t **rptr;
ompi_request_t *request;
@ -299,7 +315,11 @@ int ompi_request_default_test_some(
continue;
}
if( REQUEST_COMPLETE(request) ) {
OMPI_CRCP_REQUEST_COMPLETE(request);
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
indices[num_requests_done++] = i;
}
}

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

@ -143,6 +143,11 @@ int ompi_request_default_wait_any(size_t count,
request = requests[*index];
assert( REQUEST_COMPLETE(request) );
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled ) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
#endif
/* Per note above, we have to call gen request query_fn even
if STATUS_IGNORE was provided */
if (OMPI_REQUEST_GEN == request->req_type) {
@ -166,17 +171,6 @@ int ompi_request_default_wait_any(size_t count,
rc = ompi_request_free(&requests[*index]);
}
#if OPAL_ENABLE_FT_CR == 1
if( opal_cr_is_enabled) {
ompi_request_t **rptr = requests;
for (i = 0; i < count; i++, rptr++) {
request = *rptr;
if( REQUEST_COMPLETE(request) ) {
OMPI_CRCP_REQUEST_COMPLETE(request);
}
}
}
#endif
WAIT_SYNC_RELEASE(&sync);
return rc;
}