[MOAB-dev] Exchanging tags with no name

Milad Fatenejad icksa1 at gmail.com
Fri Jan 18 08:36:36 CST 2013


Hello:

Thanks Tim, Iulian.

So, my takeaway from Iulian's comment is that exchange_tags does not
support no-name tags (I think these are called anonymous tags, is that the
correct terminology?).

I have modified PETSc to share memory with MOAB tag data. When PETSc makes
a new vector, a no-name MOAB tag is created under the hood. These
vectors/tags are temporary in that they are created by PETSc and destroyed
by PETSc within PETSc's solvers. However, tag values on shared, non-owned
entities is still needed.

There is not really a natural name to give these tags so leaving them as
no-name makes the most sense. Right now, I have a hacky solution where I
make up an arbitrary name and give it to the tag so that the exchange will
work properly...

So what is the best solution in this case? I could:

1. Give each tag a random, unique name
2. Modify MOAB to support exchange on tags with no name somehow
3. Modify my code so that all of the "tag exchange" happens using PETSc
functionality instead of MOAB functionality...

Milad



On Thu, Jan 17, 2013 at 4:35 PM, Iulian Grindeanu <iulian at mcs.anl.gov>wrote:

> Hello,
> The name of the tag gets "packed" in the communication packet that is
> sent. We should probably error out if a "no name" tag is sent.
> I would not use a no name tag, except a temporary tag in an application,
> and you always keep the tag handle itself (you can pass it around, store as
> a member data, etc)
> I don't think you can recover the "no name" tag handle in a separate
> portion of the code.
>
> Iulian
>
>
>
> ------------------------------
>
> Hello:
>
> I just tried calling exchange_tags on a tag with no name (when I created
> the tag I specified NULL as the first argument to tag_get_handle) and found
> that the tag exchange did not seem to work. After a lot of experimentation,
> I found that whether or not the tag had a name was the factor that
> determined whether the shared, not-owned entities successfully updated...
>
> Two questions:
>
> 1. Does exchange_tags require that the tag have a name specified?
> 2. Am I allowed to pass NULL as the name for tag_get_handle? Or must tags
> have names?
>
> Thank You
> Milad
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20130118/26d193ab/attachment.html>


More information about the moab-dev mailing list