From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Fri Mar 29 16:58:24 2024
Return-Path: <owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom9
Delivered-To: sc22wg5-dom9@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id D70B5356DF2; Fri, 29 Mar 2024 16:58:23 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
Received: from BLAPR09CU002.outbound.protection.outlook.com (mail-eastusazlp17011008.outbound.protection.outlook.com [40.93.11.8])
	by www.open-std.org (Postfix) with ESMTP id 2A4B2356DD2
	for <sc22wg5@open-std.org>; Fri, 29 Mar 2024 16:58:21 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=g44QtmCzCOuwGC+2HiNEIFWjtf9zxsJxbRkOzkBt5CNChchAPh6Sfo0bugiQYjR670LZSGsyD8uEFRuZBxodnduENgFofUtKetjybl4jBCbgXDK6PujjCRvjGzzoUEuuylFvHZ3iqH//6qzWbRrF17r6YsQ2xcMZfGrrDzQ8X3+svkjJ5HCFy9RsUbjoZ4QRvzTVcwcM2dXl0rUBDaFJrHdtAfFJ0Lav3eIevKgll2VlXt8ZdRTMnXFf4zMpDIpZh9vGYY/EedbV7Qb6YG67BhpXSoRgg79dGQLFE1qqUzeJSzR5LnDPPxFt+B3v4WjeqsYRkZcQDgGlR4GuIZdy1w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=pL6U18et1t1XXPWirYOsDYLnIoGpGBVpd6dhRMLib6Q=;
 b=C418UhfXZtnKDCUPuCURyTLiz4THdJfMnFzevw87AfvWCabLqQpMd6eyv87cw9S/8lKtlXxae3rowQXmbQEdM812mfwZ7Z6IEM4WGj1lbMjck4seh3yqrtL2tBrioD7jzA5IHy2KzAC4LRAsbkPwu3qJ1VvLfYsPMkBz17aiNsyVbjk6rXzcyehYNAE7+4W1yZlNSwK0XFHGJARLDWp/YGAIaGv0AcriJk449iUv89yUu/C10IDzMeT6bhSlvESVEGnTzI0AL3tgdU4u8du7VLPD8X947heNEVTuebwBpoHvVd0jBxkkRlzVWOrhvRnTe/c6GkBsbdmXbjm4P3hu7w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=nasa.gov; dmarc=pass action=none header.from=nasa.gov;
 dkim=pass header.d=nasa.gov; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nasa.gov; s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=pL6U18et1t1XXPWirYOsDYLnIoGpGBVpd6dhRMLib6Q=;
 b=WxYtyBJVo82z1zpxKo6IQYSGmbpegpfSuPvumQdmsnOXTjJPjYaxy6orq6u0PuKaGZxQCfXW9OK8NwOokUnAm25b6xGV3Qgp03Me6SWRBWqmPvIEUAdoFd3carmzG3dwwtz6vwCGe0fLQeHe3EAdRlJE4lDgBdfkmnYEPSWL8gk=
Received: from PH0PR09MB7385.namprd09.prod.outlook.com (2603:10b6:510:62::18)
 by SJ0PR09MB10228.namprd09.prod.outlook.com (2603:10b6:a03:468::6) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.40; Fri, 29 Mar
 2024 15:58:12 +0000
Received: from PH0PR09MB7385.namprd09.prod.outlook.com
 ([fe80::74f:c0cf:2048:5394]) by PH0PR09MB7385.namprd09.prod.outlook.com
 ([fe80::74f:c0cf:2048:5394%7]) with mapi id 15.20.7409.023; Fri, 29 Mar 2024
 15:58:12 +0000
From: "Clune, Thomas L. (GSFC-6101)" <thomas.l.clune@nasa.gov>
To: Jeff Hammond <jehammond@nvidia.com>
CC: General J3 interest list <j3@mailman.j3-fortran.org>, WG5
	<sc22wg5@open-std.org>
Subject: Re: [EXTERNAL] [BULK] [J3] [SC22WG5.6574] Fortran type sizes - please
 help with MPI Fortran
Thread-Topic: [EXTERNAL] [BULK] [J3] [SC22WG5.6574] Fortran type sizes -
 please help with MPI Fortran
Thread-Index: AQHagcIPXHcNYSj5h0CgOXx8WJHTJ7FOzDdrgAAL/ACAAAbjsg==
Date: Fri, 29 Mar 2024 15:58:12 +0000
Message-ID:
 <PH0PR09MB7385D892200969A3FBBADFE6A63A2@PH0PR09MB7385.namprd09.prod.outlook.com>
References:
 <DM6PR12MB3130E37E952301B9994A9BBBCB3A2@DM6PR12MB3130.namprd12.prod.outlook.com>
 <PH0PR09MB73857DFD17E3412361261A6EA63A2@PH0PR09MB7385.namprd09.prod.outlook.com>
 <447CB7F2-4639-47FA-BB46-118C8BE6C980@nvidia.com>
