From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Richard Biener <rguenther@suse.de>,
Steve Kargl <sgk@troutmask.apl.washington.edu>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR37336 finalization
Date: Wed, 15 Mar 2023 07:29:06 +0000 [thread overview]
Message-ID: <CAGkQGi+UVgshmv1xjFj_6avizcCFBL-8jfDk5OwaB3JGkOxLjw@mail.gmail.com> (raw)
In-Reply-To: <CAGkQGiL5TgOgVMB=vFZynfUs5VXrBBXHysKPRfP=qn98B=Nj9g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3404 bytes --]
Hi All,
I am awaiting a green light to commit this patch.... or not.
Cheers
Paul
On Fri, 10 Mar 2023 at 16:49, Paul Richard Thomas <
paul.richard.thomas@gmail.com> wrote:
> Hi Thomas,
>
> Before answering that, I thought that I had better try the polyhedron
> suite with -fwrapv and -std=legacy together. As far as I can see, all is
> well and so, yes, I think that is a good idea.
>
> Cheers
>
> Paul
>
>
> ================================================================================
> Date & Time : 9 Mar 2023 18:13:04
> Test Name : gfor_13
> Compile Command : gfc13 -ffast-math -funroll-loops -O3 -fwrapv -std=legacy
> %n.f90 -o %n
> Benchmarks : ac aermod air capacita channel2 doduc gas_dyn2 fatigue2
> induct2 linpk mp_prop_design nf protein rnflow test_fpu2 tfft2
> Maximum Times : 10000.0
> Target Error % : 0.100
> Minimum Repeats : 1
> Maximum Repeats : 2
>
> Benchmark Compile Executable Ave Run Number Estim
> Name (secs) (bytes) (secs) Repeats Err %
> --------- ------- ---------- ------- ------- ------
> ac 0.00 55904 7.17 2 0.0628
> aermod 0.00 1280104 10.77 2 1.2769
> air 0.00 136392 4.09 2 0.4276
> capacita 0.00 102680 23.79 2 0.7587
> channel2 0.00 43928 108.59 2 0.5834
> doduc 0.00 194224 13.98 2 0.2468
> gas_dyn2 0.00 104080 105.46 2 0.1659
> fatigue2 0.00 90752 62.86 2 1.3092
> induct2 0.00 224920 58.08 2 0.6594
> linpk 0.00 51768 7.15 2 0.4892
> mp_prop_desi 0.00 48432 94.28 2 0.0164
> nf 0.00 64480 11.16 2 0.0134
> protein 0.00 140592 24.22 2 10.0347
> rnflow 0.00 197704 20.74 2 0.1904
> test_fpu2 0.00 147232 53.54 2 0.1093
> tfft2 0.00 43896 55.09 2 3.8688
>
> Geometric Mean Execution Time = 26.19 seconds
>
>
> ================================================================================
>
> On Thu, 9 Mar 2023 at 17:30, Thomas Koenig <tkoenig@netcologne.de> wrote:
>
>> Hi Paul,
>>
>>
>> > -fdefault-integer-8 does indeed fix the problem with
>> > rnflow.f90 but breaks tfft2.f90, with a type mismatch at lines 36 and
>> 44.
>> >
>> > integer(8), parameter :: jmul = 843314861 ! multiplicateur
>> > integer(8), parameter :: jadd = 453816693 ! constante
>> additive
>> > Does the job and is portable.
>> >
>>
>> I think -frwapv (as suggested by Jakub) would be the better choice.
>> The problem is the linear congruential pseudo-random number generators
>> which were much used in earlier times (and are still present in
>> legacy code), which violate the Fortran standards by assuming silent
>> truncation.
>>
>> If a new optimization breaks this (widespread, but illegal) idiom,
>> maybe the best way to deal with it is to add -frwapv to -std=legacy.
>>
>> What do you think?
>>
>> Best regards
>>
>> Thomas
>>
>
>
> --
> "If you can't explain it simply, you don't understand it well enough" -
> Albert Einstein
>
--
"If you can't explain it simply, you don't understand it well enough" -
Albert Einstein
next prev parent reply other threads:[~2023-03-15 7:29 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 13:45 Paul Richard Thomas
2023-03-07 14:58 ` Thomas Koenig
2023-03-07 17:15 ` Steve Kargl
2023-03-08 7:32 ` Paul Richard Thomas
2023-03-08 8:05 ` Thomas Koenig
2023-03-08 8:14 ` Richard Biener
2023-03-08 8:55 ` Thomas Koenig
2023-03-08 9:10 ` Richard Biener
2023-03-08 12:27 ` Paul Richard Thomas
2023-03-08 10:28 ` Tobias Burnus
2023-03-08 9:14 ` Paul Richard Thomas
2023-03-08 9:21 ` Richard Biener
2023-03-08 14:55 ` Paul Richard Thomas
2023-03-08 14:57 ` Richard Biener
2023-03-08 21:35 ` Thomas Koenig
2023-03-09 7:13 ` Thomas Koenig
2023-03-09 8:32 ` Richard Biener
2023-03-09 8:18 ` Richard Biener
2023-03-09 12:43 ` Paul Richard Thomas
2023-03-09 17:30 ` Thomas Koenig
2023-03-10 3:56 ` Jerry D
2023-03-10 16:49 ` Paul Richard Thomas
2023-03-15 7:29 ` Paul Richard Thomas [this message]
2023-03-15 7:37 ` Richard Biener
2023-03-16 7:20 ` Paul Richard Thomas
2023-03-09 15:05 ` Steve Kargl
2023-03-08 15:12 ` Steve Kargl
2023-03-08 15:29 ` Andrew Benson
2023-03-08 16:29 ` Tobias Burnus
2023-03-08 17:12 ` Paul Richard Thomas
2023-06-02 13:42 ` Paul Richard Thomas
2023-06-03 5:50 ` Thomas Koenig
2023-06-03 7:32 ` Steve Kargl
2023-06-03 13:16 ` Paul Richard Thomas
2023-06-03 19:10 ` Harald Anlauf
2023-06-03 19:22 ` Thomas Koenig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGkQGi+UVgshmv1xjFj_6avizcCFBL-8jfDk5OwaB3JGkOxLjw@mail.gmail.com \
--to=paul.richard.thomas@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=rguenther@suse.de \
--cc=sgk@troutmask.apl.washington.edu \
--cc=tkoenig@netcologne.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).