[MOAB-dev] question about reduce_tags behavior
Lorenzo Alessio Botti
ihabiamx at yahoo.it
Fri May 11 11:33:48 CDT 2012
Dear Tim,
thanks a lot. It works very well now.
However, plugging it in SpaFEDTe I noticed that, clearly, I have to call resolve_shared_ents before deleting and recreating the GLOBAL_ID tag.
So I'm wondering if I have the possibility to create (in parallel) a field of global ids at the vertices in order to call resolve_shared_ents only afterwards.
I've tried with assign_global_ids but had no success.
This would also be required when reading a mesh without vertex ids so I guess that there is a way to do it.
Thanks again, MOAB is great!
Lorenzo
On May 10, 2012, at 7:36 PM, Tim Tautges wrote:
>
>
> On 05/04/2012 11:27 AM, Lorenzo Alessio Botti wrote:
>> I don't know if it's a bug or if I initially misunderstood the behavior of reduce_tags
>>
>> Know it works as follows
>>
>> pcomm->reduce_tags(gid_tag_vec, gid_tag_vec, MPI_SUM, sharedFaces);
>> provides in gid_tag_vec the sum of the tag values on shared faces, so it sums the value of the tag on the owned and on
>> the not_owned entity. This is what I need in my code.
>>
>> pcomm->reduce_tags(gid_tag_vec, gid_sum_tag_vec, MPI_OP_NULL, sharedFaces);
>> provides in gid_sum_tag_vec the values of gid_tag_vec on the owned ents, so this call replicates the behavior of
>> exchange_tags
>>
>> pcomm->reduce_tags(gid_tag_vec, gid_sum_tag_vec, MPI_SUM, sharedFaces);
>> provides in gid_sum_tag_vec the sum of the gid_tag on the owned entity and the gid_sum_tag on the actual process
>> (independently of the pstatus)
>>
>
> This should be fixed now, in R5514. In an unusual burst of discipline, I also added a test case for it (made debugging easier, besides just being A Good Idea). Lemme know if it doesn't appear fixed for you, and thanks for the bug report.
>
> - tim
>
>> Is this the expected behavior?
>>
>> Thanks
>> Lorenzo
>>
>>>
>>> On May 4, 2012, at 5:46 PM, Tautges wrote:
>>>
>>>> If I read your message right, it's a bug with when you want the result in a different tag? Will fix this soon, should
>>>> be easy.
>>>>
>>>> On your msg about mbzoltan, the fix is much appreciated, we'll definitely get that in the code base. Dont know yet
>>>> about the option string, haven't looked at code yet.
>>>>
>>>> - tim
>>>>
>>>> (Sent from an Androd that dosnt autocorect as wel as an ipone)
>>>>
>>>>
>>>>
>>>> -------- Original message --------
>>>> Subject: Re: question about reduce_tags behavior
>>>> From: Lorenzo Alessio Botti <ihabiamx at yahoo.it <mailto:ihabiamx at yahoo.it>>
>>>> To: Tim Tautges <tautges at mcs.anl.gov <mailto:tautges at mcs.anl.gov>>,MOAB-dev at mcs.anl.gov <mailto:MOAB-dev at mcs.anl.gov>
>>>> CC:
>>>>
>>>>
>>>> Hi Tim,
>>>> I've found the bug in my code...
>>>> To get the sum of a tag on shared entities I need to call
>>>>
>>>> pcomm->reduce_tags(gid_tag_vec, gid_tag_vec, MPI_SUM, sharedFaces);
>>>> and not
>>>> pcomm->reduce_tags(gid_tag_vec, gid_sum_tag_vec, MPI_SUM, sharedFaces);
>>>>
>>>> Here is the new version, now it works...
>>>>
>>>
>>
>
> --
> ================================================================
> "You will keep in perfect peace him whose mind is
> steadfast, because he trusts in you." Isaiah 26:3
>
> Tim Tautges Argonne National Laboratory
> (tautges at mcs.anl.gov) (telecommuting from UW-Madison)
> phone (gvoice): (608) 354-1459 1500 Engineering Dr.
> fax: (608) 263-4499 Madison, WI 53706
>
More information about the moab-dev
mailing list