On Sat, Aug 27, 2011 at 15:24, Likun Tan <likunt at andrew.cmu.edu> wrote:
> g(temp) could be sum of temp[num][j][i] where num from 1 to N, so the > index k is specified. > It could be, but you still didn't explain how the indices i and j were made available to g() or what that code looks like. That is almost certainly your problem. You might want to try running with valgrind. Also, this is totally the wrong memory layout for performance (you want to sum over the last index, unfortunately this requires changing your interpretation of the x,y,z directions). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110827/5d553be8/attachment.htm>
