mpiexec 0.82 and PGI 5.2 : task.c errors!!!

Pete Wyckoff pw at osc.edu
Wed Jan 31 09:09:31 EST 2007


spiga.filippo at gmail.com wrote on Wed, 31 Jan 2007 08:35 +0100:
> In the list.c file i don't find the string "#ifdef _CRAYC" ... Is wrong my
> file? o.O

Oops, I was referring to changes that came out after the 0.82
release.  Here is a small patch that should make things clear:

Index: list.h
===================================================================
--- list.h	(revision 394)
+++ list.h	(revision 396)
@@ -33,9 +33,15 @@ struct list_head {
  * @member:	the name of the member within the struct.
  *
  */
+#if defined(_CRAYC) || defined(__PGI)
+/* HACK, since cray compiler does not have typeof(), use the fact that
+ * struct list_head happens to be first in every type to work around it */
+#define container_of(ptr, type, member) ((void *) ptr)
+#else
 #define container_of(ptr, type, member) ({			\
         typeof( ((type *)0)->member ) *__mptr = (ptr);	\
         (type *)(unsigned long)((char *)__mptr - offsetof(type,member));})
+#endif
 
 /* noop */
 static inline void prefetch(const void *x ATTR_UNUSED) {;}


If you run into problems later, this might be necessary too.  You
don't need to apply this one unless it complains about __func__ or
inline being undefined:

Index: util.h
===================================================================
--- util.h	(revision 394)
+++ util.h	(revision 396)
@@ -38,7 +38,7 @@
 
 /* Nor is the native Irix MIPS C compiler.  It also does not
  * understand "inline".  */
-#if defined(__sgi) && defined(__host_mips) && !defined(__GNUC__)
+#if (defined(__sgi) && defined(__host_mips) && !defined(__GNUC__)) || defined(_CRAYC) || defined(__PGI)
 #  define __func__ __FILE__
 #  define inline __inline
 #endif

> >But compiling with anything other than gcc is probably not worth the
> >effort.  There isn't much of anything that is performance critical
> >in mpiexec, so using a specialized compiler like PGI won't show any
> >improvment.
> 
> I try to use mpiexec compiled with GNU compiler and other software compiled
> with mpicc (MPICH 1.2.7 built with PGI compiler). If all works well I leave
> mpiexec compiled with GNU..

It will work fine with gcc, and that's probably your best bet.

		-- Pete


More information about the mpiexec mailing list