Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You will not censor me through bug terrorism. -- James Troup


devel / comp.lang.fortran / Re: gfortran's -fallow-argument-mismatch with old/new compilers

SubjectAuthor
* gfortran's -fallow-argument-mismatch with old/new compilersThomas Koenig
`* Re: gfortran's -fallow-argument-mismatch with old/new compilersmies...@gmail.com
 `* Re: gfortran's -fallow-argument-mismatch with old/new compilersThomas Koenig
  +- Re: gfortran's -fallow-argument-mismatch with old/new compilersgah4
  `* Re: gfortran's -fallow-argument-mismatch with old/new compilersmies...@gmail.com
   `* Re: gfortran's -fallow-argument-mismatch with old/new compilersmies...@gmail.com
    `* Re: gfortran's -fallow-argument-mismatch with old/new compilersWyatt Spear
     `- Re: gfortran's -fallow-argument-mismatch with old/new compilersThomas Koenig

1
gfortran's -fallow-argument-mismatch with old/new compilers

<t84k3j$kf0$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2356&group=comp.lang.fortran#2356

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-30b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: gfortran's -fallow-argument-mismatch with old/new compilers
Date: Sun, 12 Jun 2022 11:53:23 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t84k3j$kf0$1@newsreader4.netcologne.de>
Injection-Date: Sun, 12 Jun 2022 11:53:23 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-30b7-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:30b7:0:7285:c2ff:fe6c:992d";
logging-data="20960"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 12 Jun 2022 11:53 UTC

I recently had an e-mail from somebody who ran into trouble
with old code on gfortran - gfortran 9 did not have the
-fallow-argument-mismatch flag, but gfortran 11 required it due
to issues in the code.

The solution I proposed was to add something like

FC_OPTIONS="-O2"
cat > optiontest.f90 <<EOF
end
EOF
gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
echo $FC_OPTIONS
rm optiontest.f90

to his build scripts, which will add the flag to the FC_OPTIONS
variable if it is supported, and I thought I'd share it.

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2393&group=comp.lang.fortran#2393

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6000:168a:b0:20f:d6e8:a5b with SMTP id y10-20020a056000168a00b0020fd6e80a5bmr9576505wrd.41.1655476032984;
Fri, 17 Jun 2022 07:27:12 -0700 (PDT)
X-Received: by 2002:a5b:489:0:b0:655:be22:4757 with SMTP id
n9-20020a5b0489000000b00655be224757mr10882192ybp.92.1655476032298; Fri, 17
Jun 2022 07:27:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 17 Jun 2022 07:27:12 -0700 (PDT)
In-Reply-To: <t84k3j$kf0$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=94.219.255.225; posting-account=uXQXngoAAACdZ2fxyTNnn_-rfWqnf7NJ
NNTP-Posting-Host: 94.219.255.225
References: <t84k3j$kf0$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
From: miesiehl@gmail.com (mies...@gmail.com)
Injection-Date: Fri, 17 Jun 2022 14:27:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: mies...@gmail.com - Fri, 17 Jun 2022 14:27 UTC

Thomas Koenig schrieb am Sonntag, 12. Juni 2022 um 13:53:27 UTC+2:
> I recently had an e-mail from somebody who ran into trouble
> with old code on gfortran - gfortran 9 did not have the
> -fallow-argument-mismatch flag, but gfortran 11 required it due
> to issues in the code.
>
> The solution I proposed was to add something like
>
> FC_OPTIONS="-O2"
> cat > optiontest.f90 <<EOF
> end
> EOF
> gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
> 2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
> echo $FC_OPTIONS
> rm optiontest.f90
>
> to his build scripts, which will add the flag to the FC_OPTIONS
> variable if it is supported, and I thought I'd share it.

It is certainly an MPICH issue, but I am still using gfortran version 9.2.1 just to avoid this -fallow-argument-mismatch flag when compiling MPICH for use with gfortran and OpenCoarrays. To me, it appears that this flag is somehow related to severe performance issues with MPICH and coarray programming. (Same issue with ifort: Intel MPI is MPICH but I can’t tell if they use a similar flag with Intel MPI).

