From owner-sc22wg5+sc22wg5-dom9=www.open-std.org@open-std.org  Fri Mar 29 18:39:23 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 B89EB356DF4; Fri, 29 Mar 2024 18:39:23 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 365 seconds by postgrey-1.34 at www5.open-std.org; Fri, 29 Mar 2024 18:39:23 CET
Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.160])
	by www.open-std.org (Postfix) with ESMTP id 654BE356DD2
	for <sc22wg5@open-std.org>; Fri, 29 Mar 2024 18:39:22 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; t=1711733597; cv=none;
    d=strato.com; s=strato-dkim-0002;
    b=jy6tqd4Mk3WeJ1XqvbWfzn0C//5qThKPBe72LGTpGSyxe8fPnfygxyCUwc0JhGFW7+
    9pZkiqFjigGYCE5xxTlLqwqY53cEx77RVgPimnPruX06drYzCsubAEmX4kVrOn9QJHX+
    IAbrnWFS71Ub/y/ckiYa38XvTSZsWg6AkNm0MZmPpeyQT5KpEH6IdyKWAaGhCCMeVDNA
    sAdvnvU/zMTHKEd2HZQP5kADNAmBdy6CjlGFi3amDBxkjZUX1+nDOAcKm43rLfI9HYiN
    oKUzv+XpoO+MzFpEcL2qvzCJokLK0afHSsPlgQbsRoxch9U12g4L+oqNI2HT3T2SYE9p
    E2Vw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1711733597;
    s=strato-dkim-0002; d=strato.com;
    h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date:
    From:Subject:Sender;
    bh=fZpYLTRKgYubz/eUKyJaulBM6HDa42CQZpG3UtBjIqg=;
    b=K8zhVjOiE2Di3Epxqpgdh08judB3/LRY6dSyWE3qg1vFFvXdv8r/YYZDI+K92xL9nz
    ii/LB9MPCP1toOj9q4qK53a3zLtDQ39FXcM/MbpBHfy2+ybT43XSGFMZ8GodmS3SFhA0
    atxqlfxnQ6TEJ3YBpTeggUdRGv1eL9yIu4k99WsqPgk6j0krsV0VCCiPDaMlujRrc+qW
    qx24dO4T3mbxAoMv1GEPVVw2ilMJfFw6wz/lL5sZ7tVxnrNnEw/tWHIfdQi/QJOvGQcl
    vnD254lZ8MPc+2pE21+k9Ub6cJBzhkDKskYzBLyKrONDfgSF124Z4GAuDpv529hukJpR
    7nNA==
ARC-Authentication-Results: i=1; strato.com;
    arc=none;
    dkim=none
X-RZG-CLASS-ID: mo00
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1711733597;
    s=strato-dkim-0002; d=tkoenig.net;
    h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date:
    From:Subject:Sender;
    bh=fZpYLTRKgYubz/eUKyJaulBM6HDa42CQZpG3UtBjIqg=;
    b=tPIhhBpr9r1SOlojwHdNmt2TvmHsXPragu+jItrjvymPbI8HpaCs8VcIXG5KycdF0X
    9XSxsqMdQ32XzhlWsV/eJ13sjIC2sKlsIQUxHsiRQM7D3TvRbGpz1cU6TZ4NAlNRkMJQ
    1q6vKzBEgyWTVAkAyUh58OUf3DbBffGhMyor6XN9iEG+ffm6GeEfljfWHm+vdBIi7FKa
    iP8fk40YbUxGYiYFxDE2D3ttWSk4gvTwiMC08TFlwLTMqSm0xaYeKqPbHz8Hdqh7xoIW
    9yQUUaz107cWzVx+kp3EEYro6kBlqQHMVlH1WIy2vZDpxJ99f7bpCc+zBpuzxFM0sj+m
    N7Hw==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1711733597;
    s=strato-dkim-0003; d=tkoenig.net;
    h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date:
    From:Subject:Sender;
    bh=fZpYLTRKgYubz/eUKyJaulBM6HDa42CQZpG3UtBjIqg=;
    b=WFMyVcrL9Tb2tOL6IMuwh4f0y01lUdYtOZt9jLhF3uXJPc9U+JJIUv+LIeO9cGkxWQ
    PlRXEnKaMhGcQ1UvuvCA==
X-RZG-AUTH: ":OGckYUunfvGNVUL0FlRnC4eRM+bOwx0tUtYTrJ/xeZX+ZVNns7qeI3kOmGi1B9VyfYHKNZwlAvWl+8+8HvfvFpBqa1AFjhY="
Received: from [IPV6:2001:4dd7:6e1d:0:1478:74e4:8b8a:1c3b]
    by smtp.strato.de (RZmta 50.3.2 AUTH)
    with ESMTPSA id v14c0d02THXHWZt
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits))
	(Client did not present a certificate);
    Fri, 29 Mar 2024 18:33:17 +0100 (CET)
Message-ID: <cb67f56d-cee1-4fd0-8cfb-cb60ec165534@tkoenig.net>
Date: Fri, 29 Mar 2024 18:33:16 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [J3] [SC22WG5.6576] Fortran type sizes - please help with MPI
 Fortran
To: General J3 interest list <j3@mailman.j3-fortran.org>
Cc: Jeff Hammond <jehammond@nvidia.com>, WG5 <sc22wg5@open-std.org>
References: <DM6PR12MB3130E37E952301B9994A9BBBCB3A2@DM6PR12MB3130.namprd12.prod.outlook.com>
 <20240329145655.E8CFB356DD2@www.open-std.org>
 <1DFBC5F5-0300-419B-AD1D-C49E73E066A9@nvidia.com>
Content-Language: en-US, de-DE
From: =?UTF-8?Q?Thomas_K=C3=B6nig?= <tk@tkoenig.net>
In-Reply-To: <1DFBC5F5-0300-419B-AD1D-C49E73E066A9@nvidia.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

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

