Hi Charles,<div><br></div><div>I know little about the threading inside MPICH at this point and even less about per object builds. Though I intend to now learn more about this, I’m CC’ing the mpich-devel mailing list in an effort to bring in the right people more quickly.</div><div><br></div><div>Wesley<br><br><br><div id="replyBeginsHere"><br><br><br>On Jan 23, 2014, 2:03:48 PM, Archer, Charles J <charles.j.archer@intel.com> wrote:<hr>
<meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 15.12), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" ></o:shapedefaults>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" ></o:idmap>
</o:shapelayout></xml><![endif]-->
<title></title>
<div class="WordSection1">
<p class="MsoNormal">Hi, Wesley, I’m playing around with per-obj
builds, using per-object/tls configure options.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">pamid defined it’s own critical sections so it
doesn’t see this build error, but I’m trying to use default per-obj
builds and I hit this:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">mpiimplthreadpost.h:27: error: static
declaration of 'MPIU_Thread_CS_enter_lockname_impl_' follows
non-static declaration</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">My solution for me was to prototype the
functions in src/include/mpiimplthread.h:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">diff --git a/src/include/mpiimplthread.h
b/src/include/mpiimplthread.h</p>
<p class="MsoNormal">index f0141c6..c9af705 100644</p>
<p class="MsoNormal">--- a/src/include/mpiimplthread.h</p>
<p class="MsoNormal">+++ b/src/include/mpiimplthread.h</p>
<p class="MsoNormal">@@ -1039,5 +1039,20 @@ do
{
\</p>
<p class="MsoNormal">#define MPIU_THREAD_MPI_OBJ_FINALIZE(objptr_)
do {} while (0)</p>
<p class="MsoNormal">#endif</p>
<p class="MsoNormal"></p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+#if 0</p>
<p class="MsoNormal">+static MPIU_DBG_INLINE_KEYWORD void</p>
<p class="MsoNormal">+MPIU_Thread_CS_enter_lockname_impl_(enum
MPIU_Nest_mutexes kind,</p>
<p class="MsoNormal">
+
const char *lockname,</p>
<p class="MsoNormal">
+
MPID_Thread_mutex_t
*mutex);</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+static MPIU_DBG_INLINE_KEYWORD void</p>
<p class="MsoNormal">+MPIU_Thread_CS_exit_lockname_impl_(enum
MPIU_Nest_mutexes kind,</p>
<p class="MsoNormal">
+
const char *lockname,</p>
<p class="MsoNormal">
+
MPID_Thread_mutex_t *mutex);</p>
<p class="MsoNormal">+#endif</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">+</p>
<p class="MsoNormal">#endif /* !defined(MPIIMPLTHREAD_H_INCLUDED)
*/</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">….</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Can you guys add in the prototypes? This
patch isn’t complete, I wanted to talk to you first.</p>
<p class="MsoNormal">Is this the right solution?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Also related (reported by Bill):</p>
<p class="MsoNormal">
https://trac.mpich.org/projects/mpich/ticket/1937</p>
<p class="MsoNormal"> </p>
</div>
</div></div>