<div dir="ltr">On Thu, Mar 21, 2013 at 7:00 PM, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu" target="_blank">mark.adams@columbia.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">No, not intentionally,  we don't touch threads.</div>
</blockquote><div><br></div><div style>I'm not sure, maybe funny business with thread-local storage. Based on the stack trace above and the intent of this code, you can apply this for now.</div><div><br></div><div><div>
diff --git i/src/sys/objects/tagm.c w/src/sys/objects/tagm.c</div><div>index 46e32c1..cc399ab 100644</div><div>--- i/src/sys/objects/tagm.c</div><div>+++ w/src/sys/objects/tagm.c</div><div>@@ -198,9 +198,7 @@ PetscErrorCode  PetscCommDuplicate(MPI_Comm comm_in,MPI_Comm *comm_out,PetscMPII</div>
<div>     ierr = PetscCommGetThreadComm(*comm_out,&tcomm);CHKERRQ(ierr);</div><div>     ierr = PetscThreadCommAttach(*comm_out,tcomm);CHKERRQ(ierr);</div><div>   }</div><div>-  /* Only the main thread updates counter->refcount */</div>
<div>-  ierr = PetscThreadCommGetRank(tcomm,&trank);CHKERRQ(ierr);</div><div>-  if (!trank) counter->refcount++; /* number of references to this comm */</div><div>+  counter->refcount++; /* number of references to this comm */</div>
<div>   PetscFunctionReturn(0);</div><div> }</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div class="h5"><div><br><div><div>On Mar 21, 2013, at 7:45 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>> wrote:</div><br><blockquote type="cite">
<div dir="ltr">Did you enable threadcomm? I better finish this work I started and get my branch out there...</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 6:42 PM, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu" target="_blank">mark.adams@columbia.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'm getting segv in at the end of runs on the Cray XC30.  in optimized builds it segv with a stack like<br>

<br>
PetscFinalize<br>
PetscViewerASCIIGetStdout<br>
PetscCommDuplicate<br>
PetscThreadCommGetRank<br>
<br>
In debug builds it does not segv but there are a bunch of un freeded memory in ThreadComm stuff.<br>
<span><font color="#888888"><br>
Mark</font></span></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>