I did already describe my problem here:
https://fortran-lang.discourse.group/t/coarrays-not-ready-for-prime-time/2715/61
https://fortran-lang.discourse.group/t/coarrays-not-ready-for-prime-time/2715/65

Let me add that the overall performance of a coarray program my not necessarily appear to change much when using this flag with compiling MPICH. The performance issue is slightly more subtle with my current test cases:

- compiling MPICH without the flag (using gfortran 9.2):
Allocating few (allocatable) coarray components takes multiple seconds (8-9 seconds on my laptop) which is of course way too slow. But then, once the coarrays are all allocated, execution of the specific parts (subtasks) with my test cases takes less than 0.04 second for each part. (I am using a time-out function that requires this time limit as a minimum).

- compiling MPICH with the flag (using newer versions of gfortran or just use a recent ifort compiler version which shows the exactly same poor performance on my laptop):
Allocating few (allocatable) coarray components is now very fast (less then 0.2 seconds on my laptop). But now execution of the specific parts (subtasks) with my test cases takes only less than 2(!) seconds for each part (time-out function requires this time limit as a minimum), which is way too slow for anything serious. Output on screen shows this very poor performance as well.

Note: the shift from 0.04 second to 2 full seconds!

Thus, my preferred setup is still using gfortran 9.2 / OpenCoarrays 2.8.0 / MPICH (3.2.1/3.4.3/4.0.1) on my laptop to already (and massively) prepare programming with Fortran for the upcoming era of (heterogeneous) spatial accelerators. To me, the quality of even this old (2019) gfortran/OC CAF implementation is still ahead of Intel’s ifort (which latest version I am using so far is 2021.5).

Regards

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<t8i50c$edh$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2394&group=comp.lang.fortran#2394

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-3fa9-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
Date: Fri, 17 Jun 2022 15:01:32 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t8i50c$edh$1@newsreader4.netcologne.de>
References: <t84k3j$kf0$1@newsreader4.netcologne.de>
<65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
Injection-Date: Fri, 17 Jun 2022 15:01:32 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-3fa9-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:3fa9:0:7285:c2ff:fe6c:992d";
logging-data="14769"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 17 Jun 2022 15:01 UTC

mies...@gmail.com <miesiehl@gmail.com> schrieb:
> Thomas Koenig schrieb am Sonntag, 12. Juni 2022 um 13:53:27 UTC+2:
>> I recently had an e-mail from somebody who ran into trouble
>> with old code on gfortran - gfortran 9 did not have the
>> -fallow-argument-mismatch flag, but gfortran 11 required it due
>> to issues in the code.
>>
>> The solution I proposed was to add something like
>>
>> FC_OPTIONS="-O2"
>> cat > optiontest.f90 <<EOF
>> end
>> EOF
>> gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
>> 2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
>> echo $FC_OPTIONS
>> rm optiontest.f90
>>
>> to his build scripts, which will add the flag to the FC_OPTIONS
>> variable if it is supported, and I thought I'd share it.
>
> It is certainly an MPICH issue, but I am still using gfortran
> version 9.2.1 just to avoid this -fallow-argument-mismatch flag
> when compiling MPICH for use with gfortran and OpenCoarrays. To me,
> it appears that this flag is somehow related to severe performance
> issues with MPICH and coarray programming.

I can assure you it is not - the change in question is purely something
that will downgrade a newly introduced error to a warning.

