Problems compiling OpenMPI 1.6.4 with PGI 13.4

I am having trouble building OpenMPI 1.6.4 with PGI 13.4. The configure test claims that the compiler does not support the offsetof macro. Is that true? Is there a workaround?


checking size of _Bool… 1
checking for inline… inline
checking for C/C++ restrict keyword… __restrict
checking for weak symbol support… yes
checking for functional offsetof macro… no
configure: WARNING: Your compiler does not support offsetof macro
configure: error: Configure: Cannot continue

  • ‘[’ 1 = 0 ‘]’

Hi Ed,

This is a known issue where there’s a compatibility issue with the “stddef.h” header file we ship and GCC 4.6/4.7. We were able to fix the problem in the 13.5 compilers (TPR#19320)

If you can’t download and install 13.5, please send a note to PGI Customer Service ( and they should be able to get you the updated file.

Best Regards,

Tried upgrade to 13.5 but unfortunately we had the same problem with 13.5 while building OpenMPI. The missing offsetof macro. Failed in exactly the same place during configure, with the same message.

I had asked for your fix-up for 13.4 and you had sent it. I looked to see if the same changes to fix 13.4 would also work for 13.5, but there seem to be enough differences to make this approach questionable.

It looks like (TPR#19320) did not fix the problem in our situation. Can you help again?

Thank you,


Hi Ed,

I checked with Dave. Since he knows more about the issue than I, I’ve asked if he can continue helping you via email and why the fix didn’t work for you.

  • Mat


I see the same problem with pgi 13.9 and openmpi 1.6.3 on openSUSE 12.3.
Is there a fix?


I just installed 13.10 from scratch, and untar’d the 1.6.5 OpenMPI stable release download. Latest PGI, latest OpenMPI.
I put the PGI compilers in my $PATH.

export PATH=$PGI/linux86-64/13.10/bin:$PATH

export CC=pgcc
export CXX=pgcpp
export FC=pgfortran
export F77=pgfortran
export CFLAGS=-fast
export CXXFLAGS=-fast
export FCFLAGS=-fast
export FFLAGS=-fast

./configure --prefix=/home/openmpi/64/installation/


make check

make install

and things work.

And then I added the bin directory to mu $PATH and the lib directory to

export PATH=/home/openmpi/64/installation/bin
export LD_LIBRARY_PATH=/home/openmpi/64/installation/lib

mpif90 -o mpihello mpihello.f
mpirun -np 4 mpihello

If you are having problems, see if this works,
and use it as your base build. Change or add one thing at a time, and see
if things fail - much easier to diagnose.


OK, thanks, this recipe worked for me as well… mostly. I notice after the install that the …/bin folder no longer has any symlinks, such that mpicc, mpif90, are missing. I am comparing the folder contents with a build of 1.6.0 from a year or so ago.

Did I miss an install step, do I add theses symlinks myself?


Never mind … I re-did the entire process as root and the symlinks are present. Previously i built as a normal user and installed as root … still hard to believe that made a difference.

In any case PGI 13.10 and OpenMPI 1.6.5 combo works, thanks.