[Q] openmpi configure with pgi 10.0

Hi, we are trying to install openmpi 1.3.3 with pgi 10.0 at linux as
“./configure CC=pgcc CXX=pgCC F77=pgf77 FC=pgf90 --with-sge”
but the configure failed with following error message:

checking for functional offsetof macro… no
configure: WARNING: Your compiler does not support offsetof macro
configure: error: Configure: Cannot continue

I found that pgcc cannot compile the following test code from the “configure”

#include<stddef.h>
int
main ()
{
struct foo {int a, b;}; size_t offset = offsetof(struct foo, b);
;
return 0;
}

$ pgcc test.c
PGC-S-0037-Syntax error: Recovery attempted by deleting keyword struct (test.c: 5)
PGC-S-0039-Use of undeclared variable foo (test.c: 5)
PGC-S-0039-Use of undeclared variable b (test.c: 5)
PGC/x86-64 Linux 10.0-0: compilation completed with severe errors

But pgcc 9.x and gcc can compile without any warning/error. Is there any way to enforce pgcc to compile? Or is it just a bug? Any comment will be appreciated.

Hi NielsGronbech-Jensen88064,

There’s an error in openMPI’s configure script where it’s testing for the PGI version using only the the first digit. It other words, the script thinks this is version “1” not “10”. The openMPI team is aware of the issue and has fixed it, however, I don’t know if the fix has been released.

Once I’m back in the office tommorrow (I’m at SC09), I’ll post a work around.

Thanks,
Mat

poke… I’m running into this bug too. I don’t see any obvious differences in the configure script in the latest nightly build. Are you sure the OMPI folks are aware of this bug? I also don’t see any discussion on the openmpi-devel or openmpi-users lists about this problem. I’ve also tried the latest config.guess (dated 11/19/2009), still barfs.

Thanks for the poke.

You’ll need to update the top level configure as well as the “./ompi/contrib/vt/vt/extlib/otf/configure” file to include a case for the PGI 10.0 compilers:

         pgCC* | pgcpp*)
           # Portland Group C++ compiler
           case `$CC -V` in
           *pgCC\ [10]* | *pgcpp\ [10]*)
             archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
           ;;
           *pgCC\ [1-5]* | *pgcpp\ [1-5]*)

I’m positive that the OpenMPI team is aware of the issue (I personally talked with Jeff Squyres about it last Monday night at SC09). Jeff doesn’t own the configure scripts but was working with the team that does. I don’t know exactly when they will update the OpenMPI repository with the fix.

  • Mat

FWIW: I just replied about this subject on the Open MPI user’s mailing list:

http://www.open-mpi.org/community/lists/users/2009/11/11277.php