public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Auto-vectorization of SUM intrinsic in gfortran
       [not found] <AANLkTiko3Ceox6NywbBwPDLp5VCtCp8FTZ42Eg9U=Q-C@mail.gmail.com>
@ 2011-01-28 16:03 ` Wilfredo Sifuentes
  2011-01-28 17:03   ` Tim Prince
  0 siblings, 1 reply; 4+ messages in thread
From: Wilfredo Sifuentes @ 2011-01-28 16:03 UTC (permalink / raw)
  To: gcc-help

Dear all,
In spite that some information on the WWW says that the SUM intrinsic
function of Fortran 90 can be parallelizable, I found that gfortran
4.5 do not parallelize the following line (even if I fix or change
“AHID” variable to “1” ):

  temporal= SUM(PERLIN(1:NLIN,AHID,1:NETP,1:NBLO))

Where PERLIN is defined as:  REAL*8  PERLIN(MAXLIN,0:1,MAXETP,MAXBLO).
The compiler report: “note: not vectorized: unsupported use in stmt.”
Am I missing something?

Regards
Wilfredo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto-vectorization of SUM intrinsic in gfortran
  2011-01-28 16:03 ` Auto-vectorization of SUM intrinsic in gfortran Wilfredo Sifuentes
@ 2011-01-28 17:03   ` Tim Prince
  2011-01-28 17:19     ` Wilfredo Sifuentes
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Prince @ 2011-01-28 17:03 UTC (permalink / raw)
  To: gcc-help

On 1/28/2011 11:03 AM, Wilfredo Sifuentes wrote:
> Dear all,
> In spite that some information on the WWW says that the SUM intrinsic
> function of Fortran 90 can be parallelizable, I found that gfortran
> 4.5 do not parallelize the following line (even if I fix or change
> “AHID” variable to “1” ):
>
>    temporal= SUM(PERLIN(1:NLIN,AHID,1:NETP,1:NBLO))
>
> Where PERLIN is defined as:  REAL*8  PERLIN(MAXLIN,0:1,MAXETP,MAXBLO).
> The compiler report: “note: not vectorized: unsupported use in stmt.”
> Am I missing something?
>
> Regards
> Wilfredo
I don't remember the diagnostic, but SUM vectorization would never occur 
without options implying -fassociative-math (unfortunately, specifying 
that one by itself doesn't help; -ffast-math does, but is too big a hammer).
Even beyond that, more information from you may be useful.

-- 
Tim Prince

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto-vectorization of SUM intrinsic in gfortran
  2011-01-28 17:03   ` Tim Prince
@ 2011-01-28 17:19     ` Wilfredo Sifuentes
  2011-01-29  0:02       ` Tim Prince
  0 siblings, 1 reply; 4+ messages in thread
From: Wilfredo Sifuentes @ 2011-01-28 17:19 UTC (permalink / raw)
  To: gcc-help

Thank you Tim
As you said with  -ffast-math option it works but others lines that
seems to be parallelizable doesn´t e.g.
Look at the two contiguous lines:

        INGTAR(HI,1:NETP)= ZERO  !Compiller says : not vectorized:
complicated access pattern.
        VAEMB(1:NEMB,HI,1:NETP)= ZERO ! Compiler says: note: LOOP VECTORIZED.

The code I am working is quit old (and big) and I am only researching
the (easy) ways to do it faster in actual computers
Regards
Wilfredo

2011/1/28 Tim Prince <n8tm@aol.com>:
> On 1/28/2011 11:03 AM, Wilfredo Sifuentes wrote:
>>
>> Dear all,
>> In spite that some information on the WWW says that the SUM intrinsic
>> function of Fortran 90 can be parallelizable, I found that gfortran
>> 4.5 do not parallelize the following line (even if I fix or change
>> “AHID” variable to “1” ):
>>
>>   temporal= SUM(PERLIN(1:NLIN,AHID,1:NETP,1:NBLO))
>>
>> Where PERLIN is defined as:  REAL*8  PERLIN(MAXLIN,0:1,MAXETP,MAXBLO).
>> The compiler report: “note: not vectorized: unsupported use in stmt.”
>> Am I missing something?
>>
>> Regards
>> Wilfredo
>
> I don't remember the diagnostic, but SUM vectorization would never occur
> without options implying -fassociative-math (unfortunately, specifying that
> one by itself doesn't help; -ffast-math does, but is too big a hammer).
> Even beyond that, more information from you may be useful.
>
> --
> Tim Prince
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Auto-vectorization of SUM intrinsic in gfortran
  2011-01-28 17:19     ` Wilfredo Sifuentes
@ 2011-01-29  0:02       ` Tim Prince
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Prince @ 2011-01-29  0:02 UTC (permalink / raw)
  To: gcc-help

On 1/28/2011 12:03 PM, Wilfredo Sifuentes wrote:
> Thank you Tim
> As you said with  -ffast-math option it works but others lines that
> seems to be parallelizable doesn´t e.g.
> Look at the two contiguous lines:
>
>          INGTAR(HI,1:NETP)= ZERO  !Compiller says : not vectorized:
> complicated access pattern.
>   
That looks like a consequence of a non-unity stride.  It's probably more 
efficient to use scalar code.
>> --
>> Tim Prince
>>
>>


-- 
Tim Prince

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-28 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTiko3Ceox6NywbBwPDLp5VCtCp8FTZ42Eg9U=Q-C@mail.gmail.com>
2011-01-28 16:03 ` Auto-vectorization of SUM intrinsic in gfortran Wilfredo Sifuentes
2011-01-28 17:03   ` Tim Prince
2011-01-28 17:19     ` Wilfredo Sifuentes
2011-01-29  0:02       ` Tim Prince

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).