MPICH 3.1 compiling

Hi Mat,

I’m trying to install mpich with PGI v14.1. The PGI was installed successfully (I think), but when I try to compile the mpich, it appears several errors.

I’m not using mpich included in PGI.

I exported the following environment variables:

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

Appearing many errors:

PGC-F-0206-Can’t find include file ac_nonexistent.h (conftest.c: 9)
PGC/x86-64 Linux 14.1-0: compilation aborted

PGC-F-0206-Can’t find include file opa_primitives.h (conftest.c: 28)
PGC/x86-64 Linux 14.1-0: compilation aborted

PGC-S-0035-Syntax error: Recovery attempted by replacing identifier a by ‘(’ (conftest.c: 54)
PGC-S-0035-Syntax error: Recovery attempted by replacing identifier capable by ‘,’ (conftest.c: 54)
PGC-S-0036-Syntax error: Recovery attempted by inserting ‘)’ before keyword typedef (conftest.c: 56)
PGC-W-0156-Type not specified, ‘int’ assumed (conftest.c: 56)
PGC-S-0070-dummy is not a dummy argument (conftest.c: 56)
PGC-F-0034-Unrecoverable syntax error reading END (conftest.c: 56)
PGC/x86-64 Linux 14.1-0: compilation aborted

PGC-F-0206-Can’t find include file sys/sockio.h (conftest.c: 276)
PGC/x86-64 Linux 14.1-0: compilation aborted

configure:32988: checking whether available
configure:33007: pgcpp -c -fast -I/share/apps/source/mpich-3.1/src/mpl/include -I/share/apps/source/mpich-3.1/src/mpl/include -I/share/apps/source/mpich-3.1/src/openpa/src -I/share/apps/source/mpich-3.1/src/openpa/src -I/share/apps/source/mpich-3.1/src/mpi/romio/include conftest.cpp >&5
“conftest.cpp”, line 50: catastrophic error: cannot open source file “math”
#include
^

1 catastrophic error detected in the compilation of “conftest.cpp”.
Compilation terminated.
configure:33007: $? = 2
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME “MPICH”
| #define PACKAGE_TARNAME “mpich”
| #define PACKAGE_VERSION “3.1”
| #define PACKAGE_STRING “MPICH 3.1”
| #define PACKAGE_BUGREPORT “discuss@mpich.org
| #define PACKAGE_URL “http://www.mpich.org/
| #define PACKAGE “mpich”
| #define VERSION “3.1”
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR “.libs/”
| #define HAVE_GETPAGESIZE 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL
| #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG_ALL
| #define USE_LOGGING MPID_LOGGING_NONE
| #define MPICH_THREAD_LEVEL MPI_THREAD_MULTIPLE
| #define MPIU_THREAD_GRANULARITY MPIU_THREAD_GRANULARITY_GLOBAL
| #define MPIU_HANDLE_ALLOCATION_METHOD MPIU_HANDLE_ALLOCATION_MUTEX
| #define MPIU_THREAD_REFCOUNT MPIU_REFCOUNT_NONE
| #define HAVE_ROMIO 1
| #define HAVE__FUNC__ //
| #define HAVE__FUNCTION__ /
/
| #define HAVE_PRAGMA_WEAK 1
| #define USE_WEAK_SYMBOLS 1
| #define HAVE_MULTIPLE_PRAGMA_WEAK 1
| #define ENABLE_PVAR_NEM 0
| #define ENABLE_PVAR_RECVQ 0
| #define ENABLE_PVAR_RMA 0
| #define HAVE_LONG_LONG 1
| #define STDCALL
| #define F77_NAME_LOWER_USCORE 1
| #define HAVE_MPI_F_INIT_WORKS_WITH_C 1
| #define HAVE_FORTRAN_BINDING 1
| #define HAVE_CXX_EXCEPTIONS //
| #define HAVE_NAMESPACES /
/
| #define HAVE_NAMESPACE_STD /**/
| /
end confdefs.h. */
|
| #include
|
| int
| main ()
| {
| using namespace std;
| ;
| return 0;
| }

