<div dir="ltr">I created <a href="https://github.com/mpi-forum/mpi-issues/issues/528">https://github.com/mpi-forum/mpi-issues/issues/528</a>.<div><br></div><div>Normally, we would have a Fortran WG meeting during the quarterly meeting.  Is there going to be a Fortran WG session at the December meeting?<br><div><br></div><div>Jeff</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 27, 2021 at 9:14 PM William Gropp <<a href="mailto:wgropp@illinois.edu">wgropp@illinois.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">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><br></div><div>Bill</div><div><br><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div>William Gropp<br>Director, NCSA<br>Thomas M. Siebel Chair in Computer Science</div><div>University of Illinois Urbana-Champaign</div><div>IEEE-CS President-Elect</div><div><br></div></div><br><br>
</div>
<div><br><blockquote type="cite"><div>On Nov 25, 2021, at 4:42 AM, Jeff Hammond via mpiwg-fortran <<a href="mailto:mpiwg-fortran@lists.mpi-forum.org" target="_blank">mpiwg-fortran@lists.mpi-forum.org</a>> wrote:</div><br><div><div dir="ltr"><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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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">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"><span style="font-variant-ligatures:no-common-ligatures"><br></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"><span style="font-variant-ligatures:no-common-ligatures">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"><span style="font-variant-ligatures:no-common-ligatures"><br></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"><span style="font-variant-ligatures:no-common-ligatures">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"><span style="font-variant-ligatures:no-common-ligatures"><br></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"><span style="font-variant-ligatures:no-common-ligatures">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"><span style="font-variant-ligatures:no-common-ligatures"><br></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"><span style="font-variant-ligatures:no-common-ligatures">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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>% 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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><font style="background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"></span><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>   </span>20 | <span>  </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"><font style="background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><span>      </span>|<span>                                                            </span></span><span 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"><font style="background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures">Error:</span><span style="font-variant-ligatures:no-common-ligatures"> There is no specific subroutine for the generic '</span><span style="font-variant-ligatures:no-common-ligatures">mpi_win_allocate</span><span style="font-variant-ligatures:no-common-ligatures">' at </span><span 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"><font style="background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>% cat y.F90 <span>   </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>! 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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>! 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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>!<span>    </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures"><font><span style="background-color:rgb(255,255,255)">end program main</span></font></span></div></div><div><font style="background-color:rgb(255,255,255)"><br></font></div><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"><span style="font-variant-ligatures:no-common-ligatures">% mpicc y.c && echo SUCCESS</span><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><br></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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>% cat y.c<span> </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>#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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>{</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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font><span>  </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"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font>}</font></span></div></div><br clear="all"><div><br></div>-- <br><div dir="ltr">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="https://urldefense.com/v3/__http://jeffhammond.github.io/__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jab6YK9fw$" target="_blank">http://jeffhammond.github.io/</a></div></div>
_______________________________________________<br>mpiwg-fortran mailing list<br><a href="mailto:mpiwg-fortran@lists.mpi-forum.org" target="_blank">mpiwg-fortran@lists.mpi-forum.org</a><br><a href="https://urldefense.com/v3/__https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jZut-fk-w$" target="_blank">https://urldefense.com/v3/__https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jZut-fk-w$</a> <br></div></blockquote></div><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>