Any Performance issues you are seeing may be related to the
interplay of the OpenCoarrays library with MPICH. Since
I know neither well, I cannot really comment on that.

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<89bec1df-41eb-470f-953b-a4754332a111n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2395&group=comp.lang.fortran#2395

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a5d:65c1:0:b0:210:33b7:4525 with SMTP id e1-20020a5d65c1000000b0021033b74525mr10522905wrw.494.1655489809608;
Fri, 17 Jun 2022 11:16:49 -0700 (PDT)
X-Received: by 2002:a25:380a:0:b0:668:a62e:de85 with SMTP id
f10-20020a25380a000000b00668a62ede85mr8763330yba.218.1655489809011; Fri, 17
Jun 2022 11:16:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 17 Jun 2022 11:16:48 -0700 (PDT)
In-Reply-To: <t8i50c$edh$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:115a:7913:ec57:25f9;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:115a:7913:ec57:25f9
References: <t84k3j$kf0$1@newsreader4.netcologne.de> <65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
<t8i50c$edh$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <89bec1df-41eb-470f-953b-a4754332a111n@googlegroups.com>
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
From: gah4@u.washington.edu (gah4)
Injection-Date: Fri, 17 Jun 2022 18:16:49 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Fri, 17 Jun 2022 18:16 UTC

On Friday, June 17, 2022 at 8:01:36 AM UTC-7, Thomas Koenig wrote:
(snip)

> I can assure you it is not - the change in question is purely something
> that will downgrade a newly introduced error to a warning.
> Any Performance issues you are seeing may be related to the
> interplay of the OpenCoarrays library with MPICH. Since
> I know neither well, I cannot really comment on that.

Which leaves out the question about the check itself, and whether it is
only a compile-time test, or a run-time test.

In any case, it could be some unrelated change in the compiler
that happens with that version, that is causing the timing change.

But also note, one must be very careful with any timing tests.
For example, data in the file cache can make a program run much
faster, not having to read it off disk. If you run program A then B,
it might be that B runs much faster, with cached data. But run A
again and see if the time changes.

But timing gets even harder with multiple threads, as it depends
on any interaction of the threads, along with everything else
(such as the disk cache).

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2410&group=comp.lang.fortran#2410

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a7b:c389:0:b0:39c:49fe:25df with SMTP id s9-20020a7bc389000000b0039c49fe25dfmr15143691wmj.164.1655561662881;
Sat, 18 Jun 2022 07:14:22 -0700 (PDT)
X-Received: by 2002:a05:6902:1023:b0:665:12c1:b44d with SMTP id
x3-20020a056902102300b0066512c1b44dmr16539661ybt.472.1655561662398; Sat, 18
Jun 2022 07:14:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 18 Jun 2022 07:14:22 -0700 (PDT)
In-Reply-To: <t8i50c$edh$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=94.219.255.225; posting-account=uXQXngoAAACdZ2fxyTNnn_-rfWqnf7NJ
NNTP-Posting-Host: 94.219.255.225
References: <t84k3j$kf0$1@newsreader4.netcologne.de> <65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
<t8i50c$edh$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
From: miesiehl@gmail.com (mies...@gmail.com)
Injection-Date: Sat, 18 Jun 2022 14:14:22 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: mies...@gmail.com - Sat, 18 Jun 2022 14:14 UTC

Thomas Koenig schrieb am Freitag, 17. Juni 2022 um 17:01:36 UTC+2:
> mies...@gmail.com <mies...@gmail.com> schrieb:
> > Thomas Koenig schrieb am Sonntag, 12. Juni 2022 um 13:53:27 UTC+2:
> >> I recently had an e-mail from somebody who ran into trouble
> >> with old code on gfortran - gfortran 9 did not have the
> >> -fallow-argument-mismatch flag, but gfortran 11 required it due
> >> to issues in the code.
> >>
> >> The solution I proposed was to add something like
> >>
> >> FC_OPTIONS="-O2"
> >> cat > optiontest.f90 <<EOF
> >> end
> >> EOF
> >> gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
> >> 2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
> >> echo $FC_OPTIONS
> >> rm optiontest.f90
> >>
> >> to his build scripts, which will add the flag to the FC_OPTIONS
> >> variable if it is supported, and I thought I'd share it.
> >
> > It is certainly an MPICH issue, but I am still using gfortran
> > version 9.2.1 just to avoid this -fallow-argument-mismatch flag
> > when compiling MPICH for use with gfortran and OpenCoarrays. To me,
> > it appears that this flag is somehow related to severe performance
> > issues with MPICH and coarray programming.
> I can assure you it is not - the change in question is purely something
> that will downgrade a newly introduced error to a warning.
>
> Any Performance issues you are seeing may be related to the
> interplay of the OpenCoarrays library with MPICH. Since
> I know neither well, I cannot really comment on that.

My personal guess is that this performance issue is not due to gfortran, not due to OpenCoarrays, and not due to ifort, but only due to MPICH. Recent releases of gfortran/OpenCoarrays and ifort show the exactly same (poor) run-time performance pattern. And Intel MPI is MPICH. Earlier releases of ifort did perform as fast as my setup with gfortran 9.2 and OpenCoarrays.
And, for reasons that I can’t understand, the poor performance pattern with gfortran/OpenCoarrays occurs whenever the compilation of MPICH leads to:

mpich 4.0.1 ./configure
checking whether gfortran allows mismatched arguments... yes, with -fallow-argument-mismatch
configure: error: The Fortran compiler gfortran does not accept programs that call the same routine with arguments of different types without the option -fallow-argument-mismatch. Rerun configure with FFLAGS=-fallow-argument-mismatch and FCFLAGS=-fallow-argument-mismatch

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<7ed0ad29-8c32-4e3a-81fc-6d9247bd2edan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2439&group=comp.lang.fortran#2439

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a5d:5234:0:b0:21b:829c:3058 with SMTP id i20-20020a5d5234000000b0021b829c3058mr13857511wra.13.1655722106908;
Mon, 20 Jun 2022 03:48:26 -0700 (PDT)
X-Received: by 2002:a81:4ccb:0:b0:30c:71ba:6e1a with SMTP id
z194-20020a814ccb000000b0030c71ba6e1amr25919158ywa.431.1655722106377; Mon, 20
Jun 2022 03:48:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 20 Jun 2022 03:48:26 -0700 (PDT)
In-Reply-To: <e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=94.217.176.50; posting-account=uXQXngoAAACdZ2fxyTNnn_-rfWqnf7NJ
NNTP-Posting-Host: 94.217.176.50
References: <t84k3j$kf0$1@newsreader4.netcologne.de> <65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
<t8i50c$edh$1@newsreader4.netcologne.de> <e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7ed0ad29-8c32-4e3a-81fc-6d9247bd2edan@googlegroups.com>
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
From: miesiehl@gmail.com (mies...@gmail.com)
Injection-Date: Mon, 20 Jun 2022 10:48:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: mies...@gmail.com - Mon, 20 Jun 2022 10:48 UTC

mies...@gmail.com schrieb am Samstag, 18. Juni 2022 um 16:14:29 UTC+2:
> Thomas Koenig schrieb am Freitag, 17. Juni 2022 um 17:01:36 UTC+2:
> > mies...@gmail.com <mies...@gmail.com> schrieb:
> > > Thomas Koenig schrieb am Sonntag, 12. Juni 2022 um 13:53:27 UTC+2:
> > >> I recently had an e-mail from somebody who ran into trouble
> > >> with old code on gfortran - gfortran 9 did not have the
> > >> -fallow-argument-mismatch flag, but gfortran 11 required it due
> > >> to issues in the code.
> > >>
> > >> The solution I proposed was to add something like
> > >>
> > >> FC_OPTIONS="-O2"
> > >> cat > optiontest.f90 <<EOF
> > >> end
> > >> EOF
> > >> gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
> > >> 2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
> > >> echo $FC_OPTIONS
> > >> rm optiontest.f90
> > >>
> > >> to his build scripts, which will add the flag to the FC_OPTIONS
> > >> variable if it is supported, and I thought I'd share it.
> > >
> > > It is certainly an MPICH issue, but I am still using gfortran
> > > version 9.2.1 just to avoid this -fallow-argument-mismatch flag
> > > when compiling MPICH for use with gfortran and OpenCoarrays. To me,
> > > it appears that this flag is somehow related to severe performance
> > > issues with MPICH and coarray programming.
> > I can assure you it is not - the change in question is purely something
> > that will downgrade a newly introduced error to a warning.
> >
> > Any Performance issues you are seeing may be related to the
> > interplay of the OpenCoarrays library with MPICH. Since
> > I know neither well, I cannot really comment on that.
> My personal guess is that this performance issue is not due to gfortran, not due to OpenCoarrays, and not due to ifort, but only due to MPICH. Recent releases of gfortran/OpenCoarrays and ifort show the exactly same (poor) run-time performance pattern. And Intel MPI is MPICH. Earlier releases of ifort did perform as fast as my setup with gfortran 9.2 and OpenCoarrays.
> And, for reasons that I can’t understand, the poor performance pattern with gfortran/OpenCoarrays occurs whenever the compilation of MPICH leads to:
>
> mpich 4.0.1 ./configure
> checking whether gfortran allows mismatched arguments... yes, with -fallow-argument-mismatch
> configure: error: The Fortran compiler gfortran does not accept programs that call the same routine with arguments of different types without the option -fallow-argument-mismatch. Rerun configure with FFLAGS=-fallow-argument-mismatch and FCFLAGS=-fallow-argument-mismatch

