From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80761 invoked by alias); 20 Jun 2016 15:04:24 -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 80749 invoked by uid 89); 20 Jun 2016 15:04:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*computer.org, H*Ad:D*computer.org, D*aol.com X-HELO: fed1rmfepo202.cox.net Received: from fed1rmfepo202.cox.net (HELO fed1rmfepo202.cox.net) (68.230.241.147) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jun 2016 15:04:22 +0000 Received: from fed1rmimpo109.cox.net ([68.230.241.158]) by fed1rmfepo202.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20160620150420.JZRE2415.fed1rmfepo202.cox.net@fed1rmimpo109.cox.net> for ; Mon, 20 Jun 2016 11:04:20 -0400 Received: from [10.0.1.5] ([68.107.41.174]) by fed1rmimpo109.cox.net with cox id 934K1t00F3lTYn00134KvW; Mon, 20 Jun 2016 11:04:19 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-Spam: 0 X-Authority-Analysis: v=2.1 cv=Jb4c1R+V c=1 sm=1 tr=0 a=KukgnFABROpOcql6aC/Ryw==:117 a=KukgnFABROpOcql6aC/Ryw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=N659UExz7-8A:10 a=3oc9M9_CAAAA:8 a=ODes69u4Bmaba1KnFz4A:9 a=pILNOxqGKmIA:10 a=WQP3B-o2DcFb_-ao3AbR:22 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=sdcycling@cox.net Subject: Re: Loop Vectorization Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=windows-1252 From: sdcycling In-Reply-To: <8vtq1t00B2qVqVd01vtrfL> Date: Mon, 20 Jun 2016 15:04:00 -0000 Cc: fortran@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8E04A2EF-9140-4E84-81E7-61841073AF06@cox.net> <57678924.7050807@net-b.de> <8vtq1t00B2qVqVd01vtrfL> To: tprince@computer.org X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00059.txt.bz2 Hi Tim, I am currently using MPICH. I could try MPICH in combination with OMP, bu= t the number of processors on my workstation are currently maxed out. The most computationally intensive loop uses derived data types within the = loops that are nested 3 deep:=20=20 do concurrent (k=3Dmg(mlev)%kb,mg(mlev):ke:1) do concurrent (j=3Dmg(mlev)%jb,mg(mlev):je:1) do concurrent (i=3Dmg(mlev)%ib,mg(mlev):ie:2) residual=3D =85 mgamr(mlev,ilev)%subdomain(n)%array(i,j,k)=3Dresidual =85 enddo=20 enddo enddo It is a fragment of a Gauss-Seidel iteration. mlev is the multigrid level.= ilev is the AMR level. n is the subdomain. The data dependency is elimi= nated by red-black ordering with a stride of 2 in the innermost loop. The= innermost loop is not vectorizing. The specific compiler output is =93no= te: not vectorized: control flow in loop.=94 Thank you, Doug. > On Jun 20, 2016, at 12:53 AM, Tim Prince wrote: >=20 > On 6/20/2016 2:11 AM, Tobias Burnus wrote: >> Hello, >>=20 >> sdcycling wrote: >>> I am using gfortran to build a finite-difference code. How do I tell >>> whether a do loop is being vectorized? >> Try the -fopt-info-... options of GCC, in particular >> -fopt-info-vec-optimized >>=20 >>> Also, how do I use compiler directives in gfortran to indicate that a >>> do loop does not have any data dependencies? >>=20 >> Not as directive, but using Fortran's "DO CONCURRENT" instead of a >> normal DO will imply this. >>=20 > !$ omp simd may be useful, if your objective is simd vectorization. >=20 >=20 > --=20 > Tim Prince