<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I agree with Jeff here.  This is a good enhancement; I believe the only reason that we hadn’t done this before is that we’ve stuck closely to the original Fortran look-and-feel - which was pre-Fortran 90.  We could have done this earlier, and now that there are explicit interfaces that are only available in Fortran08, there is no reason not to do this.<div class=""><br class=""></div><div class="">Bill</div><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>William Gropp<br class="">Director, NCSA<br class="">Thomas M. Siebel Chair in Computer Science</div><div>University of Illinois Urbana-Champaign</div><div>IEEE-CS President-Elect</div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Nov 25, 2021, at 4:42 AM, Jeff Hammond via mpiwg-fortran <<a href="mailto:mpiwg-fortran@lists.mpi-forum.org" class="">mpiwg-fortran@lists.mpi-forum.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class="">RMA absolutely did the right thing with MPI_Aint size and displacement arguments.</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class=""><br class=""></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class="">In C, it is no problem to pass 32b integers to these arguments when AINT is 64b, because C type promotion rules just work.</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class=""><br class=""></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class="">In Fortran, I cannot do this, because an integer literal is not compatible with an AINT argument.  I find it tedious to have to declare a variable just for this, or to explicitly cast with integer(100,</font></span><span style="font-variant-ligatures: no-common-ligatures;" class="">MPI_ADDRESS_KIND).</span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Since Fortran does polymorphism right and can have subroutine declarations for both default integer and AINT integer scalar arguments, is there a good reason not to add the former?</span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">This proposal applies not to just MPI_Win_allocate but any RMA function that uses AINT scalar arguments.</span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Thanks,</span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Jeff</span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class=""><br class=""></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class="">% mpifort y.F90</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">y.F90:20:60:</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco; min-height: 17px;" class=""><font style="background-color:rgb(255,255,255)" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br class=""></font></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">   </span>20 | <span class="gmail-Apple-converted-space">  </span>call MPI_Win_allocate(100, 1, MPI_INFO_NULL, comm, XA, WA)</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><font style="background-color:rgb(255,255,255)" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">      </span>|<span class="gmail-Apple-converted-space">                                                            </span></span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">1</span></font></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><font style="background-color:rgb(255,255,255)" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">Error:</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> There is no specific subroutine for the generic '</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures">mpi_win_allocate</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">' at </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">(1)</span></font></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><font style="background-color:rgb(255,255,255)" class=""><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br class=""></span></font></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">% cat y.F90 <span class="gmail-Apple-converted-space">   </span></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">! USE mpi_f08</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">! MPI_Win_allocate(size, disp_unit, info, comm, baseptr, win, ierror)</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: size</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>INTEGER, INTENT(IN) :: disp_unit</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>TYPE(MPI_Info), INTENT(IN) :: info</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>TYPE(MPI_Comm), INTENT(IN) :: comm</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>TYPE(C_PTR), INTENT(OUT) :: baseptr</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>TYPE(MPI_Win), INTENT(OUT) :: win</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">!<span class="gmail-Apple-converted-space">    </span>INTEGER, OPTIONAL, INTENT(OUT) :: ierror</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">program main</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>use iso_fortran_env</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>use mpi_f08</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>implicit none</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>integer(kind=MPI_ADDRESS_KIND) :: as = 100</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>type(c_ptr) :: XA</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>type(MPI_Win) :: WA</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>TYPE(MPI_Comm) :: comm = MPI_COMM_WORLD</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>call MPI_Win_allocate(as, 1, MPI_INFO_NULL, comm, XA, WA)</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>call MPI_Win_allocate(100, 1, MPI_INFO_NULL, comm, XA, WA)</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font style="" class=""><span style="background-color:rgb(255,255,255)" class="">end program main</span></font></span></div></div><div class=""><font style="background-color:rgb(255,255,255)" class=""><br class=""></font></div><div class=""><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">% mpicc y.c && echo SUCCESS</span><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">SUCCESS</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><br class=""></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">% cat y.c<span class="gmail-Apple-converted-space"> </span></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">#include <mpi.h></font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">int main(void)</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class="">{</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>MPI_Aint as = 100;</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>int * XA;</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>MPI_Win WA;</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>MPI_Win_allocate(as, 1, MPI_INFO_NULL, MPI_COMM_WORLD, XA, &WA);</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font class=""><span class="gmail-Apple-converted-space">  </span>MPI_Win_allocate(100, 1, MPI_INFO_NULL, MPI_COMM_WORLD, XA, &WA);</font></span></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Monaco;" class=""><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font style="" class="">}</font></span></div></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br class=""><a href="mailto:jeff.science@gmail.com" target="_blank" class="">jeff.science@gmail.com</a><br class=""><a href="https://urldefense.com/v3/__http://jeffhammond.github.io/__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jab6YK9fw$" target="_blank" class="">http://jeffhammond.github.io/</a></div></div>
_______________________________________________<br class="">mpiwg-fortran mailing list<br class=""><a href="mailto:mpiwg-fortran@lists.mpi-forum.org" class="">mpiwg-fortran@lists.mpi-forum.org</a><br class="">https://urldefense.com/v3/__https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jZut-fk-w$ <br class=""></div></blockquote></div><br class=""></div></body></html>