From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by sourceware.org (Postfix) with ESMTPS id 6BCBC3858D1E for ; Tue, 25 Apr 2023 10:41:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BCBC3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=univ-grenoble-alpes.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=univ-grenoble-alpes.fr Received: from mailhub.u-ga.fr (mailhub-1.u-ga.fr [129.88.178.98]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 03B08402BD; Tue, 25 Apr 2023 12:41:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=univ-grenoble-alpes.fr; s=2020; t=1682419317; bh=5ehQuS5IdXPM2aQyR18qGOLKLKDAjxE9SxMIqbVFmQ4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=e/Qa3lUw5Ynr6vwxqTcVHtApnoQcos5VjeRMlgiHaGrNFjHanzI0+fhXaUGM8E+Ny apV+rD25d4mSIAUmfhhhHOdAWCgKTzyCyyRirRCPDWxqoA7kTTkJYshOzbarB0iwPb JexVoabW5b5GY+KUBN+TE5UP9AnuEljmzupgQkJbze+gv1V2zPNfslBBgNegZ/q9LW OX6x0dbkCj9dNl49p9Cb3IZGAIt+WUq2jAbmL7x5nnAaW8yMLMGBrCpkbhl7l9kAy2 +bSZpryWtRbDPwgwIAIcQ8HXcdWl4+M0mFGmPKWwcYDRExteCmEuUyG4z9u3gtCb71 uy2zuD7MuFqUQ== Received: from smtps.univ-grenoble-alpes.fr (smtps2.u-ga.fr [152.77.18.2]) by mailhub.u-ga.fr (Postfix) with ESMTP id 00FAF10005A; Tue, 25 Apr 2023 12:41:57 +0200 (CEST) Received: from [195.220.26.220] (most6ltpb220.legi.grenoble-inp.fr [195.220.26.220]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: begoup@univ-grenoble-alpes.fr) by smtps.univ-grenoble-alpes.fr (Postfix) with ESMTPSA id A599A140059; Tue, 25 Apr 2023 12:41:56 +0200 (CEST) Message-ID: <9f5c0428-73fd-dc51-e5df-dd7a185ab6fd@univ-grenoble-alpes.fr> Date: Tue, 25 Apr 2023 12:41:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: (GCC) 13.0.1: internal compiler error Content-Language: fr, en-GB To: Bernhard Reutner-Fischer , Patrick Begou via Fortran Cc: Harald Anlauf , Thomas Schwinge References: <138a36f7-8b1e-5955-1d3a-5713a0fcf5b6@univ-grenoble-alpes.fr> <20230424202901.4c0c86b3@nbbrfq> From: Patrick Begou In-Reply-To: <20230424202901.4c0c86b3@nbbrfq> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Whitelist-UGA SMTP Authentifie (begoup@univ-grenoble-alpes.fr) via submission-587 ACL (42) X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_PORT 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: Hi, I've juste created a bug report with a small fortran code to reproduce the internal error in gfortran. Building a new compiler version from devel/omp/gcc-12 branch is in progress. Patrick Le 24/04/2023 à 20:29, Bernhard Reutner-Fischer a écrit : > Cc:ing Thomas, who knows openacc better. > > There is a devel/omp/gcc-12 branch you might want to try. I don't know > how different that branch is wrt openacc. > > HTH, > > On Mon, 24 Apr 2023 19:39:15 > +0200 Patrick Begou via Fortran wrote: > >> Hi Harald >> >> as I said, it is a large, massively parallel fortran code: more than 700 >> files, some with several thousands of lines. It could be difficult to >> create a small reproducer but I will try if the problem is not known as >> an other git branch of this code also create an internal error on >> another file. >> >> Best regards >> >> Patrick >> >> Le 24/04/2023 à 19:27, Harald Anlauf a écrit : >>> Hi Patrick, >>> >>> I did not see any similar report in bugzilla, so could you please >>> open a PR and attach a self-contained reproducer?  Ideally the >>> reproducer would be reduced to simplify the analysis for those >>> familiar with the status of the OpenACC implementation. >>> >>> Thanks, >>> Harald >>> >>> Am 21.04.23 um 17:13 schrieb Patrick Begou: >>>> Hi, >>>> >>>> I have built this morning the latest gfortran from a git clone: >>>> >>>> GNU Fortran (GCC) 13.0.1 20230421 (prerelease) >>>> >>>> I'm trying this compiler on a large and complexe Fortran90 code with >>>> offloading using OpenACC. >>>> >>>> At this time: >>>> >>>> - code compiles with nvfortran and runs on A100 GPU. >>>> >>>> - code compiles with Cray Fortran (with some difficulties) but do not >>>> run on MI250 GPU (we are tacking the problem, a segfault if openacc is >>>> set on) >>>> >>>> - code compile with GNU GCC 13 without -fopenacc option and runs on cpu >>>> (Epyc2 7302) >>>> >>>> - a basic test-code using OpenACC compiles and run on the GPU. >>>> >>>> - compiling my large code with gcc 13.0.1 using -fopenacc for A100 GPU >>>> produce an internal error in the compiler : >>>> >>>> >>>> transforms_defs_m.f90:354:53: >>>> >>>>    354 |             !$acc enter data attach(atransform2%next) >>>>        |                                                     ^ >>>> internal compiler error: in omp_group_base, at gimplify.cc:9412 >>>> 0xa830c6 omp_group_base >>>>      ../../gcc/gcc/gimplify.cc:9412 >>>> 0xa830c6 omp_index_mapping_groups_1 >>>>      ../../gcc/gcc/gimplify.cc:9441 >>>> 0xa833c7 omp_index_mapping_groups >>>>      ../../gcc/gcc/gimplify.cc:9502 >>>> 0xa96a9a gimplify_scan_omp_clauses >>>>      ../../gcc/gcc/gimplify.cc:10802 >>>> 0xa8660d gimplify_omp_target_update >>>>      ../../gcc/gcc/gimplify.cc:15563 >>>> 0xa8660d gimplify_expr(tree_node**, gimple**, gimple**, bool >>>> (*)(tree_node*), int) >>>>      ../../gcc/gcc/gimplify.cc:16928 >>>> 0xa89826 gimplify_stmt(tree_node**, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:7219 >>>> 0xa875a3 gimplify_statement_list >>>>      ../../gcc/gcc/gimplify.cc:2019 >>>> 0xa875a3 gimplify_expr(tree_node**, gimple**, gimple**, bool >>>> (*)(tree_node*), int) >>>>      ../../gcc/gcc/gimplify.cc:16821 >>>> 0xa89826 gimplify_stmt(tree_node**, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:7219 >>>> 0xa86e8a gimplify_and_add(tree_node*, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:492 >>>> 0xa86e8a gimplify_loop_expr >>>>      ../../gcc/gcc/gimplify.cc:1993 >>>> 0xa86e8a gimplify_expr(tree_node**, gimple**, gimple**, bool >>>> (*)(tree_node*), int) >>>>      ../../gcc/gcc/gimplify.cc:16581 >>>> 0xa89826 gimplify_stmt(tree_node**, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:7219 >>>> 0xa875a3 gimplify_statement_list >>>>      ../../gcc/gcc/gimplify.cc:2019 >>>> 0xa875a3 gimplify_expr(tree_node**, gimple**, gimple**, bool >>>> (*)(tree_node*), int) >>>>      ../../gcc/gcc/gimplify.cc:16821 >>>> 0xa89826 gimplify_stmt(tree_node**, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:7219 >>>> 0xa89d2b gimplify_bind_expr >>>>      ../../gcc/gcc/gimplify.cc:1430 >>>> 0xa86d8e gimplify_expr(tree_node**, gimple**, gimple**, bool >>>> (*)(tree_node*), int) >>>>      ../../gcc/gcc/gimplify.cc:16577 >>>> 0xa89826 gimplify_stmt(tree_node**, gimple**) >>>>      ../../gcc/gcc/gimplify.cc:7219 >>>> Please submit a full bug report, with preprocessed source (by using >>>> -freport-bug). >>>> >>>> >>>> Options used (I've just added  -fopenacc for moving from cpu version to >>>> OpenACC): >>>> >>>> -fopenacc -freport-bug -g -fpic -x f95-cpp-input -std=gnu -ffree-form >>>> -fall-intrinsics -fallow-argument-mismatch -Wall -Wextra -W >>>> -Wno-unused-function -Wno-compare-reals -fno-omit-frame-pointer -O3 >>>> -ftree-vectorize -ffast-math -funroll-loops -pipe >>>> >>>> No additionnal files a produced with -freport-bug. >>>> >>>> In attachment the script used to build the compiler. >>>> >>>> Let me know how I can help with informations to improve Gnu fortran >>>> compilers. >>>> >>>> Patrick >>>