Skip to content
Snippets Groups Projects
Commit 054cebc7 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Harmonize Fortran wrapper with the way MPI defines the MPI_Test interface.

parent f569ccc6
No related branches found
No related tags found
No related merge requests found
......@@ -93,7 +93,8 @@ CONTAINS
SUBROUTINE xt_request_test(request, flag)
TYPE(xt_request), INTENT(inout) :: request
INTEGER(c_int), INTENT(out) :: flag
LOGICAL, INTENT(out) :: flag
INTEGER(c_int) :: flag_c
INTERFACE
SUBROUTINE xt_request_test_c(request_c, flag_c) &
BIND(C, name='xt_request_test')
......@@ -102,7 +103,8 @@ CONTAINS
INTEGER(c_int), INTENT(out) :: flag_c
END SUBROUTINE xt_request_test_c
END INTERFACE
CALL xt_request_test_c(request%cptr, flag)
CALL xt_request_test_c(request%cptr, flag_c)
flag = flag_c /= 0
END SUBROUTINE xt_request_test
FUNCTION xt_request_is_null(request) RESULT(p)
......
......@@ -173,12 +173,10 @@ CONTAINS
TYPE(xt_request), INTENT(inout) :: request
CHARACTER(len=*), INTENT(in) :: file
INTEGER, INTENT(in) :: line
INTEGER(c_int) :: flag
LOGICAL :: flag
CALL xt_request_test(request, flag)
IF (xt_is_null(request)) THEN
IF (flag == 0) &
CALL test_abort("error: expected flag != 0", file, line)
END IF
IF (xt_is_null(request) .AND. .NOT. flag) &
CALL test_abort("error: expected flag set to .true.", file, line)
END SUBROUTINE check_test_request
SUBROUTINE wrap_a_exchange_dp(redist, src, dst)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment