Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken


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

SubjectAuthor
* gfortran's -fallow-argument-mismatch with old/new compilersWyatt Spear
`- gfortran's -fallow-argument-mismatch with old/new compilersThomas Koenig

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

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

  copy mid

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

  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: wjsp...@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.novabbs.com/devel/article-flat.php?id=10150&group=comp.lang.fortran#10150

  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: tkoe...@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