MPI on OS X 10.10.x with PGI 15.4. OpenMPI or MPICH.

I’m trying to compile OpenMPI 1.8.4 or MPICH 3.1.3 or 3.1.4 on OS X 10.10.3 with the PGI 15.4 suite but am receiving the following on configuration.

$ ./configure --prefix=

============================================================================
== Configuring Open MPI

*** Startup tests
checking build system type… x86_64-apple-darwin14.3.0
checking host system type… x86_64-apple-darwin14.3.0
checking target system type… x86_64-apple-darwin14.3.0
checking for gcc… pgcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… configure: error: in /Users/mrilee/src/openmpi/openmpi-1.8.4': configure: error: cannot run C compiled programs. If you meant to cross compile, use –host’.
See `config.log’ for more details

And config.log shows things going bad starting with

configure:5989: checking whether we are cross compiling
configure:5997: pgcc -o conftest conftest.c >&5
PGC-S-0040-Illegal use of symbol, __BEGIN_DECLS (/usr/include/stdio.h: 156)
PGC-S-0035-Syntax error: Recovery attempted by replacing identifier __BEGIN_DECLS by ‘;’ (/usr/include/stdio.h: 230)
PGC-W-0156-Type not specified, ‘int’ assumed (/usr/include/stdio.h: 230)
PGC-S-0036-Syntax error: Recovery attempted by inserting keyword typeof before ‘(’ (/usr/include/stdio.h: 242)
PGC-S-0138-Missing identifier for declarator in function prototype definition (/usr/include/stdio.h: 242)
PGC-S-0138-Missing identifier for declarator in function prototype definition (/usr/include/stdio.h: 242)
PGC-S-0040-Illegal use of symbol, __DARWIN_ALIAS_STARTING (/usr/include/stdio.h: 242)
PGC-S-0033-Missing declarator for dummy argument (/usr/include/stdio.h: 242)
PGC-S-0035-Syntax error: Recovery attempted by replacing typedef id __printflike by ‘=’ (/usr/include/stdio.h: 244)

and so on… Setting CPP=cpp doesn’t help.

Any way around or through this?

Hi,

Try rerunning the makelocalrc script, and see if this helps clear up this particular problem. However, there are still some known issues with compiling OpenMPI 1.8.4 on OS X with PGI 15.4. You might have better luck with building MPICH 3.1.4 at this time.

$ sudo /opt/pgi/osx86-64/15.4/bin/makelocalrc -x /opt/pgi/osx86-64/15.4

Hope this helps.

+chris