<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Without help from the Fortran standard, I don't think there is anyway to avoid a combinatorial explosion of interfaces (made worse by the F2008 with 15 dimensions).  Consider the simple example code snippet:<br><br>---------<br><br>subroutine test_recv(message)<br>  real :: message(:,:)<br><br>  call MPI_Recv(message, 2, MPI_INTEGER, 1, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE)<br><br>end subroutine<br><br>---------<br><br>For interface declaration:<br><br>subroutine MPI_Recv_wrapper(buf, count, datatype, source, tag, comm, status, err)<br>  real, dimension(*), intent(out)  :: buf<br><br>or:<br><br>subroutine MPI_Recv_wrapper(buf, count, datatype, source, tag, comm, status, err)<br>  real, dimension(1,1,1,1,1,1,*), intent(out)  :: buf<br><br>This give the following error with the Intel compiler:<br><br>fortcom: Error: test_recv_call.f90, line 15: There is no matching specific subroutine for this generic subroutine call.   [MPI_RECV]<br>  call MPI_Recv(message, 2, MPI_INTEGER, dest, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE)<br>--------^<br><br>On the other hand, if we use the interface:<br><br>subroutine MPI_Recv_wrapper(buf, count, datatype, source, tag, comm, status, err)<br>  type(C_PTR) :: buf<br><br>There is still a problem as assumed shape arrays are not interoperable.  From gfortran:<br><br>  call MPI_Recv(C_LOC(message), 2, MPI_INTEGER, dest, 1, MPI_COMM_WORLD, requ<br>                                           1<br>Error: Assumed-shape array 'message' at (1) cannot be an argument to the procedure 'c_loc because it is not C interoperable<br><br><br>So there doesn't seem to be anyway to currently do multi-dimensional interfaces for assumed-shape actuals without a combinatorial explosion of interfaces.  This also seems to be the case for assumed-size actuals as well.<br><br>Comments?<br><br>Cheers,<br>Craig<br><br><br></body></html>