On Wed, 3 Sep 2014, Andrew Davis wrote:

> auto mesh = make_shared<libMesh::Mesh>();
>
> to
>
> auto mesh = make_shared<libMesh::Mesh>(libMesh::Parallel::Communicator());
> Ly, libMesh::QUAD9);

Not quite.  That default Communicator constructor uses MPI_COMM_NULL,
which is almost certainly not what you want.

If you just want your old code to work, configure libMesh with
--enable-default-comm-world, which will cause all parallel objects to
be initialized with MPI_COMM_WORLD as in previous versions.

If you want to update your code, you need to get an actual
communicator to use to initialize the mesh.  In our examples we
typically create our "LibMeshInit init" object with no communicator
argument (which causes it to initialize MPI itself and to use
MPI_COMM_WORLD as the default communicator) and when then use the
LibMeshInit communicator (grabbed via init.comm()) to initialize a
Mesh object.

If you're doing MCMC, though, you might benefit from initializing MPI
yourself, getting sub-communicators for different chains, and
initializing libMesh with the sub-communicators.  That was actually
our original motivation for enabling communicator-juggling within
libMesh.
---
Roy

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to