<div dir="ltr">If I am correct, Bill Long wants to inline the wrapper.</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">--Junchao Zhang</div></div>
<br><br><div class="gmail_quote">On Thu, May 1, 2014 at 2:51 PM, Jeff Squyres (jsquyres) <span dir="ltr"><<a href="mailto:jsquyres@cisco.com" target="_blank">jsquyres@cisco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On May 1, 2014, at 2:34 PM, Junchao Zhang <<a href="mailto:jczhang@mcs.anl.gov">jczhang@mcs.anl.gov</a>> wrote:<br>
<br>
</div><div><div class="h5">> Hello,<br>
>    I met a problem when implementing F08 binding in MPICH.  I have a file mpi_f08.F90, which contains all interfaces<br>
><br>
> module mpi_f08<br>
> ..<br>
> interface MPI_Send<br>
>     subroutine MPI_Send_f08ts(buf, count, datatype, dest, tag, comm, ierror)<br>
>         use :: mpi_f08_types, only : MPI_Datatype, MPI_Comm<br>
>         implicit none<br>
>         type(*), dimension(..), intent(in) :: buf<br>
>         integer, intent(in) :: count, dest, tag<br>
>         type(MPI_Datatype), intent(in) :: datatype<br>
>         type(MPI_Comm), intent(in) :: comm<br>
>         integer, optional, intent(out) :: ierror<br>
>     end subroutine MPI_Send_f08ts<br>
> end interface MPI_Send<br>
> ..<br>
> end module mpi_f08<br>
><br>
> Then for each subroutine, I create a separate file which implement the wrapper function in Fortran.  For example, send_f08ts.F90 has<br>
><br>
> subroutine MPI_Send_f08ts(buf, count, datatype, dest, tag, comm, ierror)<br>
>     use :: mpi_f08, only : MPI_Datatype, MPI_Comm<br>
>     use, intrinsic :: iso_c_binding, only : c_int<br>
>     use :: mpi_c_interface, only : c_Datatype, c_Comm<br>
>     use :: mpi_c_interface, only : MPIR_Send_cdesc<br>
><br>
>     implicit none<br>
>     ..<br>
> end subroutine MPI_Send_f08ts<br>
><br>
> Bill Long pointed out problems of the implementation. 1) When users supply a bad argument to MPI_Send(), the compiler complains "No specific match can be found for the generic subprogram call MPI_SEND", instead of pointing out the offending arg.<br>

<br>
</div></div>Maybe Tobias, CC'ed, can shed light on why this is...<br>
<div class=""><br>
> 2) The wrapper is not in a module, which eliminates many of the advantages of using modern Fortran.<br>
<br>
</div>Can you explain what you mean by this?  There's still lots of advantages for using modern Fortran...<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jeff Squyres<br>
<a href="mailto:jsquyres@cisco.com">jsquyres@cisco.com</a><br>
For corporate legal information go to: <a href="http://www.cisco.com/web/about/doing_business/legal/cri/" target="_blank">http://www.cisco.com/web/about/doing_business/legal/cri/</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
mpiwg-fortran mailing list<br>
<a href="mailto:mpiwg-fortran@lists.mpi-forum.org">mpiwg-fortran@lists.mpi-forum.org</a><br>
<a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran" target="_blank">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran</a><br>
</div></div></blockquote></div><br></div>