<div dir="ltr">Not sure if it is worth discussing. Even if INTEGER and C_INT are of different size, I think I can still use C_INT in MPI_Status.<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">
TYPE, BIND(C) :: MPI_Status</div><div style="font-family:arial,sans-serif;font-size:13px"> INTEGER(C_INT) :: MPI_SOURCE, MPI_TAG, MPI_ERROR</div><div style="font-family:arial,sans-serif;font-size:13px"> ... ! other fields</div>
<div style="font-family:arial,sans-serif;font-size:13px"> END TYPE MPI_Status</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Since MPI_Status is a derived datatype, users access it through its public interfaces(i.e., %MPI_SOURCE, ..., MPI_STATUS_SIZE). </div>
<div style="font-family:arial,sans-serif;font-size:13px">As long as MPI_STATUS_SIZE >= sizeof(MPI_STATUS)/sizeof(INTEGER), who cares its internals.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div>
</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">--Junchao Zhang</div></div>
<br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 10:56 AM, Rolf Rabenseifner <span dir="ltr"><<a href="mailto:rabenseifner@hlrs.de" target="_blank">rabenseifner@hlrs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Jeff is right.<br>
Bill's theoretical statement is also correct.<br>
<br>
And ticket#415 is also correct because it resolves an inconsistency<br>
within the mpi_f08 interface.<br>
<br>
Strange theoretical discussions are also there for<br>
long Fortran INTEGER may not be identical with some shorter INTEGER(C_int).<br>
As a side effect also solved by this ticket.<br>
<div class="im HOEnZb"><br>
Rolf<br>
<br>
----- Original Message -----<br>
</div><div class="im HOEnZb">> From: "Jeff Hammond" <<a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a>><br>
> To: "MPI-WG Fortran working group" <a href="http://mpi-forum.org" target="_blank">mpi-forum.org</a>><br>
> Sent: Thursday, March 13, 2014 4:12:56 PM<br>
> Subject: Re: [MPIWG Fortran] Type of MPI_Status<br>
><br>
> MPI should test for interoperability of Fortran's default integer and<br>
> light the machine room on fire if it is not.<br>
><br>
> Jeff<br>
><br>
> On Thu, Mar 13, 2014 at 8:58 AM, Bill Long <<a href="mailto:longb@cray.com">longb@cray.com</a>> wrote:<br>
> > This does raise an earlier issue that it is<br>
</div><div class="HOEnZb"><div class="h5">> > possible that Fortran’s default INTEGER is not an interoperable<br>
> > type, and thus the MPI_Status type should not be a BIND(C) type if<br>
> > it has INTEGER components. Having BIND(C) does allow you to<br>
> > declare a C global name MPI_STATUS_IGNORE in Fortran, which solves<br>
> > one problem nicely. I don’t see any advantage to having INTEGER<br>
> > components (as opposed to INTEGER(C_Int), for example). So this<br>
> > seems to represent the worse of the two options.<br>
> ><br>
> > Cheers,<br>
> > Bill<br>
> ><br>
> ><br>
> ><br>
> > On Mar 13, 2014, at 8:36 AM, Jeff Squyres (jsquyres)<br>
> > <<a href="mailto:jsquyres@cisco.com">jsquyres@cisco.com</a>> wrote:<br>
> ><br>
> >> Done. Good catch:<br>
> >><br>
> >> <a href="https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/415" target="_blank">https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/415</a><br>
> >><br>
> >> This is a trivial ticket, but if you could make sure it's ok, I'll<br>
> >> send it to the mpi-forum list so that it can get added to the<br>
> >> next meeting's agenda.<br>
> >><br>
> >><br>
> >> On Mar 13, 2014, at 1:51 AM, Rolf Rabenseifner<br>
> >> <<a href="mailto:rabenseifner@hlrs.de">rabenseifner@hlrs.de</a>> wrote:<br>
> >><br>
> >>> Jeff and Junchao,<br>
> >>><br>
> >>> it is a missing word INTEGER in this part of the sentence<br>
> >>><br>
> >>> In whole MPI these three values are in Fortran INTEGER and<br>
> >>> nothing else<br>
> >>><br>
> >>> Junchao, thank you for the hint that an erratum is neede<br>
> >>> to prevent from such misinterpretation<br>
> >>><br>
> >>> Jeff, please can you file the errata ticket resulting in<br>
> >>><br>
> >>> ... containing three public INTEGER fields named ...<br>
> >>><br>
> >>> Best regards<br>
> >>> Rolf<br>
> >>><br>
> >>><br>
> >>> ----- Original Message -----<br>
> >>>> From: "Junchao Zhang" <<a href="mailto:jczhang@mcs.anl.gov">jczhang@mcs.anl.gov</a>><br>
> >>>> To: "MPI-WG Fortran working group"<br>
</div></div><div class="HOEnZb"><div class="h5">> >>>> <a href="http://mpi-forum.org" target="_blank">mpi-forum.org</a>><br>
> >>>> Sent: Thursday, March 13, 2014 4:49:49 AM<br>
> >>>> Subject: [MPIWG Fortran] Type of MPI_Status<br>
> >>>><br>
> >>>><br>
> >>>><br>
> >>>><br>
> >>>> Hello,<br>
> >>>><br>
> >>>><br>
> >>>> p30 of MPI3 says "In Fortran with USE mpi or INCLUDE ’mpif.h’,<br>
> >>>> status<br>
> >>>> is an array of INTEGERs of size MPI_STATUS_SIZE. ..., With<br>
> >>>> Fortran<br>
> >>>> USE mpi_f08, status is defined as the Fortran BIND(C) derived<br>
> >>>> type<br>
> >>>> TYPE(MPI_Status) containing three public fields named MPI_SOURCE<br>
> >>>> ,<br>
> >>>> MPI_TAG , and MPI_ERROR"<br>
> >>>><br>
> >>>> In other words, it does't say type of the three public fields<br>
> >>>> must be<br>
> >>>> INTEGER. So, in mpi_f08, can I declare MPI_Status as<br>
> >>>><br>
> >>>><br>
> >>>> TYPE, BIND(C) :: MPI_Status<br>
> >>>> INTEGER(C_INT) :: MPI_SOURCE, MPI_TAG, MPI_ERROR<br>
> >>>> ... ! other fields<br>
> >>>> END TYPE MPI_Status<br>
> >>>><br>
> >>>><br>
> >>>> I find it makes MPI_Status binding easier. Since this type is<br>
> >>>> interoperable with C, I do not need to allocate temp variables<br>
> >>>> to do<br>
> >>>> type conversion when INTEGER is not a C_INT.<br>
> >>>><br>
> >>>><br>
> >>>><br>
> >>>> --Junchao Zhang<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>
> >>><br>
> >>> --<br>
> >>> Dr. Rolf Rabenseifner . . . . . . . . . .. email<br>
> >>> <a href="mailto:rabenseifner@hlrs.de">rabenseifner@hlrs.de</a><br>
> >>> High Performance Computing Center (HLRS) . phone<br>
> >>> <a href="tel:%2B%2B49%280%29711%2F685-65530" value="+4971168565530">++49(0)711/685-65530</a><br>
> >>> University of Stuttgart . . . . . . . . .. fax ++49(0)711 /<br>
> >>> 685-65832<br>
> >>> Head of Dpmt Parallel Computing . . .<br>
> >>> <a href="http://www.hlrs.de/people/rabenseifner" target="_blank">www.hlrs.de/people/rabenseifner</a><br>
> >>> Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room<br>
> >>> 1.307)<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>
> >><br>
> >><br>
> >> --<br>
> >> Jeff Squyres<br>
> >> <a href="mailto:jsquyres@cisco.com">jsquyres@cisco.com</a><br>
> >> For corporate legal information go to:<br>
> >> <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>
> >><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>
> ><br>
> > Bill Long<br>
> > <a href="mailto:longb@cray.com">longb@cray.com</a><br>
> > Fortran Technical Suport & voice:<br>
> > <a href="tel:651-605-9024" value="+16516059024">651-605-9024</a><br>
> > Bioinformatics Software Development fax:<br>
> > <a href="tel:651-605-9142" value="+16516059142">651-605-9142</a><br>
> > Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN<br>
> > 55101<br>
> ><br>
> ><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>
><br>
><br>
><br>
> --<br>
> Jeff Hammond<br>
> <a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a><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>
<br>
--<br>
Dr. Rolf Rabenseifner . . . . . . . . . .. email <a href="mailto:rabenseifner@hlrs.de">rabenseifner@hlrs.de</a><br>
High Performance Computing Center (HLRS) . phone <a href="tel:%2B%2B49%280%29711%2F685-65530" value="+4971168565530">++49(0)711/685-65530</a><br>
University of Stuttgart . . . . . . . . .. fax <a href="tel:%2B%2B49%280%29711%20%2F%20685-65832" value="+4971168565832">++49(0)711 / 685-65832</a><br>
Head of Dpmt Parallel Computing . . . <a href="http://www.hlrs.de/people/rabenseifner" target="_blank">www.hlrs.de/people/rabenseifner</a><br>
Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307)<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></div></div></blockquote></div><br></div>