Just to make this more complete:
From what I did see, the poor performance pattern is not necessarily a poor performance of the image-to-image data transfers with synchronization (through MPICH), but may rather be a poor performance of executing the purely local codes (and in my case with oversubscribing cores, i.e. using more coarray images than hardware cores are available).

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<118b220d-3c50-43a6-807a-4c3b5b6a0354n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2897&group=comp.lang.fortran#2897

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:14c6:b0:35c:ccae:8239 with SMTP id u6-20020a05622a14c600b0035cccae8239mr5388707qtx.147.1663361973249;
Fri, 16 Sep 2022 13:59:33 -0700 (PDT)
X-Received: by 2002:a05:622a:513:b0:35b:b42a:9bf1 with SMTP id
l19-20020a05622a051300b0035bb42a9bf1mr6143412qtx.339.1663361973012; Fri, 16
Sep 2022 13:59:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 16 Sep 2022 13:59:32 -0700 (PDT)
In-Reply-To: <7ed0ad29-8c32-4e3a-81fc-6d9247bd2edan@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=207.55.20.151; posting-account=wLJ3IQoAAAB0FHW8JXVXX06LbTolRHhs
NNTP-Posting-Host: 207.55.20.151
References: <t84k3j$kf0$1@newsreader4.netcologne.de> <65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
<t8i50c$edh$1@newsreader4.netcologne.de> <e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>
<7ed0ad29-8c32-4e3a-81fc-6d9247bd2edan@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <118b220d-3c50-43a6-807a-4c3b5b6a0354n@googlegroups.com>
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
From: wjspear@gmail.com (Wyatt Spear)
Injection-Date: Fri, 16 Sep 2022 20:59:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5133
 by: Wyatt Spear - Fri, 16 Sep 2022 20:59 UTC