Syntax error: Recovery attempted by replacing identifier big by ‘!=’ (conftest.c: 60)
PGC-S-0039-Use of undeclared variable not (conftest.c: 63)
PGC-S-0039-Use of undeclared variable endian (conftest.c: 63)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0047-Array dimension less than or equal to zero (conftest.c: 125)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0036-Syntax error: Recovery attempted by inserting identifier .Z0000 before ‘)’ (conftest.c: 137)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0040-Illegal use of symbol, size_t (conftest.c: 186)
PGC/x86-64 Linux 14.1-0: compilation completed with severe

PGC-S-0040-Illegal use of symbol, __thread (conftest.c: 185)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0040-Illegal use of symbol, choke (conftest.c: 14)
PGC-W-0156-Type not specified, ‘int’ assumed (conftest.c: 14)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0039-Use of undeclared variable FUNC (conftest.c: 40)
PGC-W-0095-Type cast required for this conversion (conftest.c: 40)
PGC-W-0155-Pointer value created from a nonlong integral type (conftest.c: 40)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors

PGC-S-0035-Syntax error: Recovery attempted by replacing identifier big by ‘!=’ (conftest.c: 60)
PGC-S-0039-Use of undeclared variable not (conftest.c: 63)
PGC-S-0039-Use of undeclared variable endian (conftest.c: 63)
PGC/x86-64 Linux 14.1-0: compilation completed with severe errors
configure:34989: $? = 2


I separated some errors that appeared during my compilation.

I do not know if these messages will hinder system performance.


Thanks!!!

Pedro Ivo Diogenis
Environmental Engineer

Hi Pedro,

I’ve passed this off to another engineer here who handles all of our MPI builds. He’s built MPICH 3.0.4 but hadn’t looked at MPICH 3.1 as of yet.

He was able to work around this particular issue by setting “CPP=cpp”. You’ll also need to set “LD=ld”. Though, he’s hitting some other configuration issue now.

I’ll update this post once he’s worked through them.

  • Mat

Hi Mat,

I exported the variables that you asked, but the same error messages remain in log.

I will try to compile mpich v3.0.4.

Best regards,
Pedro Ivo
Environmental Engineer

I ran mpich-3.0.4 configure and the error messages remain.

Do you know what is mpich version runs no problem?

My PGI version is 14.1.

Thanks!
Pedro Ivo
Environmental Engineer

Here’s the configure command Chris uses here. He tested it using PGI 14.1 on both MPICH 3.1 and 3.0.4.

CC=pgcc CXX=pgcpp FC=pgfortran F77=pgf77 CFLAGS='-fast' FFLAGS='-fast' CXXFLAGS='-fast' F77FLAGS='-fast' LD=ld CPP=cpp ./configure --enable-static --prefix=/scratch/cparrott/mpich --with-device=ch3:sock --with-thread-package=posix --with-pm=hydra --enable-shared --enable-debuginfo
  • Mat

Hi Matt,

Thanks for your help!

My configuration was causing compilation errors in the WRF3.4.1 too. I tried your suggestion for MPICH and I managed to compile the WRF.

But same MPICH errors keep appearing on config.log.

I changed MPICH configuration for --with-device=ch3:nemesis and I did not enable posix. For this modification, the WRF was also compiled.

Maybe, the modification FC=pgfortran instead of FC=pgf90 has resolved my problem.

The MPICH errors keep appearing, but they did not affect the MPI implementation.

Thanks!!

Pedro Ivo
Environmental Engineer

Maybe, the modification FC=pgfortran instead of FC=pgf90 has resolved my problem

“pgfortran” and “pgf90” are the same compiler driver, just with a different name. We wanted to move away from the Fortran standard in our driver name since pgf90 supports F2003. The exception is pgf77, which is strictly F77.

However, the “configure” script could be using pattern match on the compiler name to determine which flags to use. Though, I’m not sure.

  • Mat