From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38997 invoked by alias); 12 Apr 2018 07:17:38 -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 38979 invoked by uid 89); 12 Apr 2018 07:17:37 -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=ham version=3.3.2 spammy=2000000 X-Spam-User: qpsmtpd, 2 recipients 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; Thu, 12 Apr 2018 07:17:36 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E531FF8FD4; Thu, 12 Apr 2018 07:17:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB1BC2024CA4; Thu, 12 Apr 2018 07:17:23 +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 w3C7HLhO025160; Thu, 12 Apr 2018 09:17:21 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w3C7HJ6h025159; Thu, 12 Apr 2018 09:17:19 +0200 Date: Thu, 12 Apr 2018 07:17: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: <20180412071719.GE8577@tucnak> Reply-To: Jakub Jelinek References: <20180409202803.GB51810@troutmask.apl.washington.edu> <20180410133602.GF8577@tucnak> <3e6497e3-56b8-91ea-5a19-c41e6d28a073@netcologne.de> <20180411154423.GU8577@tucnak> <8d3541f6-ecc5-66d1-d59c-d5b5c4b8f8a6@netcologne.de> <20180411183333.GY8577@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-04/txt/msg00055.txt.bz2 On Wed, Apr 11, 2018 at 09:47:22PM +0200, Thomas Koenig wrote: > Am 11.04.2018 um 20:33 schrieb Jakub Jelinek: > > > > I have attached updated patch which moves the test case to > > > gfortran.dg/gomp (where it actually passes). > > > > How could it pass there? dg-do run tests don't belong into g*.dg/gomp/, > > nothing adds the -B etc. options needed to find libgomp.spec or libgomp > > as a library, or adds it to LD_LIBRARY_PATH etc. > > There are zero dg-do run tests in gfortran.dg/gomp/, there are 4 > > dg-do run tests in c-c++-common/gomp/, but those work fine because they > > use -fopenmp-simd option rather than > > -fopenmp/-fopenacc/-ftree-parallelize-loops= etc. > > So, where should the test go? > > The suggestion in PR 85346, to put it into > libgomp/testsuite/libgomp.fortran/, does not work: Yes, and I said what can be done to make it work; in patch form below. > Running ../../../../trunk/libgomp/testsuite/libgomp.fortran/fortran.exp ... > FAIL: libgomp.fortran/do_concurrent_5.f90 -O execution test > > even when ne (the array size) has been reduced to 2**20, far below ne is not the array size, the array size is 8 * ne, and 8 * 1MB is 8MB and you eat all of the usual stack limit just by that. > reasonable memory limits. The test passes when given the > -O1 -ftree-parallelize-loops=2 options by hand. > > So, what's the idea? Is there actually a directory which works, > or are we left with a wrong-code bug for which no test case is > possible? That would be quite bad, I think. Here is incremental diff. With the dg-skip-if and removal of explicit -O3, you make the test run only once with -O3 -g, and skip the other variants: UNSUPPORTED: libgomp.fortran/do_concurrent_5.f90 -O0 UNSUPPORTED: libgomp.fortran/do_concurrent_5.f90 -O1 UNSUPPORTED: libgomp.fortran/do_concurrent_5.f90 -O2 UNSUPPORTED: libgomp.fortran/do_concurrent_5.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions UNSUPPORTED: libgomp.fortran/do_concurrent_5.f90 -Os and with -fno-openmp you disable the default -fopenmp which you really don't need for the testcase, there are no OpenMP directives in there. --- libgomp/testsuite/libgomp.fortran/do_concurrent_5.f90 2018-04-11 17:27:59.035100057 +0200 +++ libgomp/testsuite/libgomp.fortran/do_concurrent_5.f90 2018-04-12 09:12:40.611789503 +0200 @@ -1,6 +1,7 @@ ! { dg-do run } ! PR 83064 - this used to give wrong results. -! { dg-additional-options "-O3 -ftree-parallelize-loops=2" } +! { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O3 -g" } } +! { dg-additional-options "-fno-openmp -ftree-parallelize-loops=2" } ! Original test case by Christian Felter program main @@ -8,7 +9,7 @@ program main implicit none integer, parameter :: nsplit = 4 - integer(int64), parameter :: ne = 20000000 + integer(int64), parameter :: ne = 2000000 integer(int64) :: stride, low(nsplit), high(nsplit), edof(ne), i real(real64), dimension(nsplit) :: pi Jakub