[Beowulf] OpenMP on AMD dual core processors

Joe Landman landman at scalableinformatics.com
Fri Nov 21 07:23:51 PST 2008


Geoff Jacobs wrote:

> If this were done with MPI, one would have to be careful of the
> boundaries on the matrix as it's partitioned for computation. OpenMP is
> intelligent enough to hold off computation on the tiles south and east
> of the first until the first is done, and so forth?

No... I didn't address the interior vs exterior.  I have a nice worked 
example where I convert this sort of code into an exterior, a skin, and 
the communication for an MPI and OpenMP version.  Scales pretty well. 
You are right, I should have fixed that as well.

> 
>> ! now all you need is a "linear scan" to find positive elements in
>> ! dv.  You can approach these as sum reductions, and do them in
>> ! parallel
>> do i=1,Nx
>>  sum=0.0
>>  do j=1,Ny
>>   sum = sum + dabs(dv(i,j) .gt. 0.0) * dv(i,j)
>>  end do
>>  if (sum .gt. 0.0) converged = 0
>> end do
>>
>> The basic idea is to replace the inner loop conditionals and remove as
>> many of the shared variables as possible.
> 
> Yup, keep things pipelined.

That was the idea, though I didn't compile/test the code to be sure it 
would work.  That and I usually try to avoid real coding when I am tired 
at night.  Coding and beer don't mix (for me).



-- 
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web  : http://www.scalableinformatics.com
        http://jackrabbit.scalableinformatics.com
phone: +1 734 786 8423 x121
fax  : +1 866 888 3112
cell : +1 734 612 4615



More information about the Beowulf mailing list