Having trouble to build OpenMPI 1.4.3 with PGI 10.3 on OS/X

I’m having trouble in building OpenMPI 1.4.3 with PGI 10.3 on Mac OS/X.

The configure command:

env CC=pgcc FC=pgfortran F77=pgfortran CXX=pgcpp ./configure --prefix=/usr/local/openmpi

It failed in configure session. The config.log showed

configure:52330: checking to see if F90 compiler likes the C++ exception flags
configure:52336: result: skipped (no C++ exceptions flags)
configure:52421: checking for Fortran 90 compiler module include flag
configure:52447: pgfortran   -c conftest-module.f90
configure:52454: $? = 0
configure:52493: pgfortran   conftest.f90 -Isubdir
Undefined symbols:
  "_ompi_mod_flag_", referenced from:
      .C1_283 in conftest.o
ld: symbol(s) not found
configure:52500: $? = 2
configure:52493: pgfortran   conftest.f90 -psubdir
pgfortran-Error-Unknown switch: -psubdir
configure:52500: $? = 1
configure:52493: pgfortran   conftest.f90 -Msubdir
pgfortran-Error-Unknown switch: -Msubdir
configure:52500: $? = 1
configure:52518: result:
configure:52523: WARNING: *** Could not determine the f90 compiler flag to indicate where modules reside
configure:52525: error: *** Cannot continue

I also tried following

  1. Using pgf90 instead of pgfortran add FCFLAGS=-noswitcherror
  2. –disable-mpi-cxx
  3. –enable-cxx-exceptions

None of them work

If I configured with --disable-mpi-f90, there is no problem for configure session. But failed in building

Making all in tools/orte-clean
source='orte-clean.c' object='orte-clean.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ../../../config/depcomp \
        pgcc -DHAVE_CONFIG_H -I. -I../../../opal/include -I../../../orte/include -I../../../ompi/include -I../../../opal/mca/paffinity/linux/plpa/src/libplpa   -I../../..  -D_REENTRANT  -O -DNDEBUG   -c -o orte-clean.o orte-clean.c
/bin/sh ../../../libtool --tag=CC   --mode=link pgcc  -O -DNDEBUG    -export-dynamic   -o orte-clean orte-clean.o ../../../orte/libopen-rte.la -lutil
libtool: link: pgcc -O -DNDEBUG -o orte-clean orte-clean.o  ../../../orte/.libs/libopen-rte.a /users/jliu/Downloads/openmpi-1.4.3/opal/.libs/libopen-pal.a -lutil
Undefined symbols:
  "_orte_odls", referenced from:
      _orte_errmgr_base_error_abort in libopen-rte.a(errmgr_base_fns.o)
ld: symbol(s) not found
make[2]: *** [orte-clean] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

any ideas?

Thanks

Jerry

Hi Jerry,

Mind trying a later compiler? I don’t recall the specifics, but I think there was a problem with compiling OpenMPI on MacOSX using 10.3 that was addressed in 10.4.

Thanks,
Mat

Thanks for reply.

I’m sorry, only pgi 8.0-4 and 10.3 are available on Mac OS/X. I tried 8.0-4, it complained 'Redefinition of symbol, _OSSwapInt16 ’

Making all in mca/paffinity/darwin
source='paffinity_darwin_component.c' object='paffinity_darwin_component.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ../../../../config/depcomp \
        /bin/sh ../../../../libtool --tag=CC   --mode=compile pgcc -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa   -I../../../..  -D_REENTRANT  -O -DNDEBUG   -c -o paffinity_darwin_component.lo paffinity_darwin_component.c
libtool: compile:  pgcc -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../../.. -D_REENTRANT -O -DNDEBUG -c paffinity_darwin_component.c -o paffinity_darwin_component.o
source='paffinity_darwin_module.c' object='paffinity_darwin_module.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ../../../../config/depcomp \
        /bin/sh ../../../../libtool --tag=CC   --mode=compile pgcc -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa   -I../../../..  -D_REENTRANT  -O -DNDEBUG   -c -o paffinity_darwin_module.lo paffinity_darwin_module.c
libtool: compile:  pgcc -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../../.. -D_REENTRANT -O -DNDEBUG -c paffinity_darwin_module.c -o paffinity_darwin_module.o
PGC-F-0043-Redefinition of symbol, _OSSwapInt16 (/usr/include/libkern/machine/OSByteOrder.h: 51)
PGC/x86-64 OSX 8.0-4: compilation aborted
make[2]: *** [paffinity_darwin_module.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Is there a workaround for that?

Thanks

Jerry

I’m sorry, only pgi 8.0-4 and 10.3 are available on Mac OS/X.

Due to license constraints? If so, then we can fix that issue. Just send a note to PGI Sales (sales@pgroup.com) and ask them to talk with me about getting you an updated license. I’ll need your PGI PIN number.

  • Mat