[Beowulf] OpenMP on AMD dual core processors
Nathan Moore
ntmoore at gmail.com
Fri Nov 21 07:45:36 PST 2008
Hi Joe,
I found the article you wrote for Linux Journal right about the time you
emailed last night - thanks for the reference and the suggestions! I find
that 1 beer and coding is ok, but num_beer .ge. 2 makes me too poetic and
insufficiently detail oriented. Debugging the next morning is never fun.
On Fri, Nov 21, 2008 at 9:23 AM, Joe Landman <
landman at scalableinformatics.com> wrote:
> 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
>
--
- - - - - - - - - - - - - - - - - - - - -
Nathan Moore
Assistant Professor, Physics
Winona State University
AIM: nmoorewsu
- - - - - - - - - - - - - - - - - - - - -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20081121/f29eb512/attachment.html>
More information about the Beowulf
mailing list