Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Open MPI unable to find threading support for PGI or Sun Studio
From: Mark Dixon (m.c.dixon_at_[hidden])
Date: 2008-07-29 06:52:48


On Mon, 28 Jul 2008, Jeff Squyres wrote:

> FWIW: I compile with PGI 7.1.4 regularly on RHEL4U4 and don't see this
> problem. It would be interesting to see the config.log's from these builds
> to see the actual details of what went wrong.

Thanks Jeff: it's good to know it's just me ;)

Following your message, I've tried building with PGI on a few systems:

Compiler OS Result
============ =================== ============
32-bit 7.1.6 CentOS 5.2 (32-bit) no threading
32-bit 7.1.4 CentOS 5.2 (32-bit) no threading **config.log attached**
32-bit 7.1.4 RHEL4u6 (64-bit) works!
32-bit 7.1.4 CentOS 5.1 (64-bit) no threading

Each time it fails, it's because of "__builtin_expect" being undefined for
pgcc and pgf77 (works for pgcpp) - or any of the Sun Studio compilers.
Could this be a glibc 2.3 (RHEL4) vs. 2.5 (CentOS5) issue?

I've attached just the PGI config.log for now (I don't want to blow the
100Kb posting limit), but the relevant sections from each appear to be:

PGI:

   configure:49065: checking if C compiler and POSIX threads work with -lpthread
   configure:49121: pgcc -o conftest -O -DNDEBUG -D_REENTRANT conftest.c -lnsl -lutil -lpthread >&5
   conftest.c:
   conftest.o: In function `main':
   conftest.c:(.text+0x98): undefined reference to `__builtin_expect'

   configure:49272: checking if C++ compiler and POSIX threads work with -lpthread
   configure:49328: pgcpp -o conftest -O -DNDEBUG conftest.cpp -lnsl -lutil -lpthread >&5
   conftest.cpp:
   (skipped some non-fatal warning messages here)

   configure:49572: checking if F77 compiler and POSIX threads work with -lpthread
   configure:49654: pgcc -O -DNDEBUG -I. -c conftest.c
   configure:49661: $? = 0
   configure:49671: pgf77 conftestf.f conftest.o -o conftest -lnsl -lutil -lpthread
   conftestf.f:
   conftest.o: In function `pthreadtest_':
   conftest.c:(.text+0x92): undefined reference to `__builtin_expect'

Sun:

   configure:49065: checking if C compiler and POSIX threads work with -lpthread
   configure:49121: cc -o conftest -O -DNDEBUG -D_REENTRANT conftest.c -lnsl -lutil -lm -lpthread >&5
   "conftest.c", line 305: warning: can not set non-default alignment for automatic variable
   "conftest.c", line 305: warning: implicit function declaration: __builtin_expect
   conftest.o: In function `main':
   conftest.c:(.text+0x35): undefined reference to `__builtin_expect'

   configure:49272: checking if C++ compiler and POSIX threads work with -lpthread
   configure:49328: CC -o conftest -O -DNDEBUG conftest.cpp -lnsl -lutil -lm -lpthread >&5
   "conftest.cpp", line 305: Error: The function "__builtin_expect" must have a prototype.
   1 Error(s) detected.

   configure:49572: checking if F77 compiler and POSIX threads work with -lpthread
   configure:49654: cc -O -DNDEBUG -I. -c conftest.c
   "conftest.c", line 15: warning: can not set non-default alignment for automatic variable
   "conftest.c", line 15: warning: implicit function declaration: __builtin_expect
   configure:49661: $? = 0
   configure:49671: f77 conftestf.f conftest.o -o conftest -lnsl -lutil -lm -lpthread
   NOTICE: Invoking /apps/compilers/sunstudio/12_200709/1/sunstudio12/bin/f90 -f77 -ftrap=%none conftestf.f conftest.o -o conftest -lnsl -lutil -lm -lpthread
   conftestf.f:
    MAIN fpthread:
   conftest.o: In function `pthreadtest_':
   conftest.c:(.text+0x41): undefined reference to `__builtin_expect'

Any ideas?

Cheers,

Mark

-- 
-----------------------------------------------------------------
Mark Dixon                       Email    : m.c.dixon_at_[hidden]
HPC/Grid Systems Support         Tel (int): 35429
Information Systems Services     Tel (ext): +44(0)113 343 5429
University of Leeds, LS2 9JT, UK
-----------------------------------------------------------------