On Mon, 2009-04-13 at 16:48 -0600, Orion Poplawski wrote:
> Seeing the following building openmpi 1.3.1 on CentOS 5.3 with PGI pgf90 
> 8.0-5 fortran compiler:
> checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes
> checking for PTHREAD_MUTEX_ERRORCHECK... yes
> checking for working POSIX threads package... no

> Is there any way to get the PGI Fortran compiler to support threads for 
> openmpi?

I recommend adding the attached pthread.h into pgi's internal include
dir.
The pthread.h in newer distros is VERY VERY GCC-centric and when using
any other compiler it very often fails to do the "right" thing.

This pthread.h sets needed GCC-isms before parsing the real pthread.h.

At least we haven't had any problems with getting openmpi and pgi to
work correctly together since.
(I found this problem when building openmpi 1.2.something)

-- 
Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden
Internet: a...@hpc2n.umu.se   Phone: +46 90 7866134 Fax: +46 90 7866126
Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se
#if ! defined(__builtin_expect)
# define __builtin_expect(expr, expected) (expr)
#endif

#if ! defined(__USE_GNU)
#define __USE_GNU
#define __PGI_USE_GNU
#endif

#if ! defined(__GNUC__)
#define __GNUC__ 2
#define __PGI_GNUC
#endif

#include_next<pthread.h>

#if defined(__PGI_USE_GNU)
#undef __USE_GNU
#endif

#if defined(__PGI_GNUC)
#undef __GNUC__
#endif

Reply via email to