[parsec-users] fluidanimate questions

Hampton, Mark mark.hampton at intel.com
Fri Jul 25 13:25:33 EDT 2008


Hi Chris,

 

Thanks for the answers.  Your comment about the spatial indexing
structure made me realize that I was glossing over that description in
the tech report, so I'm clearer about the distinction between the two
arrays.  However, I still think there might be a bug in the code,
although maybe I'm just not quite comprehending everything.  If I
understand the benchmark correctly, the cells2[] array should correspond
to the "normal" data structure to store all the particles, while the
cells[] array should correspond to the spatial indexing structure used
when performing the computations to limit the number of particles which
have to be processed.  You mentioned that the spatial indexing structure
has to be rebuilt every time the particles move-I can see that this
takes place in the RebuildGrid() function.  I assume that the normal
structure would also need to be updated every time the particles move,
and that should take place at the end of processing each frame.
However, AdvanceParticles() only updates the spatial indexing
structure-the normal structure cells2[] is not updated, and in fact is
never updated at all anywhere in the file after being initialized in
InitSim().  For verification, I compiled the serial version of the code
and ran it on the same input with differing numbers of frames.  Each
time, the exact same output file was produced, which seems to me to be
incorrect unless I'm misunderstanding the purpose of a frame.  Thanks.

 

Mark

 

________________________________

From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of
Christian Bienia
Sent: Friday, July 25, 2008 12:32 PM
To: 'PARSEC Users'
Subject: Re: [parsec-users] fluidanimate questions

 

Hi Mark,

 

The grid algorithm is the only algorithm provided. There are two arrays
to index the particles because fluidanimate sorts all particles into a
spatial array, so one is the "normal" data structure to store all
particles, the other one is a spatial indexing structure that has to be
rebuild every time the particles move. Using a spatial indexing
structure accelerates processing because the kernels used by
fluidanimate have only a small radius - you can skip most of the
computation if you know in advance that the particles are too far to
interact.

 

- Chris

 

 

 

From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of
Hampton, Mark
Sent: Friday, July 25, 2008 11:24 AM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] fluidanimate questions

 

Hi,

 

I had a couple of questions about the fluidanimate benchmark.  First,
the README in the source code directory states that two different
parallelization algorithms are provided-a shared grid algorithm and a
ghost layer algorithm.  However, I only see the shared grid algorithm in
parallel.cpp, which relies on the border[] array to indicate boundary
cells.  Is there still the intention of providing a ghost layer
algorithm?

 

My second question had to do with the method used to advance from one
frame to the next (in both the serial and parallel versions of the
code).  Once the densities, forces, and collisions have been computed,
the AdvanceParticles() function is called so that the particle positions
can be updated.  The updates take place in the cells[] array.  However,
at the beginning of the next frame, when RebuildGrid() is called, the
contents of the cells[] array are overwritten using the contents of the
cells2[] array-and the latter structure is initialized in InitSim() and
never updated again.  So if I'm reading the code correctly, all of the
particle positions will end up being reset to the same values at the
beginning of every frame, rather than actually being updated as the
particles move within/between cells.  Is this a bug, or am I missing
something?  Thanks.

 

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20080725/aabf745a/attachment.html>


More information about the parsec-users mailing list