1
1

Correct the MPI semantics for all the fortran test/wait functions.

This commit was SVN r3366.
Этот коммит содержится в:
Jeff Squyres 2004-10-27 00:51:46 +00:00
родитель 4c9b34c428
Коммит 4a860a5a81
8 изменённых файлов: 29 добавлений и 30 удалений

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

@ -61,8 +61,8 @@ void mpi_test_f(MPI_Fint *request, MPI_Fint *flag,
OMPI_SINGLE_INT_2_FINT(flag);
if ( (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) && (NULL == c_req) ) {
*request = OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*request = OMPI_INT_2_FINT(c_req->req_f_to_c_index);
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
MPI_Status_c2f(&c_status, status);
}

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

@ -80,10 +80,7 @@ void mpi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *flag,
if (MPI_SUCCESS == OMPI_INT_2_FINT(*ierr) &&
1 == *(OMPI_SINGLE_NAME_CONVERT(flag))) {
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
if (NULL == c_req[i]) {
array_of_requests[i] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
}
array_of_requests[i] = c_req[i]->req_f_to_c_index;
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * 4]);

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

@ -82,10 +82,12 @@ void mpi_testany_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *index
/* Increment index by one for fortran conventions */
if (MPI_UNDEFINED != *(OMPI_SINGLE_NAME_CONVERT(index))) {
array_of_requests[*(OMPI_SINGLE_NAME_CONVERT(index))] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
++(OMPI_SINGLE_NAME_CONVERT(index));
OMPI_SINGLE_INT_2_FINT(index);
if (1 == OMPI_INT_2_FINT(*flag) &&
MPI_UNDEFINED != *(OMPI_SINGLE_NAME_CONVERT(index))) {
array_of_requests[OMPI_INT_2_FINT(*index)] =
c_req[OMPI_INT_2_FINT(*index)]->req_f_to_c_index;
++(*index);
}
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
MPI_Status_c2f(&c_status, status);

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

@ -89,15 +89,16 @@ void mpi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
if (MPI_UNDEFINED != OMPI_FINT_2_INT(*outcount)) {
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
array_of_requests[OMPI_INT_2_FINT(array_of_indices[i])] =
c_req[OMPI_INT_2_FINT(array_of_indices[i])]->req_f_to_c_index;
++(OMPI_FINT_2_INT(array_of_indices[i]));
}
}
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
array_of_requests[OMPI_FINT_2_INT(array_of_indices[i])] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * 4]);
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * 4]);
}
}
}
}

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

@ -56,7 +56,7 @@ void mpi_wait_f(MPI_Fint *request, MPI_Fint *status, MPI_Fint *ierr)
*ierr = OMPI_INT_2_FINT(MPI_Wait(&c_req, &c_status));
if (MPI_SUCCESS == OMPI_INT_2_FINT(*ierr)) {
*request = OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
*request = OMPI_INT_2_FINT(c_req->req_f_to_c_index);
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
MPI_Status_c2f(&c_status, status);
}

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

@ -79,10 +79,7 @@ void mpi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
if (NULL == c_req[i]) {
array_of_requests[i] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
}
array_of_requests[i] = c_req[i]->req_f_to_c_index;
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f( &c_status[i], &array_of_statuses[i * 4]);

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

@ -81,10 +81,11 @@ void mpi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests,
/* Increment index by one for fortran conventions */
OMPI_SINGLE_INT_2_FINT(index);
if (MPI_UNDEFINED != *(OMPI_SINGLE_NAME_CONVERT(index))) {
array_of_requests[*(OMPI_SINGLE_NAME_CONVERT(index))] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
++(*(OMPI_SINGLE_NAME_CONVERT(index)));
array_of_requests[OMPI_INT_2_FINT(*index)] =
c_req[OMPI_INT_2_FINT(*index)]->req_f_to_c_index;
++(*index);
}
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
MPI_Status_c2f(&c_status, status);

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

@ -91,15 +91,16 @@ void mpi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
if (MPI_UNDEFINED != OMPI_FINT_2_INT(*outcount)) {
for (i = 0; i < OMPI_FINT_2_INT(*outcount); ++i) {
array_of_requests[OMPI_INT_2_FINT(array_of_indices[i])] =
c_req[OMPI_INT_2_FINT(array_of_indices[i])]->req_f_to_c_index;
++(OMPI_FINT_2_INT(array_of_indices[i]));
}
}
for (i = 0; i < OMPI_FINT_2_INT(*incount); ++i) {
array_of_requests[array_of_indices[i]] =
OMPI_INT_2_FINT(MPI_REQUEST_NULL->req_f_to_c_index);
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses) &&
!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * 4]);
if (!OMPI_IS_FORTRAN_STATUSES_IGNORE(array_of_statuses)) {
for (i = 0; i < OMPI_FINT_2_INT(*incount); ++i) {
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(&array_of_statuses[i])) {
MPI_Status_c2f(&c_status[i], &array_of_statuses[i * 4]);
}
}
}
}