In-Reply-To: <447CB7F2-4639-47FA-BB46-118C8BE6C980@nvidia.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH0PR09MB7385:EE_|SJ0PR09MB10228:EE_
x-agency-banner-exclusion: 1
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info:
 YqUlhLfsBYqp9K2+Bj4HjBIHUDU9M9GYwwvy8onhI8F0LSYQEuSJwkTU0uX2uBJJzJvMafFtLBQcfgC7Ra6ReGEc1b5IKakYQXwozcOsViRDnNhvHY8iGUKKnP/p0hQ4vZ/BVq36zno2jrT0HNNFYMe6xCtpnkQuBtDOSOablOdQcVz+pWwzxFmkeyPEnTCwJSSbG/8F1RCxgp+nZnVRVDjJOITG1x2jl8shvURQJHnfJDAYL92E8jrR45Dnugr/Fj5UUUkIUiJTJ1W9Olwo59H5pt95D6LVBkZ742dwHPBd6fsXi9W3mK4uPVOuud9w/Behbup83gONsHfqL0/PAV7azQ/E9vJPy+OcbLjD7PBEGaVO9qMnEbRFK45BdZUVDJQi/utfRDe896AR93ft01jBkIb1jGIZA14HAxj0jzq8K9NN1/OGYuSPxKLkFwZYPCjcabeuujSMmD3xW9IYbcNJLJWNqQzsW0dxvcYLlyyn9P4fyc8lmsDAoLiDFeo3QK2x9fTW4yo9c7TzPxlpP3oBsnBc/Sj9z3eyNyuGyqNHL0wFNPyCQRexdXUniSN0bJxTNdj0CaiMlTK9qA2e2xnu0kOGd1b6kwZB1/fGl/g=
x-forefront-antispam-report:
 CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR09MB7385.namprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
 =?Windows-1252?Q?6t5FkSm868akq8TJSRnZUq5oU0ZBZ9d8YS8pHS66M2jxt+cVkCrUxjBN?=
 =?Windows-1252?Q?pT1DJ29L/dwvyJVThfea0/TrccgTaZtn06YUqsucJACev68Fsd6HDK+A?=
 =?Windows-1252?Q?2IgJQQnjodJEKNiiwmmyfRnvTx7/DjLwANFSCoDI9LJiDYp+QoLzD80Y?=
 =?Windows-1252?Q?VLf8wQapuYy3d4o32y+HDKH2kDhNlsBIKb9/ojbuKaxLhvSRQn3gVNd6?=
 =?Windows-1252?Q?Mkt2vXn3Z/FB1w+wDAssFD5i7I9RTSCyvJSoSkPcNMzPfar5h0NQh/Bc?=
 =?Windows-1252?Q?eUES8q/tUOxD5JC5DaE2miww8x9+5alhWYy1N1Gg8Mai4V/LIN7kiiVV?=
 =?Windows-1252?Q?2NKZuxXMpP+8HhSEMrRKp8KUxB+Wm8r1T6Xx/EMcxR7q1a9ky8bIoq5C?=
 =?Windows-1252?Q?gSgDmtWY8sRxpM++goGTVStVDXJ0CqWEPvwy+oOzyO5fZltXsMlyLF6X?=
 =?Windows-1252?Q?TgYv2GX4BamIJ3/BB8F9D3Uhl2GUmxH0d3NGcCpR2kqLK7MbsRLheOFA?=
 =?Windows-1252?Q?PmHwcX9sYUkfM2kFQRSAy4E/ddseRhZY96g1JVF2+AoBGOVsfNKH7VVf?=
 =?Windows-1252?Q?yz+NaLo95M/B2jG9fMn+FPy/aulw74O0bgbFtiIxDt2vT5Lrh0+7+vC1?=
 =?Windows-1252?Q?LvGwJAFIb0w/lVhyr11d3Dpacpyp3rc+dWCzsgOlwQskJ8AX1hix5Zwa?=
 =?Windows-1252?Q?K5/nb38rXo2Nz45g7xzaE5ZC5VhZy7o5trtroipchptzenVXFqooPYMB?=
 =?Windows-1252?Q?1ZH6AJhrsMsFDm6ioI6EPEQCsZ1OLv7/RJnS07S6CdwNHhbiCeYh4YHA?=
 =?Windows-1252?Q?NFnwESwAxQV2W+8MpQVEtKuGDka2G1hx12boUklwpS/93aE9QEASzJhi?=
 =?Windows-1252?Q?/gBtCNGepmITnUV/90//fLYjrjP6VjHCxWxC/0hfk5Tf8bKsiXgNEpVG?=
 =?Windows-1252?Q?RuM6K5jgcUtvD/wnu9a32yYP4wh2B8N15OD3T49knv+U9tOJtYcCBi/G?=
 =?Windows-1252?Q?EaT6DIZk3V8Y6viiwruVoxBQpy5bHAPa/Mw3lv80YwOt0DclVEqgEU4+?=
 =?Windows-1252?Q?JmPnl45ZMjNb+HUuCEZphhrmvjnBMi7+tDx0vmIb39KDTC3G2Zx4C/Ar?=
 =?Windows-1252?Q?CoiPdk36n5MKj+iX2QXXx1dbRBkkrnLdf3RdAJKXSR96T3bLcsPf3Ozg?=
 =?Windows-1252?Q?HnnOHZJe/t5+meDUNAWXkYGhUCES9ySnrE0/KQ3/YSRfi7iTKzMtgBK3?=
 =?Windows-1252?Q?e1cgnbN6I5jRfgFXnZhLjATLlMulhyTXTUYhETkqcUOEH+yHUf4du2jT?=
 =?Windows-1252?Q?MU/RXwVR5MIZ0tRjPUQPaEZaVpjoCaXHLkde52ntBrtpWtWQ2LONjoZs?=
 =?Windows-1252?Q?9DEozdFok2Tk6KJcIBmfOQf9tQMy9mYSSauZ8n2ZMK5zFGN8jfmFr/Hu?=
 =?Windows-1252?Q?YfGyTzVGqVERRJRuy3DLG6PSINv5PcuGem3xsjj8opGFnlp1rKC0Gg6T?=
 =?Windows-1252?Q?+DUa0vsbV66xbXWBc8LQGqvIkYS7z5wMbtXRYfluezcMVyTuuP+xjm8t?=
 =?Windows-1252?Q?bAbHHoCfcQ1lIlPeIPEKzgUZMsFCkwNpwxiQCS2967frjR4axRrU0YrJ?=
 =?Windows-1252?Q?KOmGmUOdVmALPy3BfCQb/svCMs2fKXNKWVs8oIBh5JdX7YSYz0qelhnn?=
 =?Windows-1252?Q?5c8ZSzAmii/+fVjV8AZbaVKUBNcs0iotOUjlY+AVLaCK/rpf/NvM6A?=
 =?Windows-1252?Q?=3D=3D?=
