[mpich-devel] MPICH per-obj build issues

Archer, Charles J charles.j.archer at intel.com
Thu Jan 23 15:13:18 CST 2014

Ok.  The patch isn’t quite right, I’m going through all the thread options to test my current patch.
You definitely need to protect the prototypes with (my first patch will break the single thread build):



From: Wesley Bland [mailto:wbland at mcs.anl.gov]
Sent: Thursday, January 23, 2014 12:44 PM
To: Archer, Charles J
Cc: Pavan Balaji; William Gropp; devel at mpich.org
Subject: Re: MPICH per-obj build issues

Hi Charles,

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.


On Jan 23, 2014, 2:03:48 PM, Archer, Charles J <charles.j.archer at intel.com<mailto:charles.j.archer at intel.com>> wrote:
Hi, Wesley, I’m playing around with per-obj builds, using per-object/tls configure options.

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:

mpiimplthreadpost.h:27: error: static declaration of 'MPIU_Thread_CS_enter_lockname_impl_' follows non-static declaration

My solution for me was to prototype the functions in  src/include/mpiimplthread.h:

diff --git a/src/include/mpiimplthread.h b/src/include/mpiimplthread.h
index f0141c6..c9af705 100644
--- a/src/include/mpiimplthread.h
+++ b/src/include/mpiimplthread.h
@@ -1039,5 +1039,20 @@ do {                                           \
#define MPIU_THREAD_MPI_OBJ_FINALIZE(objptr_) do {} while (0)
+#if 0
+MPIU_Thread_CS_enter_lockname_impl_(enum MPIU_Nest_mutexes kind,
+                                    const char *lockname,
+                                    MPID_Thread_mutex_t *mutex);
+MPIU_Thread_CS_exit_lockname_impl_(enum MPIU_Nest_mutexes kind,
+                                   const char *lockname,
+                                   MPID_Thread_mutex_t *mutex);
#endif /* !defined(MPIIMPLTHREAD_H_INCLUDED) */


Can you guys add in the prototypes?  This patch isn’t complete, I wanted to talk to you first.
Is this the right solution?

Also related (reported by Bill):

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20140123/e7a82a80/attachment-0001.html>

More information about the devel mailing list