Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Mesh By Choice #2105

Closed
friedmud opened this issue Feb 14, 2014 · 49 comments
Closed

Parallel Mesh By Choice #2105

friedmud opened this issue Feb 14, 2014 · 49 comments
Assignees
Labels
C: Framework T: task An enhancement to the software.

Comments

@friedmud
Copy link
Contributor

We need to configure libMesh with ParallelMesh always... and then optionally use "parallel = true" in the Mesh block to turn it on. We will default to SerialMesh.

Just don't use Mesh() to create the Mesh... use either SerialMesh or ParallelMesh depending on that option.

@jwpeterson
Copy link
Member

In 4e282ef:

Make MooseMesh::_mesh protected and force clients to use the accessor.

Refs #2105.

@jwpeterson
Copy link
Member

In 2e96c32:

Adding documentation in MooseMesh.

Refs #2105.

@jwpeterson
Copy link
Member

In 92f695d:

Move function definitions to C file.

Refs #2105.

@jwpeterson
Copy link
Member

In fe82ced:

MooseMesh::_mesh is now a pointer, in preparation for letting it
dynamically choose between being a SerialMesh or ParallelMesh.

Refs #2105.

@jwpeterson
Copy link
Member

In 8b77942:

Consistently use getMesh().

That way we can insulate code from possible future changes to the type
of MooseMesh::_mesh.

Refs #2105.

@jwpeterson
Copy link
Member

In :

Be explicit about the use of SerialMesh where necessary.

Refs #2105.

@jwpeterson
Copy link
Member

In b676994:

Don't use LIBMESH_ENABLE_PARMESH to determine whether MooseMesh
holds a ParallelMesh.

MooseMesh will (eventually) be able to contain either a SerialMesh
_or_ a ParallelMesh regardless of the value of LIBMESH_ENABLE_PARMESH,
so we can't rely on that anymore.

Refs #2105.

@jwpeterson
Copy link
Member

Since the plan is to use a MooseEnum {PARALLEL, SERIAL, DEFAULT} to read the user's input, we probably don't want to call it 'parallel' any more:

parallel = parallel

or even better

parallel = serial

is just crazy-pants. What do we want to call it? Right now I'm using

mesh_decomposition_type = parallel

But I'm willing to admit that name's a little cumbersome...

@YaqiWang
Copy link
Contributor

or 'distribute_mesh = true/false'

@aeslaughter
Copy link
Contributor

How about something simple: mesh_type

mesh_type = parallel
mesh_type = serial
mesh_type = default

@jwpeterson
Copy link
Member

Andrew, I first thought about 'mesh_type' but since we already have the 'type' parameter, I thought it might be too similar? If anyone else thinks mesh_type is fine I'd be happy to use that instead.

Yaqi, your suggestion is good too, but we do need something more than just a boolean type. The 'default' mesh_type means that the input file will work with either SerialMesh or ParallelMesh, and the user can override it by specifying --parallel-mesh on the command line.

@andrsd
Copy link
Contributor

andrsd commented Feb 14, 2014

Why not to use just: decomposition = {default | parallel | serial} ?

@friedmud
Copy link
Contributor Author

I like something close to what Yaqi said:

parallel_distribution = { default | serial | parallel }

or maybe just

distribution = { default | serial | parallel }

"decomposition" is getting too close to "partitioning" I could see people getting confused by that.

@jwpeterson
Copy link
Member

OK going with this

distribution = { default | serial | parallel }

@jwpeterson
Copy link
Member

In 354392c:

Picking a better name for _is_parallel (it really means _is_nemesis).

The accessor is removed, but it could always be readded.

'nemesis' is a parameter on MooseMesh instead of FileMesh.

Reformatting long doc strings onto separate lines.

Adding new command line option to MOOSE: --parallel-mesh.

MooseMesh now uses the MooseApp object to determine if
--parallel-mesh has been specified on the command line.

MooseMesh reads an enumeration for the type of mesh "distribution" to use.

Note: if the user does not specify anything for 'distribution' in the
Mesh block, it is possible to set it to parallel via the
--parallel-mesh command line argument, otherwise it defaults to
serial.  This command line arg is not allowed to override the user if
he does specify 'distribution = serial' in the Mesh block.

Refs #2105.

@jwpeterson
Copy link
Member

In d9fb1d4:

Nemesis output can be performed even if the underlying
libMesh mesh is a SerialMesh.

Removing an expect_err test and modifying another so
that it runs for serial meshes as well.

Refs #2105.

@jwpeterson
Copy link
Member

In 37fbf05:

Transitioning from mesh_mode = 'SERIAL' (which is no longer sufficient)
to adding 'distribution = serial' in Periodic BCs tests.

Periodic BCs do not currently work with ParallelMesh on more than one
processor, but most of these input files will actually work with
ParallelMesh enabled if you run on 1 processor...

Refs #2105.
Refs #2119.

@jwpeterson
Copy link
Member

In 4b3f7b1:

Transitioning from mesh_mode = 'SERIAL' (which is no longer sufficient)
to adding 'distribution = serial' in all "geomsearch" tests.

The geometric search stuff does not currently work with ParallelMesh on
more than one processor, but most of these input files will actually
work with ParallelMesh enabled if you run on 1 processor...

Refs #2105.
Refs #2121.

@jwpeterson
Copy link
Member

In 3c91442:

ExodusII_IO::write_element_data() is causing a large number of tests
to fail in parallel with ParallelMesh enabled.  If we can fix that in
libmesh, we can hopefully remove the 'distribution = serial' line from
all the input files in this commit.

Refs #2105.
Refs #2122.

@jwpeterson
Copy link
Member

In 4da24ee:

This test no longer needs to be marked with mesh_mode = 'PARALLEL'
since nemesis=true in the Mesh block implies the use of ParallelMesh.

Refs #2105.

@jwpeterson
Copy link
Member

In 6e81a40:

This test has to use SerialMesh because stitch_meshes() is only implemented for SerialMesh.

Note that running:

../../../moose_test-opt -i tiled_mesh_test.i --mesh-only --parallel-mesh

Produces the error:

 Exiting without writing output
 ERROR: Unrecognized file extension: --parallel-mesh

So I think there's something wrong with our command line argument processing...

Refs #2105.
Refs #2124.

@jwpeterson
Copy link
Member

In c38f4ef:

The test_parmesh_check is no longer valid, so I removed it from
the chain of prerequisites.

Refs #2105.

@jwpeterson
Copy link
Member

In a1f8022:

DiracKernels don't seem to work currently in parallel with ParallelMesh.

The tests in this commit currently segfault when run in parallel with
ParallelMesh, and are therefore restricted to run with SerialMesh.
For details, see #2125.

Refs #2105.
Refs #2125.

@jwpeterson
Copy link
Member

In c977ec6:

Marking multiapp transfer stuff as serial-only for now.

Refs #2105.
Refs #2126.

@jwpeterson
Copy link
Member

In c1a7def:

Tests using MeshModifiers are restricted to using SerialMesh.
For more information, see #2129.

Refs #2105.
Refs #2129.

@jwpeterson
Copy link
Member

In 01cc5ad:

Modifying the Gmsh test slightly.

It now only tests reading a mesh in Gmsh format and writing it back
out.  Should also work with ParallelMesh enabled.

Refs #2105.

@jwpeterson
Copy link
Member

In a4d80bd:

The mixed-dimension tests are restricted to run with SerialMesh.
For more information, see #2130.

Refs #2105.
Refs #2130.

@jwpeterson
Copy link
Member

In 938e89f:

Make the all_print_pps test run with SerialMesh only.

Apparently just changing the mesh type from SerialMesh to ParallelMesh
is enough to make it do a different number of residual evaluations...

Refs #2105.

jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
It now only tests reading a mesh in Gmsh format and writing it back
out.  Should also work with ParallelMesh enabled.

Refs #2105.

r20845
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
Apparently just changing the mesh type from SerialMesh to ParallelMesh
is enough to make it do a different number of residual evaluations...

Refs #2105.

r20847
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…sh doesn't work if the underlying Mesh is a ParallelMesh.

Refs #2105.

r20849
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
In dbg mode, StripeMesh will trip an assert in libmesh when used with
ParallelMesh.

Refs #2105.

r20851
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…o find the file out.e.1.0, since the number of processors is encoded into the name.

Refs #2105.

r20852
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…, check to see if it starts with a dash first.

Refs #2105.

r20853
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…ork if you try to run them in parallel with ParallelMesh. Therefore, restrict these tests to using SerialMesh.

Refs #2105.

r20854
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…h by using the MeshBase::query_node_ptr() functionality.

Refs #2105.

r20855
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…elMesh.

The MeshBase::query_elem() function never asserts and returns NULL for
non-local elements.  It is the safe way to get Elem pointers whenever
ParallelMesh may be used.

Refs #2105.

r20856
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
The SolutionUserObject uses the copy_nodal_solution() capability of
the Exodus reader, and therefore won't work if the initial mesh has
been renumbered (it will be reunumbered if you are running with
ParallelMesh in parallel).  Hence, we restrict the relevant tests to
run with SerialMesh only.

Refs #2105.

r20857
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
…), which only works with SerialMesh.

Refs #2105.

r20859
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
Be consistent with other string checks in the same file.

Refs #2105.

r20905
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
This function can be used by clients of MooseMesh that are known not
to work with ParallelMesh to throw a uniformly-formatted error in
cases where they are incorrectly used by ParallelMesh.

Adding MooseMesh::errorIfParallelDistribution() to the
NodalVariableValue class; will be adding it to others over time.

Refs #2105.

r21422
jwpeterson pushed a commit that referenced this issue Feb 14, 2014
* StripeMesh
* SideSetsFromPoints
* SideSetsFromNormals
* AddAllSideSetsByNormals
* TiledMesh
* ElementalVariableValue
* SolutionUserObject
* MultiAppNearestNodeTransfer
* MultiAppMeshFunctionTransfer
* MultiAppInterpolationTransfer
* MultiAppUserObjectTransfer

Refs #2105.

Adding distribution=serial to input several input files to avoid triggering the
new error message.

r21452
dschwen pushed a commit to dschwen/moose that referenced this issue Mar 3, 2015
dschwen pushed a commit to dschwen/moose that referenced this issue Mar 3, 2015
bwspenc pushed a commit to bwspenc/moose that referenced this issue Apr 8, 2015
bwspenc pushed a commit to bwspenc/moose that referenced this issue Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework T: task An enhancement to the software.
Projects
None yet
Development

No branches or pull requests

5 participants