Content-Type: multipart/alternative;
	boundary="_000_PH0PR09MB7385D892200969A3FBBADFE6A63A2PH0PR09MB7385namp_"
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
	eQVXNVQshuhWUwQGpgS1mbXHSbg9kaIIgEbjczNEc7+aEREBMZz6F9E2YbDYeXo0DY+2z+MrgR4YGZdqc8RlWvsk39PUbpd/yQU0hnSxynTLXtkjkVFLPFpQrE1VfC9BcvAxNFA+XXvdWOvw7VexkCYWFxSfDAEaX3AIL2RFuTKsKRzQyqILwoTLYTW6pZpoeT+dPWruXsVRRcAWC/JjueADWdtqmzGv01SLjFxgdBxvY12VHDgaj3wSuVQq+jw2GHc+s+hXU4DGC6ZvqF0M0PFgi8qTdxLj6O8O9SN/us+cRuJmXXTqJkMJqd+prheIzlq2o/4PkjOn4XA2NJuiI1pTY9i30LiEjZ5kfMn9UGkU8dPEb7KTvBwVWwjQAilnlg+fBUExEhOPWRf4NtCM8PK7aAH88NDt6qakXhSAZyTLKsSy9YcEktDTVfpcjIgOAPzRfDOtJp62fQ0zr4smYVqkBPRNdPwynIDXL8kuNxMIn8hbAY/M0eEDNVdGdFIP1hlYRIPTZg/ht7F+v7AaQVwA9NeZYPqKW8Bfq10fCiAXWCHEY5FVzFR0Q/EZup65PkurdNg6R9K3gh5/4H9VQpeJKcYS2hMPX3RiSrOqHBo=
X-OriginatorOrg: nasa.gov
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH0PR09MB7385.namprd09.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0a9a42f1-5683-484e-8b7e-08dc5009097e
X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2024 15:58:12.3534
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 7005d458-45be-48ae-8140-d43da96dd17b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR09MB10228
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

--_000_PH0PR09MB7385D892200969A3FBBADFE6A63A2PH0PR09MB7385namp_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

But,  in this glorious, potentially transient, era where all extant compile=
rs have the same storage size for defaults =85  You have the luxury of bein=
g able to introduce a non-changing change.    I.e., you can spell =93defaul=
t integer=94 as =93kind=3D=85=94 and default real as =93kind=3D=85=94.

Users would not _need_ to change any code up until such a time as some comp=
iler uses different defaults.  At which point they will need to change rega=
rdless.


From: Jeff Hammond <jehammond@nvidia.com>
Date: Friday, March 29, 2024 at 11:29 AM
To: Clune, Thomas L. (GSFC-6101) <thomas.l.clune@nasa.gov>
Cc: General J3 interest list <j3@mailman.j3-fortran.org>, WG5 <sc22wg5@open=
-std.org>
Subject: Re: [EXTERNAL] [BULK] [J3] [SC22WG5.6574] Fortran type sizes - ple=
ase help with MPI Fortran
CAUTION: This email originated from outside of NASA.  Please take care when=
 clicking links or opening attachments.  Use the "Report Message" button to=
 report suspicious messages to the NASA SOC.


How many lines of MPI Fortran code at NASA would have to be changed if we r=
edefine the MPI Fortran API with different types?

