Issue compiling PNetcdf 1.6.1 with Intel MPI 4.1.3.049, SEEK_SET already defined

Craig Tierney - NOAA Affiliate craig.tierney at noaa.gov
Wed Jun 10 14:40:29 CDT 2015


Hello,

I am trying to build PNetcdf 1.6.1 against Intel MPI 4.1.3.049.  I
configure the build as:

export MPIF90=mpiifort
export MPIF77=mpiifort
export MPICC=mpiicc
export MPICXX=mpiicpc

make distclean
./configure --prefix=/home/Craig.Tierney/apps/pnetcdf/1.6.1-intel5-impi4

When I run make, I get the errors below. The error is being thrown inside
of mpi.h.  Google searches indicate that this is caused by a conflict
between settings in stdio.h/iostream and mpi.h.  The 5.0.3.048 version of
Intel MPI handles this situation smarter.   There are enough people using
PNetcdf, I would assume someone has solved this already.

Are there known workarounds for this issue?

Thanks,
Craig

Compiler Output:

make[2]: Entering directory
`/misc/whome/Craig.Tierney/software/parallel-netcdf-1.6.1/src/libcxx'
/home/Craig.Tierney/apps/impi/4.1.3.049/intel64/bin/mpiicpc -c -g -O2 -I.
-I. -I../lib -DHAVE_CONFIG_H  ncmpiType.cpp
In file included from /home/Craig.Tierney/apps/impi/
4.1.3.049/intel64/include/mpi.h(1279),
                 from ../lib/pnetcdf.h(10),
                 from ncmpiType.h(2),
                 from ncmpiType.cpp(2):
/home/Craig.Tierney/apps/impi/4.1.3.049/intel64/include/mpicxx.h(95):
error: #error directive: "SEEK_SET is #defined but must not be for the C++
binding of MPI. Include mpi.h before stdio.h"
  #error "SEEK_SET is #defined but must not be for the C++ binding of MPI.
Include mpi.h before stdio.h"
   ^

In file included from /home/Craig.Tierney/apps/impi/
4.1.3.049/intel64/include/mpi.h(1279),
                 from ../lib/pnetcdf.h(10),
                 from ncmpiType.h(2),
                 from ncmpiType.cpp(2):
/home/Craig.Tierney/apps/impi/4.1.3.049/intel64/include/mpicxx.h(99):
error: #error directive: "SEEK_CUR is #defined but must not be for the C++
binding of MPI. Include mpi.h before stdio.h"
  #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI.
Include mpi.h before stdio.h"
   ^

In file included from /home/Craig.Tierney/apps/impi/
4.1.3.049/intel64/include/mpi.h(1279),
                 from ../lib/pnetcdf.h(10),
                 from ncmpiType.h(2),
                 from ncmpiType.cpp(2):
/home/Craig.Tierney/apps/impi/4.1.3.049/intel64/include/mpicxx.h(104):
error: #error directive: "SEEK_END is #defined but must not be for the C++
binding of MPI. Include mpi.h before stdio.h"
  #error "SEEK_END is #defined but must not be for the C++ binding of MPI.
Include mpi.h before stdio.h"
   ^

compilation aborted for ncmpiType.cpp (code 2)
make[2]: *** [ncmpiType.o] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20150610/9a681fd5/attachment.html>


More information about the parallel-netcdf mailing list