From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 1C05D3858D20 for ; Wed, 15 Mar 2023 07:29:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C05D3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x434.google.com with SMTP id b20so11142156pfo.6 for ; Wed, 15 Mar 2023 00:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678865358; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BbpGbo0u3/Hn5A6P1Hrd5oh8gLTzgtp9XkFtCBzp8hs=; b=fSbvzPIx5SLegpafvVkNHbJ7T2voAwio4U0ZJOHNMKPVmhyageGyFMd/N12RoMKoSc Y945kcazkjhJkDvt5V2vG6P/kkBTjlAsG3p2tClGEb4fdWtbWFl9LF0W8P9eATlxWBD4 pH+kLKfXQkzC0KFW3SOxDu6jrBak/srpzsaqS0c9hcCComxInO0rgG3V3jj5AzahA9Xv jA1gqlf/caXMhFCzTNlBafcyz6Z6SmbAV0nCyM3fMoqgtYlozSVXSa9feTes6PGa1vzg 75wPzZ9IgrpIzUqBu6ryqbZybYiphKx1CwmMBphbs/QL6EQUJKqjzB7jd+cMNof+3rf+ /Apw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678865358; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BbpGbo0u3/Hn5A6P1Hrd5oh8gLTzgtp9XkFtCBzp8hs=; b=41ori7r4OKqYmdMtSz1b2eK1Xq2/iGNfLSFFMa3ajizg/zlCZ7tVfMd7qTdeMOwOif lYaAmHQFMLloEeRo5KRRj23LPKcJA8Q6TpCygHHma7FeLDsXIE6tk5m+yARd8Y6kWA/2 CWdX6G55bHsAv/ljWFqTqJLi4C5XE2yNls1YnLgEULYU9LhYNM0RGTnA6pSL+cz1B99b zVGBuQKTQG1jgqkO/c7PchDASAdU12F84wUKc0wt4iTGDG+6rTYJIdh1QHpLGALEXuIf rbaXSqM9P9exVNEm3oWqhFbKPtkMattSrFBF7B46uFPWHh1pVG4jEcclsM3SCLo/Gw+J f8KQ== X-Gm-Message-State: AO0yUKUU3qlVkEIT/x+BPf0m6J8h4foPFwLfmuxPQjsVJPwGeqorFlOd aQ/D1WaKt5Q1d2jvS5P2SNyIdStWOF2LLbQU+SQ= X-Google-Smtp-Source: AK7set+B4QN8tTuyuMPY/5H+pXYs4blWLZmiyuTX3HTcRFjBDqXeEDlkzmJn5f86QsQxE85cLt58tjf8hzVtEq9NHII= X-Received: by 2002:a63:2918:0:b0:503:77c9:45aa with SMTP id bt24-20020a632918000000b0050377c945aamr13605791pgb.9.1678865357875; Wed, 15 Mar 2023 00:29:17 -0700 (PDT) MIME-Version: 1.0 References: <582085ac-0d07-a516-732d-e82e0a4e01c9@netcologne.de> In-Reply-To: From: Paul Richard Thomas Date: Wed, 15 Mar 2023 07:29:06 +0000 Message-ID: Subject: Re: [Patch, fortran] PR37336 finalization To: Thomas Koenig Cc: Richard Biener , Steve Kargl , "fortran@gcc.gnu.org" Content-Type: multipart/alternative; boundary="000000000000482e3e05f6eb4d11" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000482e3e05f6eb4d11 Content-Type: text/plain; charset="UTF-8" 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 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 --000000000000482e3e05f6eb4d11--