Changing the MPI Fortran API is not an option here.  We either decide that =
INTEGER is the same as C int often enough to say that MPI Fortran assumes t=
hat and doesn=92t work otherwise, or we end up in what I consider to be a b=
ad place.

Does anyone believe that the MPI standard should support e.g. promoting onl=
y INTEGER, in violation of the aforementioned part of the standard, or that=
 MPI should support DOUBLE PRECISION that is 128-bit?

Jeff


On 29. Mar 2024, at 16.49, Clune, Thomas L. (GSFC-6101) <thomas.l.clune@nas=
a.gov> wrote:

External email: Use caution opening links or attachments

Hi Jeff,

Why can=92t the Fortran interface be in terms of MPI-specific kinds?

Use mpi_f08, only: KIND_MPI_AINT, KIND_MPI_FLOAT, KIND_MPI_ADOUBLE
Integer(kind=3DKIND_MPI_AINT) :: =85
Real(kind=3DKIND_MPI_AFLOAT) :: =85
Real(kind=3DKIND_MPI_ADOUBLE) :: =85

Users for which these align with compiler defaults will not need to change =
their code, but the recommendation will be for them to use the more explici=
t kinds.

I=92m sure I=92m missing something.


=B7         Tom



From: J3 <j3-bounces@mailman.j3-fortran.org<mailto:j3-bounces@mailman.j3-fo=
rtran.org>> on behalf of Jeff Hammond via J3 <j3@mailman.j3-fortran.org<mai=
lto:j3@mailman.j3-fortran.org>>
Date: Friday, March 29, 2024 at 10:33 AM
To: WG5 <sc22wg5@open-std.org<mailto:sc22wg5@open-std.org>>
Cc: Jeff Hammond <jehammond@nvidia.com<mailto:jehammond@nvidia.com>>
Subject: [EXTERNAL] [BULK] [J3] [SC22WG5.6574] Fortran type sizes - please =
help with MPI Fortran
CAUTION: This email originated from outside of NASA.  Please take care when=
 clicking links or opening attachments.  Use the "Report Message" button to=
 report suspicious messages to the NASA SOC.

Per 19.5.3.2 Storage sequence, the following default type sizes are possibl=
e, assuming that type sizes must not go outside the ranges defined in ISO_F=
ORTRAN_ENV:
a.      16-bit INTEGER, LOGICAL and REAL; 32-bit DOUBLE PRECISION and COMPL=
EX i.e. NUMERIC_STORAGE_SIZE=3D16
b.      32-bit INTEGER, LOGICAL and REAL; 64-bit DOUBLE PRECISION and COMPL=
EX i.e. NUMERIC_STORAGE_SIZE=3D32
c.      64-bit INTEGER, LOGICAL and REAL; 128-bit DOUBLE PRECISION and COMP=
LEX i.e. NUMERIC_STORAGE_SIZE=3D64
d.      <things that violate the cited text of the standard>

I am not aware of any platform used this century that supports (a) and only=
 know that Cray implemented (c) at one point long ago, such that SGEMM comp=
uted with FP64.  There are of course many compilers that support (d), via s=
uch options as -i8, which some committee members have told me are abominabl=
e.

The MPI Forum is considering standardizing primitive type sizes, as a so-ca=
lled ABI standard (I understand this term may bother some, but its meaning =
is different from a platform ABI and defined in terms of how MPI types comp=
ile on a given platform).  We do this in the C API by binding MPI=92s integ=
er types to the platform C behavior, i.e MPI_Aint (an integer that holds an=
 address) is defined to be intptr_t, and so forth.  Specifying these defini=
