[MOAB-dev] Fwd: question about reduce_tags behavior

Lorenzo Alessio Botti ihabiamx at yahoo.it
Fri May 4 11:27:35 CDT 2012


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)

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> 
>> To: Tim Tautges <tautges at mcs.anl.gov>,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...
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20120504/22850a08/attachment.htm>


More information about the moab-dev mailing list