<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 3, 2015 at 2:06 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">   The "global" data contains function pointers which can't be trivially shipped around.<span class=""><br></span></blockquote><div><br></div><div>You don't need to copy the function itself, just the pointer, because the binary is the same, and (I believe) AMPI requires this binary to be loaded in the same virtual address space in all physical processors.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>   The "global" data we are talking about  is essentially read only once it is initialized in PetscInitialize() <span style="color:rgb(136,136,136)"> </span></blockquote><div> </div><div>Even though, "global" date is read-only, you'd have to make sure that the MPI rank (inside a thread) access its appropriate copy when it is running. Again, TLS may do the trick.</div><div><br></div><div>Eduardo</div></div></div></div>