tions means that implementations of the MPI C API are interoperable at the =
shared-library level, which is a big deal for software distribution (https:=
//dl.acm.org/doi/fullHtml/10.1145/3615318.3615319 has details).

I am attempting to support some aspects of Fortran in the C ABI to ensure F=
ortran remains a first-class language in MPI.  However, some members object=
 to me choosing definitions corresponding to (b) because =93Fortran doesn=
=92t say INTEGER is equivalent to C int=94 and therefore, since we can=92t =
pick one option, we must pick none and make Fortran-related aspects of the =
C API implementation-defined in the ABI.  They are of course correct that F=
ortran doesn=92t specific (b), but in practice, (b) is the only standard-co=
mpliant choice in use today, and it is used the overwhelming majority of th=
e time.

The MPI Forum will ultimately decide between (b) and nothing.  In this case=
, nothing means that Fortran datatypes and C-interoperability routines will=
 not be part of the C ABI, which will make it more difficult to implement M=
PI Fortran as a library on top of C.  Bill Long has said he thinks is a goo=
d thing, and which I have partially implemented<https://github.com/jeffhamm=
ond/vapaa> in order to give MPI Fortran broader compiler support and more c=
omplete feature support than they can get from MPICH and Open MPI today.  T=
he other issue is that it makes MPI Fortran less usable within the MPI ABI =
ecosystem, which is expected to be adopted in several settings.

My case for MPI standardizing its API based on (b) is based on:
(1) all compilers default to this choice and is the only one I know that is=
 available from every compiler
(2) both (a) and (c) cannot be implemented natively in hardware on many pla=
tforms, e.g. x86 still doesn=92t have native FP16 for REAL in (a) and no pl=
atform I know has native hardware FP128 for DOUBLE PRECISION in (c);
(3) all software libraries in binary form support either (b) or (d), e.g. I=
ntel supplies MKL for (b) and ILP64, which is (d);
(4) a choice that covers ~90% of usage and is Fortran-standard-compliant is=
 better than no choice at all.

Obviously, we will not change the Fortran standard to specify (b), but I=92=
m asking for WG5 members to provide me with some support that choosing (b) =
is better than nothing at all, for MPI=92s Fortran users.

I=92ll note that we won=92t take anything away from MPI Fortran with implem=
entation-defined behavior today, which are configured with whatever type si=
zes the builder wants, which is (b) by default and only ever (d) otherwise.=
  However, there is strong demand for the C ABI for many reasons, including=
 redistributable libraries and containers as well as third-party language u=
sage in Rust, Python and Julia, so we expect many users to move to the MPI =
ABI definitions, which allow swapping of MPI C implementations, at least.  =
Fortran modules are not interoperable, but we can make the MPI C API ABI us=
able behind a compiler-specific but MPI-implementation-agnostic implementat=
ion of MPI Fortran support.

My fear is that if I cannot convince the MPI Forum to standardize the MPI A=
BI to include Fortran support in the C library ABI, that Fortran will becom=
e even worse off than Python, Julia and Rust, which do not have the same ba=
ckwards-compatibility issues that MPI Fortran does, because their MPI suppo=
rt is not standardized and those languages haven=92t been used for decades =
like Fortran has.  The alternative designs to my proposal add significant o=
verhead to MPI Fortran versus C or break Fortran use cases in minor ways (a=
pparently, breaking =93a few=94 Fortran codes is acceptable to the MPI Foru=
m if it means they get to spend less time thinking about Fortran).

I apologize if this is not entirely clear.  This is a wildly complicated to=
pic and I=92ve spent about 3000 hours getting to this point, so at some lev=
el you all will have to trust than I am distilling this topic down appropri=
ately.

Thanks,

Jeff


--_000_PH0PR09MB7385D892200969A3FBBADFE6A63A2PH0PR09MB7385namp_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of=
fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Helvetica;
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Aptos;
	panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:10.0pt;
	font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Aptos",sans-serif;}
span.apple-converted-space
	{mso-style-name:apple-converted-space;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:"Aptos",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	mso-ligatures:none;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:815295458;
	mso-list-template-ids:107099708;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level2
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:1.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level3
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:1.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level4
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:2.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level5
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:2.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level6
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:3.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level7
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:3.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level8
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:4.0in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l0:level9
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7 ;
	mso-level-tab-stop:4.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style>
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple" style=3D"word-wrap:brea=
k-word;line-break:after-white-space">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">But, &nbsp;in this =
glorious, potentially transient, era where all
<u>extant</u> compilers have the same storage size for defaults =85&nbsp; Y=
ou have the luxury of being able to introduce a non-changing change.&nbsp; =
&nbsp;&nbsp;I.e., you can spell =93default integer=94 as =93kind=3D=85=94 a=
nd default real as =93kind=3D=85=94.&nbsp;&nbsp;
<br>
<br>
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt">Users would not _<i=
>need</i>_ to change any code up until such a time as some compiler uses di=
fferent defaults.&nbsp; At which point they will need to change regardless.=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"><o:p>&nbsp;</o:p></=
span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:11.0pt"><o:p>&nbsp;</o:p></=
span></p>
<div id=3D"mail-editor-reference-message-container">
<div>
<div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:0in;margin-right:0in;mar=
gin-bottom:12.0pt;margin-left:.5in">
<b><span style=3D"font-size:12.0pt;color:black">From: </span></b><span styl=
e=3D"font-size:12.0pt;color:black">Jeff Hammond &lt;jehammond@nvidia.com&gt=
;<br>
<b>Date: </b>Friday, March 29, 2024 at 11:29 AM<br>
<b>To: </b>Clune, Thomas L. (GSFC-6101) &lt;thomas.l.clune@nasa.gov&gt;<br>
<b>Cc: </b>General J3 interest list &lt;j3@mailman.j3-fortran.org&gt;, WG5 =
&lt;sc22wg5@open-std.org&gt;<br>
<b>Subject: </b>Re: [EXTERNAL] [BULK] [J3] [SC22WG5.6574] Fortran type size=
s - please help with MPI Fortran<o:p></o:p></span></p>
</div>
<table class=3D"MsoNormalTable" border=3D"1" cellspacing=3D"0" cellpadding=
=3D"0" align=3D"left" width=3D"100%" style=3D"width:100.0%;border:solid bla=
ck 1.5pt">
<tbody>
<tr>
<td width=3D"100%" style=3D"width:100.0%;border:none;background:#FFEB9C;pad=
ding:3.75pt 3.75pt 3.75pt 3.75pt">
<p class=3D"MsoNormal" style=3D"mso-element:frame;mso-element-frame-hspace:=
2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-el=
ement-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style=3D"color:black">CAUTION:</span></b><span style=3D"font-size:=
12.0pt;color:black">
</span><span style=3D"color:black">This email originated from outside of NA=
SA.&nbsp; Please take care when clicking links or opening attachments.&nbsp=
; Use the &quot;Report Message&quot; button to report suspicious messages t=
o the NASA&nbsp;SOC.</span><span style=3D"font-size:12.0pt;color:black">
</span><span style=3D"font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:0in;margin-right:0in;mar=
gin-bottom:12.0pt;margin-left:.5in">
<span style=3D"font-size:12.0pt"><br>
<br>
<o:p></o:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">How many lines of MPI Fortran code at NASA would have to be changed=
 if we redefine the MPI Fortran API with different types?
<o:p></o:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Changing the MPI Fortran API is not an option here. &nbsp;We either=
 decide that INTEGER is the same as C int often enough to say that MPI Fort=
ran assumes that and doesn=92t work otherwise,
 or we end up in what I consider to be a bad place.<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Does anyone believe that the MPI standard should support e.g. promo=
ting only INTEGER, in violation of the aforementioned part of the standard,=
 or that MPI should support DOUBLE PRECISION
 that is 128-bit?<o:p></o:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Jeff<o:p></o:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><br>
<br>
<o:p></o:p></span></p>
<blockquote style=3D"margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">On 29. Mar 2024, at 16.49, Clune, Thomas L. (GSFC-6101) &lt;thomas.=
l.clune@nasa.gov&gt; wrote:<o:p></o:p></span></p>
</div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
<div>
<table class=3D"MsoNormalTable" border=3D"1" cellpadding=3D"0" style=3D"mar=
gin-left:.5in;background:#FFEB9C;orphans:auto;widows:auto;word-spacing:0px"=
>
<tbody>
<tr>
<td style=3D"padding:.75pt .75pt .75pt .75pt">
<p class=3D"MsoNormal"><b><span style=3D"font-size:7.5pt;font-family:&quot;=
Verdana&quot;,sans-serif;color:black">External email: Use caution opening l=
inks or attachments</span></b><span style=3D"font-size:12.0pt;font-family:H=
elvetica"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
<div>
<div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Hi Jeff,<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Why can=92t the Fortran interface be in terms of MPI-specific kinds=
?<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Use mpi_f08, only: KIND_MPI_AINT, KIND_MPI_FLOAT, KIND_MPI_ADOUBLE<=
o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Integer(kind=3DKIND_MPI_AINT) :: =85<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Real(kind=3DKIND_MPI_AFLOAT) :: =85<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Real(kind=3DKIND_MPI_ADOUBLE) :: =85<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">Users for which these align with compiler defaults will not need to=
 change their code, but the recommendation will be for them to use the more=
 explicit kinds.<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">I=92m sure I=92m missing something.<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<p class=3D"MsoListParagraph" style=3D"mso-margin-top-alt:0in;margin-right:=
0in;margin-bottom:0in;margin-left:1.0in;text-indent:-.25in;mso-list:l0 leve=
l1 lfo1">
<![if !supportLists]><span style=3D"font-size:10.0pt;font-family:Symbol"><s=
pan style=3D"mso-list:Ignore">=B7<span style=3D"font:7.0pt &quot;Times New =
Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style=3D"font-size:11.0pt">Tom<o:p></o=
:p></span></p>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
11.0pt">&nbsp;<o:p></o:p></span></p>
</div>
<div id=3D"mail-editor-reference-message-container">
<div>
<div style=3D"border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0=
in 0in 0in;border-color:currentcolor currentcolor">
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:0in;margin-right:0in;mar=
gin-bottom:12.0pt;margin-left:1.0in">
<b><span style=3D"font-size:12.0pt">From:<span class=3D"apple-converted-spa=
ce">&nbsp;</span></span></b><span style=3D"font-size:12.0pt">J3 &lt;<a href=
=3D"mailto:j3-bounces@mailman.j3-fortran.org"><span style=3D"color:#467886"=
>j3-bounces@mailman.j3-fortran.org</span></a>&gt; on
 behalf of Jeff Hammond via J3 &lt;<a href=3D"mailto:j3@mailman.j3-fortran.=
org"><span style=3D"color:#467886">j3@mailman.j3-fortran.org</span></a>&gt;=
<br>
<b>Date:<span class=3D"apple-converted-space">&nbsp;</span></b>Friday, Marc=
h 29, 2024 at 10:33 AM<br>
<b>To:<span class=3D"apple-converted-space">&nbsp;</span></b>WG5 &lt;<a hre=
f=3D"mailto:sc22wg5@open-std.org"><span style=3D"color:#467886">sc22wg5@ope=
n-std.org</span></a>&gt;<br>
<b>Cc:<span class=3D"apple-converted-space">&nbsp;</span></b>Jeff Hammond &=
lt;<a href=3D"mailto:jehammond@nvidia.com"><span style=3D"color:#467886">je=
hammond@nvidia.com</span></a>&gt;<br>
<b>Subject:<span class=3D"apple-converted-space">&nbsp;</span></b>[EXTERNAL=
] [BULK] [J3] [SC22WG5.6574] Fortran type sizes - please help with MPI Fort=
ran</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<table class=3D"MsoNormalTable" border=3D"1" cellspacing=3D"0" cellpadding=
=3D"0" align=3D"left" width=3D"100%" style=3D"width:100.0%;border:solid bla=
ck 1.5pt">
<tbody>
<tr>
<td width=3D"100%" style=3D"width:100.0%;border:none;background:#FFEB9C;pad=
ding:3.75pt 3.75pt 3.75pt 3.75pt">
<div>
<p class=3D"MsoNormal" style=3D"mso-element:frame;mso-element-frame-hspace:=
2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-el=
ement-anchor-horizontal:column;mso-height-rule:exactly">
<b><span style=3D"color:black">CAUTION:</span></b><span class=3D"apple-conv=
erted-space"><span style=3D"font-size:12.0pt;color:black">&nbsp;</span></sp=
an><span style=3D"color:black">This email originated from outside of NASA.&=
nbsp; Please take care when clicking links or opening
 attachments.&nbsp; Use the &quot;Report Message&quot; button to report sus=
picious messages to the NASA&nbsp;SOC.</span><span style=3D"font-size:11.0p=
t"><o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class=3D"MsoNormal" style=3D"mso-margin-top-alt:0in;margin-right:0in;mar=
gin-bottom:12.0pt;margin-left:1.0in">
<span style=3D"font-size:11.0pt"><o:p>&nbsp;</o:p></span></p>
<div>
<div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Per 19.5.3.2 Storage sequence, the following default type sizes are=
 possible, assuming that type sizes must not go outside the ranges defined =
in ISO_FORTRAN_ENV:</span><span style=3D"font-size:11.0pt"><o:p></o:p></spa=
n></p>
</div>
<div style=3D"margin-left:1.0in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in;text-indent:-.25in"><span =
style=3D"font-size:11.0pt">a.</span><span style=3D"font-size:7.0pt;font-fam=
ily:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span =
class=3D"apple-converted-space">&nbsp;</span></span><span style=3D"font-siz=
e:12.0pt">16-bit
 INTEGER, LOGICAL and REAL; 32-bit DOUBLE PRECISION and COMPLEX i.e. NUMERI=
C_STORAGE_SIZE=3D16</span><span style=3D"font-size:11.0pt"><o:p></o:p></spa=
n></p>
</div>
<div style=3D"margin-left:1.0in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in;text-indent:-.25in"><span =
style=3D"font-size:11.0pt">b.</span><span style=3D"font-size:7.0pt;font-fam=
ily:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span =
class=3D"apple-converted-space">&nbsp;</span></span><span style=3D"font-siz=
e:12.0pt">32-bit
 INTEGER, LOGICAL and REAL; 64-bit DOUBLE PRECISION and COMPLEX i.e. NUMERI=
C_STORAGE_SIZE=3D32</span><span style=3D"font-size:11.0pt"><o:p></o:p></spa=
n></p>
</div>
<div style=3D"margin-left:1.0in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in;text-indent:-.25in"><span =
style=3D"font-size:11.0pt">c.</span><span style=3D"font-size:7.0pt;font-fam=
ily:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span =
class=3D"apple-converted-space">&nbsp;</span></span><span style=3D"font-siz=
e:12.0pt">64-bit
 INTEGER, LOGICAL and REAL; 128-bit DOUBLE PRECISION and COMPLEX i.e. NUMER=
IC_STORAGE_SIZE=3D64</span><span style=3D"font-size:11.0pt"><o:p></o:p></sp=
an></p>
</div>
<div style=3D"margin-left:1.0in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in;text-indent:-.25in"><span =
style=3D"font-size:11.0pt">d.</span><span style=3D"font-size:7.0pt;font-fam=
ily:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span =
class=3D"apple-converted-space">&nbsp;</span></span><span style=3D"font-siz=
e:12.0pt">&lt;things
 that violate the cited text of the standard&gt;</span><span style=3D"font-=
size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">I am not aware of any platform used this century that supports (a) =
and only know that Cray implemented (c) at one point long ago, such that SG=
EMM computed with FP64.&nbsp; There are of
 course many compilers that support (d), via such options as -i8, which som=
e committee members have told me are abominable.</span><span style=3D"font-=
size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">The MPI Forum is considering standardizing primitive type sizes, as=
 a so-called ABI standard (I understand this term may bother some, but its =
meaning is different from a platform ABI
 and defined in terms of how MPI types compile on a given platform).&nbsp; =
We do this in the C API by binding MPI=92s integer types to the platform C =
behavior, i.e MPI_Aint (an integer that holds an address) is defined to be =
intptr_t, and so forth.&nbsp; Specifying these
 definitions means that implementations of the MPI C API are interoperable =
at the shared-library level, which is a big deal for software distribution =
(<a href=3D"https://dl.acm.org/doi/fullHtml/10.1145/3615318.3615319"><span =
style=3D"color:#467886">https://dl.acm.org/doi/fullHtml/10.1145/3615318.361=
5319</span></a><span class=3D"apple-converted-space">&nbsp;</span>has
 details).</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">I am attempting to support some aspects of Fortran in the C ABI to =
ensure Fortran remains a first-class language in MPI.&nbsp; However, some m=
embers object to me choosing definitions corresponding
 to (b) because =93Fortran doesn=92t say INTEGER is equivalent to C int=94 =
and therefore, since we can=92t pick one option, we must pick none and make=
 Fortran-related aspects of the C API implementation-defined in the ABI.&nb=
sp; They are of course correct that Fortran doesn=92t
 specific (b), but in practice, (b) is the only standard-compliant choice i=
n use today, and it is used the overwhelming majority of the time.</span><s=
pan style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><b><span style=3D"font-si=
ze:12.0pt">The MPI Forum will ultimately decide between (b) and nothing.<sp=
an class=3D"apple-converted-space">&nbsp;</span></span></b><span style=3D"f=
ont-size:12.0pt">&nbsp;In this case, nothing means that
 Fortran datatypes and C-interoperability routines will not be part of the =
C ABI, which will make it more difficult to implement MPI Fortran as a libr=
ary on top of C.&nbsp; Bill Long has said he thinks is a good thing, and wh=
ich I have partially<span class=3D"apple-converted-space">&nbsp;</span><a h=
ref=3D"https://github.com/jeffhammond/vapaa"><span style=3D"color:#467886">=
implemented</span></a><span class=3D"apple-converted-space">&nbsp;</span>in
 order to give MPI Fortran broader compiler support and more complete featu=
re support than they can get from MPICH and Open MPI today.&nbsp; The other=
 issue is that it makes MPI Fortran less usable within the MPI ABI ecosyste=
m, which is expected to be adopted in
 several settings.</span><span style=3D"font-size:11.0pt"><o:p></o:p></span=
></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">My case for MPI standardizing its API based on (b) is based on:<br>
(1) all compilers default to this choice and is the only one I know that is=
 available from every compiler</span><span style=3D"font-size:11.0pt"><o:p>=
</o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">(2) both (a) and (c) cannot be implemented natively in hardware on =
many platforms, e.g. x86 still doesn=92t have native FP16 for REAL in (a) a=
nd no platform I know has native hardware
 FP128 for DOUBLE PRECISION in (c);</span><span style=3D"font-size:11.0pt">=
<o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">(3) all software libraries in binary form support either (b) or (d)=
, e.g. Intel supplies MKL for (b) and ILP64, which is (d);</span><span styl=
e=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">(4) a choice that covers ~90% of usage and is Fortran-standard-comp=
liant is better than no choice at all.</span><span style=3D"font-size:11.0p=
t"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Obviously, we will not change the Fortran standard to specify (b), =
but<span class=3D"apple-converted-space"><b>&nbsp;</b></span><b>I=92m askin=
g for WG5 members to provide me with some support
 that choosing (b) is better than nothing at all, for MPI=92s Fortran users=
.</b></span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">I=92ll note that we won=92t take anything away from MPI Fortran wit=
h implementation-defined behavior today, which are configured with whatever=
 type sizes the builder wants, which is (b)
 by default and only ever (d) otherwise.&nbsp; However, there is strong dem=
and for the C ABI for many reasons, including redistributable libraries and=
 containers as well as third-party language usage in Rust, Python and Julia=
, so we expect many users to move to
 the MPI ABI definitions, which allow swapping of MPI C implementations, at=
 least.&nbsp; Fortran modules are not interoperable, but we can make the MP=
I C API ABI usable behind a compiler-specific but MPI-implementation-agnost=
ic implementation of MPI Fortran support.</span><span style=3D"font-size:11=
.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">My fear is that if I cannot convince the MPI Forum to standardize t=
he MPI ABI to include Fortran support in the C library ABI, that Fortran wi=
ll become even worse off than Python,
 Julia and Rust, which do not have the same backwards-compatibility issues =
that MPI Fortran does, because their MPI support is not standardized and th=
ose languages haven=92t been used for decades like Fortran has.&nbsp; The a=
lternative designs to my proposal add significant
 overhead to MPI Fortran versus C or break Fortran use cases in minor ways =
(apparently, breaking =93a few=94 Fortran codes is acceptable to the MPI Fo=
rum if it means they get to spend less time thinking about Fortran).</span>=
<span style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">I apologize if this is not entirely clear.&nbsp; This is a wildly c=
omplicated topic and I=92ve spent about 3000 hours getting to this point, s=
o at some level you all will have to trust than
 I am distilling this topic down appropriately.</span><span style=3D"font-s=
ize:11.0pt"><o:p></o:p></span></p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Thanks,</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></=
p>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">&nbsp;</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p=
>
</div>
<div style=3D"margin-left:.5in">
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt">Jeff</span><span style=3D"font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class=3D"MsoNormal" style=3D"margin-left:.5in"><span style=3D"font-size:=
12.0pt"><o:p>&nbsp;</o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

--_000_PH0PR09MB7385D892200969A3FBBADFE6A63A2PH0PR09MB7385namp_--