On Monday, June 20, 2022 at 3:48:29 AM UTC-7, mies wrote:
> schrieb am Samstag, 18. Juni 2022 um 16:14:29 UTC+2:
> > Thomas Koenig schrieb am Freitag, 17. Juni 2022 um 17:01:36 UTC+2:
> > > schrieb:
> > > > Thomas Koenig schrieb am Sonntag, 12. Juni 2022 um 13:53:27 UTC+2:
> > > >> I recently had an e-mail from somebody who ran into trouble
> > > >> with old code on gfortran - gfortran 9 did not have the
> > > >> -fallow-argument-mismatch flag, but gfortran 11 required it due
> > > >> to issues in the code.
> > > >>
> > > >> The solution I proposed was to add something like
> > > >>
> > > >> FC_OPTIONS="-O2"
> > > >> cat > optiontest.f90 <<EOF
> > > >> end
> > > >> EOF
> > > >> gfortran -fallow-argument-mismatch -fsyntax-only optiontest.f90 \
> > > >> 2>/dev/null && FC_OPTIONS="$FC_OPTIONS -fallow-argument-mismatch"
> > > >> echo $FC_OPTIONS
> > > >> rm optiontest.f90
> > > >>
> > > >> to his build scripts, which will add the flag to the FC_OPTIONS
> > > >> variable if it is supported, and I thought I'd share it.
> > > >
> > > > It is certainly an MPICH issue, but I am still using gfortran
> > > > version 9.2.1 just to avoid this -fallow-argument-mismatch flag
> > > > when compiling MPICH for use with gfortran and OpenCoarrays. To me,
> > > > it appears that this flag is somehow related to severe performance
> > > > issues with MPICH and coarray programming.
> > > I can assure you it is not - the change in question is purely something
> > > that will downgrade a newly introduced error to a warning.
> > >
> > > Any Performance issues you are seeing may be related to the
> > > interplay of the OpenCoarrays library with MPICH. Since
> > > I know neither well, I cannot really comment on that.
> > My personal guess is that this performance issue is not due to gfortran, not due to OpenCoarrays, and not due to ifort, but only due to MPICH. Recent releases of gfortran/OpenCoarrays and ifort show the exactly same (poor) run-time performance pattern. And Intel MPI is MPICH. Earlier releases of ifort did perform as fast as my setup with gfortran 9.2 and OpenCoarrays.
> > And, for reasons that I can’t understand, the poor performance pattern with gfortran/OpenCoarrays occurs whenever the compilation of MPICH leads to:
> >
> > mpich 4.0.1 ./configure
> > checking whether gfortran allows mismatched arguments... yes, with -fallow-argument-mismatch
> > configure: error: The Fortran compiler gfortran does not accept programs that call the same routine with arguments of different types without the option -fallow-argument-mismatch. Rerun configure with FFLAGS=-fallow-argument-mismatch and FCFLAGS=-fallow-argument-mismatch
> Just to make this more complete:
> From what I did see, the poor performance pattern is not necessarily a poor performance of the image-to-image data transfers with synchronization (through MPICH), but may rather be a poor performance of executing the purely local codes (and in my case with oversubscribing cores, i.e. using more coarray images than hardware cores are available).
I was examining the docs (https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html) and it turns out that -fallow-argument-mismatch is implied by -std=legacy. -std=legacy is allowed by at least some versions that will reject -fallow-argument-mismatch. Switching to -std=legacy worked for my use case, removing the need for a compatibility test. Just be careful in case -std=legacy has other, less desirable, effects.

Re: gfortran's -fallow-argument-mismatch with old/new compilers

<tg413o$5poo$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2898&group=comp.lang.fortran#2898

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-1257-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: gfortran's -fallow-argument-mismatch with old/new compilers
Date: Sat, 17 Sep 2022 08:39:20 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tg413o$5poo$1@newsreader4.netcologne.de>
References: <t84k3j$kf0$1@newsreader4.netcologne.de>
<65f36e01-9da6-4d4f-9818-6d604e44b456n@googlegroups.com>
<t8i50c$edh$1@newsreader4.netcologne.de>
<e787d6c2-1471-470d-9d88-adac0452a9b6n@googlegroups.com>
<7ed0ad29-8c32-4e3a-81fc-6d9247bd2edan@googlegroups.com>
<118b220d-3c50-43a6-807a-4c3b5b6a0354n@googlegroups.com>
Injection-Date: Sat, 17 Sep 2022 08:39:20 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-1257-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:1257:0:7285:c2ff:fe6c:992d";
logging-data="190232"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 17 Sep 2022 08:39 UTC

Wyatt Spear <wjspear@gmail.com> schrieb:
> I was examining the docs
>(https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html)
> and it turns out that -fallow-argument-mismatch is implied by
> -std=legacy.

That is correct.

>-std=legacy is allowed by at least some versions that
> will reject -fallow-argument-mismatch.

That was the idea, for backwards compatibility.

> Switching to -std=legacy
> worked for my use case, removing the need for a compatibility
> test.

That can be done.

I would still recommend using the test because

>Just be careful in case -std=legacy has other, less desirable,
>effects.

you are right there: -std=legacy accepts a lot of code that is
not in the user's best interest to have :-)

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor