[parsec-users] fluidanimate questions

Milo Martin milom at cis.upenn.edu
Sat Aug 23 21:15:35 EDT 2008

An update on the fuildanimate bug.

I was doing some testing with the "fix" I mentioned earlier today, and  
the benchmark now crashes.

It seems the benchmark has a hard-coded assumption that each "cell" of  
the volume can have at most 16 particles in it.  If a cell has more  
than that, the array accesses go beyond the size of the fixed-sized  
array, eventually causing a segmentation fault.

It looks like fixing this would require changes to the data structures  
as well.

- Milo

On Aug 23, 2008, at 8:43 PM, Milo Martin wrote:

> I've rediscovered the same bug in fluidanimate that Mark Hampton  
> asked about earlier.
> The cells2[] array really isn't being changed after initialization,  
> so the exact same computations runs each timestep.
> It seems that all that is needed to fix the benchmark would be two  
> calls to std::swap() at the end of each iteration.  Once to swap the  
> cells2[] and cells[] pointers and once to swap the cnumPars and  
> cnumPars2 pointers.
> This bug is present in the original serial version, so it wasn't  
> introduced during parallelization.
> Is there any way to verify this problem and find out if this is  
> indeed the right fix?
> - Milo Martin
> --
> Milo M. K. Martin (milom at cis.upenn.edu)
> http://www.cis.upenn.edu/~milom/
> Assistant Professor
> Computer and Information Sciences Department
> University of Pennsylvania

More information about the parsec-users mailing list