When running in parallel, grid is not parallelized until state is instantiated.
Perhaps we need a parallel Grid class in pyclaw/src/petclaw/.
I don't think the Grid object was ever meant to be parallel. Is this still an issue?
My impression was the same, that Grid would know what the extents of the domain were but that it would still only represent the portion of the domain that was covered by it's associated State object. I am uncertain as to what it is meant to have the grid parallelized in this case.
The issue is this: suppose that you want to set up a 1D simulation with 100 cells on 2 processes. Then the Grid object on each process should be of size 50. But when you instantiate a Domain, it has a grid of size 100. It's only when you instantiate a PetClaw State that you get grids of size 50 with the appropriate coordinates. It would be all too easy to try to set the initial condition using the Grid of size 100 (we hit this bug in the past, which is why I raised the issue).
On Sun, Sep 30, 2012 at 7:20 PM, Kyle Mandli [email protected]:
My impression was the same, that Grid would know what the extents of the domain were but that it would still only represent the portion of the domain that was covered by it's associated State object. I am uncertain as to what it is meant to have the grid parallelized in this case.
— Reply to this email directly or view it on GitHubhttps://github.com/clawpack/pyclaw/issues/97#issuecomment-9015049.
This was the original purpose of having a Patch object that would be the top level object that would have encapsulated the non-parallel objects where as the Grid objects would include only local process information. Would it be easier to try to make clear in the documentation that the definition of the domain creates Patch objects and lower down Grid objects are present to correspond to State objects?
This was the original purpose of having a Patch object that would be the top level object that would have encapsulated the non-parallel objects where as the Grid objects would include only local process information. Would it be easier to try to make clear in the documentation that the definition of the domain creates Patch objects and lower down Grid objects are present to correspond to State objects?
Absolutely correct. We allowed users to create Domain objects as a short-cut for very trivial simulation. Perhaps there's some logic the code can do to test if somebody created a serial Grid object and is now trying to use it in parallel?
David, do you mind posting a gist of an application code that breaks in this way?
Thanks, Aron