[J3] [SC22WG5.6582] Fortran type sizes - please help with MPI Fortran
Thomas König
tk at tkoenig.net
Fri Mar 29 17:33:16 UTC 2024
Am 29.03.24 um 16:24 schrieb Jeff Hammond via J3:
> The issue is, we have 30 years of MPI Fortran code that does things
> that are correct according to MPI and Fortran, but which are broken if
> we do certain things that are otherwise very nice from a software
> design perspective. Breaking user code is bad for business, as
> everybody here knows :-)
>
> If we could redefine MPI Fortran to use ISO_C_BINDING types, we’d have
> zero problems, but ISO_C_BINDING came a decade after MPI was created
> and Fortran 2003 compilers weren’t widely available until well after 2003.
How does MPI define its interfaces? Does it use Fortran modules or
the traditional F77-style ABI (with no checking) that f2c etc use?
For the former, C interoperable types could be used; I think all
major compilers support it by now.
For Linux and at least some BSD variants on AMD64, the latter is
defined in the x86-64-ABI psABI, which can be found at
https://gitlab.com/x86-psABIs/x86-64-ABI (section 9.2),
and major other architectures and operating systems effectively do
the same.
Maybe defining the MPI interface with respect to an existing ABI
would be less onerous than just saying "it will work".
Best regards
Thomas
More information about the J3
mailing list