<div class="gmail_quote">On Fri, May 11, 2012 at 1:24 PM, Jeff Squyres <span dir="ltr"><<a href="mailto:jsquyres@cisco.com" target="_blank">jsquyres@cisco.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1i4">Just curious -- what's your use case for this?<br>
<br>
I think the prevailing assumption in the forum was that attributes weren't used much, and attribute set/get performance definitely didn't matter.<br>
<div class="im"></div></div></blockquote></div><br><div>Well, attributes are critical for library interoperability. Libraries would need horrible work-arounds if it didn't exist.</div><div><br></div><div>In this case, we are stashing a "thread communicator" as an attribute, so we access it each time a thread pool is sparked. There is an OpenMP implementation of thread communicator, but also using other threading models and raw pthreads (which is somewhat lower overhead because our model is less synchronous).</div>
<div><br></div><div>The ca. 1000 cycle MPI_Attr_get makes it dominate the overhead to spark threads. A simple-minded cache speeds it up a lot, but it would be cleaner to just use MPI_Attr_get.</div>