On Wed, 24 Oct 2012, Kirk, Benjamin (JSC-EG311) wrote:
But the problem: main() and physicsA (resp. physicsB) will coexist
on some of the processors. And recall at least one of them also
uses libMesh. As i see it now, all the extern data we have
(especially the MPI communicator!) makes this impossible. The only
way to properly do it I can think of is to move all that extern
stufff into the LibMeshInit object, and have it proliferate through
the object tree - in particular make it into the mesh, equation
systems, etc…
This was one of the original design goals of the libMeshInit object,
actually. But the only design goal I needed right away was something
like getting RAII semantics working for a code that wanted to do
proper cleanup after an exception throw, so I stopped once that was
accomplished before trying to figure out how to hit any of the
difficult goals.
Am I missing something? This doesn't happen in Queso integration
because on any one processor there is at most one libMesh app,
right?
One app at one time, anyway. IIRC the only fix for QUESO integration
was to make sure we could init libMesh::COMM_WORLD to be something
other than MPI_COMM_WORLD.
This is a pretty valuable use case, and I'm inclined to fix it, but
it could be a major change and I don't want to jump into it without
thinking it through…
Agreed.
The big problems seem to be backwards compatibility and per-object
data storage.
1) I assume we don't want to break the code of everyone using
libMesh::processor_id(), etc? But if libMeshInit's constructor sets a
global pointer to "this", then global functions could grab
previously-global state through that pointer, and only
multi-LibMeshInit-aware apps would need to switch to
my_libmesh->processor_id() instead.
2) How many of our classes would need to start stashing a
pointer-to-LibMeshInit so they'd be multi-LibMeshInit compatible? I
suppose only the MPI/TBB aware classes would need this, and they're
all heavyweight enough that an extra pointer wouldn't matter?
---
Roy
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel