<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 19 Aug 2023 at 13:43, Jeff Hammond <<a href="mailto:jehammond@nvidia.com">jehammond@nvidia.com</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 dir="auto">
Fortran doesn’t have an ABI across compilers but the MPI Fortran ABI is defined by the use of constants that match the C ABI, as is required. It is involves similarly required compatibility with Aint, Offset and Count.
<div><br></div></div></blockquote><div><br></div><div>Oh, OK, so your definition of Fortran ABI is the one that, for a given Fortran compiler, matches the C ABI.</div><div> <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 dir="auto"><div>
</div>
<div>Intel likely achieves their ILP64 support by ignoring MPI_Fint in the header and dlopen-ing the right symbol on launch. I’ll verify that later. <br></div></div></blockquote><div><br></div><div>Well, my point is, the ILP64 support is Fortran-only. There are no provisions for C and mpi.h to interoperate with the ILP64 library.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>
<div>A more expansive Fortran ABI definition that does what you propose has been considered. It represents a breaking API change and thus requires new module (and deprecated header) names. </div></div></div></blockquote><div><br></div><div>That's why I asked for a Fortran lawyer. My limited knowledge of Fortran tells me that "integer" and "integer(kind=<span style="background-color:transparent;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;white-space:inherit">selected_int_kind(0)</span>)" are the same type. I fail to see the extent of the breakage, or why new module names are needed. </div><div>If the new module uses "integer(kind=MPI_HANDLE_KIND)" with MPI_HANDLE_KIND equal to selected_int_kind(0) for a standard invocation of the compiler, old code that uses plain "integer :: comm" declarations should continue to work, as long as users do not compile with -i8. For new code to work seamlessly with an ILP64 Fortran library, users have to update their Fortran code to use integer(kind=MPI_HANDLE_KIND), but in this case MPI_HANDLE_KIND is still a 32bits integer.</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Senior Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>