From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31964 invoked by alias); 11 Apr 2018 18:35:23 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 31814 invoked by uid 89); 11 Apr 2018 18:35:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3 autolearn=unavailable version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Apr 2018 18:35:21 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 692ED4023155 for ; Wed, 11 Apr 2018 18:35:20 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28F941208F7B for ; Wed, 11 Apr 2018 18:35:20 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w3BFiOeg016546; Wed, 11 Apr 2018 17:44:25 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w3BFiNEJ016545; Wed, 11 Apr 2018 17:44:23 +0200 Date: Wed, 11 Apr 2018 18:35:00 -0000 From: Jakub Jelinek To: Thomas Koenig Cc: sgk@troutmask.apl.washington.edu, "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, fortran] Remove parallell annotation from DO CONCURRENT Message-ID: <20180411154423.GU8577@tucnak> Reply-To: Jakub Jelinek References: <20180409202803.GB51810@troutmask.apl.washington.edu> <20180410133602.GF8577@tucnak> <3e6497e3-56b8-91ea-5a19-c41e6d28a073@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e6497e3-56b8-91ea-5a19-c41e6d28a073@netcologne.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-04/txt/msg00053.txt.bz2 On Tue, Apr 10, 2018 at 11:50:44PM +0200, Thomas Koenig wrote: > Hi Jakub, > > > > The new test FAILs everywhere, gfortran.dg doesn't have infrastructure to > > run -fopenmp, -fopenacc nor -ftree-parallelize-loops= tests. > > You need to put such tests into libgomp/testsuite/libgomp.fortran/ > > I put the test case in the attached form into the libgomp.fortran > directory, but it failed execution, without error message. > > Anything I could have done differently? Avoid using that much stack? ulimit -s is usually around 8MB on Linux, on other OSes it can be as low as 2MB or even less, so using 160MB edof array is way too much. Also, even if you e.g. allocated it from heap rather than stack (still for some targets it would be too much), isn't that just too expensive for the testsuite? Can you reproduce say even with ne = 200000 (with the fix reverted)? Also, are you going to do the suggested change (because can_be_parallel is something only autopar cares about, but annot_expr_parallel_kind sets like annot_expr_ivdep_kind also safelen to INTMAX): --- gcc/fortran/trans-stmt.c.jj 2018-04-10 08:52:25.467790554 +0200 +++ gcc/fortran/trans-stmt.c 2018-04-11 17:42:40.670493050 +0200 @@ -3643,12 +3643,13 @@ gfc_trans_forall_loop (forall_info *fora cond = fold_build2_loc (input_location, LE_EXPR, logical_type_node, count, build_int_cst (TREE_TYPE (count), 0)); - /* PR 83064 means that we cannot use the annotation if the - autoparallelizer is active. */ - if (forall_tmp->do_concurrent && ! flag_tree_parallelize_loops) + /* PR 83064 means that we cannot use the annot_expr_parallel_kind + annotation until autopar is tought to handle local variables + in loops annotated that way. */ + if (forall_tmp->do_concurrent) cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond), cond, build_int_cst (integer_type_node, - annot_expr_parallel_kind), + annot_expr_ivdep_kind), integer_zero_node); tmp = build1_v (GOTO_EXPR, exit_label); > ! { dg-do run } > ! PR 83064 - this used to give wrong results. > ! { dg-additional-options "-O3 -ftree-parallelize-loops=2" } > ! Original test case by Christian Felter > > program main > use, intrinsic :: iso_fortran_env > implicit none > > integer, parameter :: nsplit = 4 > integer(int64), parameter :: ne = 20000000 > integer(int64) :: stride, low(nsplit), high(nsplit), edof(ne), i > real(real64), dimension(nsplit) :: pi Jakub