This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: Polyhedron benchmark on Opteron]


On Sat, Sep 30, 2006 at 12:58:20AM +0200, Tobias Burnus wrote:
> Hi,
> 
> FX Coudert wrote:
> > Relaying Tobias' mail, as he is having problems with the mailing-list...
> Trying yet another method to post ...
> 
> >> ISET(1) = huge(ISET)
> >> do i=1,nodes
> >>   if(iset(1) > dtemp(1)) iset(1) = i
> >> end do
> >>
> > 
> > Isn't it iset > dtemp(i)? Otherwise, I do understand why the compiler
> > can gain so much time :)
> 
> Ups. This comes from posting from a different computer than running the
> program and typing in the changes. I actually used
>    if(iset(1)>dtemp(i)) iset(1) = i
> 
> 
> > Otherwise, I do understand why the compiler can gain so much time.
> 
> Try it yourself. I don't understand it either, but it seems to be indeed
> the case. (Actually, I really wonder why no other compiler is inlining
> it, if the gain is that big. -- gfortran would be then 5 times as fast
> as Absoft or Pathscale?!?)
> 
> After doing these changes, Intel is again faster: 0.58s instead of
> gfortran's 1.233s.
> 

Are you sure the two piece of code are equivalent?

   ISET = MINLOC(DTEMP)

   by

   ISET(1) = huge(ISET)
   do i=1,nodes
      if(iset(1) > dtemp(i)) iset(1) = i
   end do

I'll need to go read the code, but I would have thought you
would need some like

   tmp = huge(dtemp)
   do i = 1, nodes
      if (tmp > dtemp(i)) then
         tmp = dtemp(i)   ! Small current smallest value for next comparison.
         iset(1) = i      ! Save the current index.
      end if
   end do



-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]