[MOAB-dev] ghost exchange with triangles?
Grindeanu, Iulian R.
iulian at mcs.anl.gov
Mon Nov 12 23:31:03 CST 2018
Hi Ryan,
Sorry, I missed again your messages
you are exchanging the tags only on elements (you call merr = pcomm->exchange_tags(tags, tags, range_ent);), while there are 4 tags active, in the list, globalid, owner, orig_pos and elem coords;
there are some elements for which the tag does not exist (for example edges)
Also, global id for vertices is not updated, because you exchange tags only on elements; you should exchange on vertices too
something like
Range verts;
merr=mb->get_entities_by_dimension(0,0,verts);
pcomm->exchange_tags(mbmesh->gid_tag, verts);
what tags are not updated? there are some edges too created automatically by moab (it helps in resolving shared ents and ghosting; on them there is no tag defined, but vtk writer for moab will write default values for them)
also, you are calling resolve shared ents twice (once inside MBMesh_addelements), and once in main program;
Also, you are creating 2 parallel comms ; you need only one
if you resolve inside MBMesh_addelements, you can retrieve that parallel comm with something like
//! get the indexed pcomm object from the interface
static ParallelComm *get_pcomm(Interface *impl, const int index);
(pass index 0, it will the one created inside MBMesh_addelements)
you can then call ghosting routines
Again, after I run your model, what tags are missing in ghost files?
Iulian
________________________________________
From: Ryan O'Kuinghttons <ryan.okuinghttons at noaa.gov>
Sent: Monday, November 12, 2018 10:45:21 AM
To: Grindeanu, Iulian R.; moab-dev at mcs.anl.gov
Subject: Re: ghost exchange with triangles?
Hi Iulian,
After looking into this further I realize that the issue has nothing to
do with meshes composed of triangles, I do actually get the same issue
with quadrilaterals (my previous mail said that quads were working). In
fact, I even see the same issue with the last test case we were
debugging. The difference between now and then is that the previous test
case was only calling exchange_tags with the elem_coords tag (as a
minimal reproducer), which now works in both versions. Now I am seeing
that every other tag on this test mesh is not being updated by the
exchange_tags call, even though the debug code says that they are:
1 ParallelComm(0.04 s) Unpacking tag GLOBAL_ID
1 ParallelComm(0.04 s) Unpacking tag orig_pos
1 ParallelComm(0.04 s) Unpacking tag owner
1 ParallelComm(0.04 s) Done unpacking tags.
The only difference I can see between the elem_coords and the GLOBAL_ID
or owner tags is that elem_coords is initialized as a double, and the
others are integers. Is there some reason that a call like the following
would not work with exchange_tags?
int int_def_val = 0;
merr=moab_mesh->tag_get_handle(GLOBAL_ID_TAG_NAME, 1, MB_TYPE_INTEGER,
mbmp->gid_tag, MB_TAG_DENSE, &int_def_val);
Ryan
On 11/9/18 10:56, Ryan O'Kuinghttons wrote:
> Hi Iulian, I ran into an issue with the ghost element exchange this
> week. I'm using a small test mesh with one quadrilateral, two
> triangles and two pentagon/hexagons that are broken down into
> triangles. The ghost exchange seems to work, but the tag exchange does
> not. I modified the test we were using before, if you want to have a
> look. When I plot the mesh after the exchange_tags call I see 0s at
> the the node and element ids locations, which is strange because this
> works just fine with a mesh of quadrilaterals. The test is on the
> moab4 branch, at
> esmf/src/Infrastructure/Mesh/tests/ESMC_MeshMOABGhostUTest. You should
> call 'make distclean' before rebuilding esmf, then just "make" in test
> directory and you can run it with:
>
> mpirun -np 4 $ESMF_DIR/tests/*/*/ESMC_MeshMOABGhostUTest
>
> I am traveling today, and I will be in and out most of the day, but
> will check email when I can. I have a feeling this is another issue
> with how we are setting the tags, but hopefully it's a quick fix.
> Thanks again,
>
More information about the moab-dev
mailing list