pgCC compilation error ? mpich error? not sure

Hi

I am trying to compile a parallel c++ code with mpiCC that uses the parallel FFTW 2.1.5 libraries. I have compiled FFTW using --enable-mpi option and CC=pgcc and MPICC=mpicc options. When I compile my c++ code after including the relevant FFTW library files (in the correct order, I presume) I get these errors (see end of mail) for some of my routines. (mpiCC and mpicc are just wrappers that use the PG compilers)

The code compiles fine with GNU compilers (using FFTW compiled with GNU compilers). So does this error have anything to do with some option that I am missing in the compilation using PG compilers or with the mpiCC wrapper or the FFTW libraries?

I have also posted a portion of my Makefile here

CC = mpiCC
CCFLAGS = -O -I/opt/mpich.pgi-1.2.6/include
-I/home/madhu/FFTLIBMPI/include
-DFFT_FFTW2_MPI
DEPFLAGS = -M
LINK = mpiCC
LINKFLAGS = -O -L/opt/mpich.pgi-1.2.6/lib
-L/home/madhu/FFTLIBMPI/lib
USRLIB = -lrfftw_mpi -lfftw_mpi -lrfftw
-lfftw -lmpich
SYSLIB = -lm

I will appreciate any help in this regard.

Thanks,
Madhu

“/usr/include/bits/cmathcalls.h”, line 54: error: declaration is incompatible
with “float _Complex” (declared at line 54)
__MATHCALL (cacos, (Mdouble_complex __z));

“/usr/include/bits/cmathcalls.h”, line 54: error: expected a “;”
__MATHCALL (cacos, (Mdouble_complex __z));
^

“/usr/include/bits/cmathcalls.h”, line 54: error: expected a “;”
__MATHCALL (cacos, (Mdouble_complex __z));
^

“/usr/include/bits/cmathcalls.h”, line 56: error: expected a “;”
__MATHCALL (casin, (Mdouble_complex __z));
^

“/usr/include/bits/cmathcalls.h”, line 56: error: expected a “;”
__MATHCALL (casin, (Mdouble_complex __z));
^

“/usr/include/bits/cmathcalls.h”, line 58: error: expected a “;”
__MATHCALL (catan, (Mdouble_complex __z));
^

“/usr/include/bits/cmathcalls.h”, line 58: error: expected a “;”
__MATHCALL (catan, (Mdouble_complex __z));

Hi Madhu,

This error occurs when you include ‘complex.h’ in your program. ‘Complex’ is part of a ‘C’ extension called C99 which pgCC and pgcc don’t yet support. Support for C99 which also includes variable length arrays is scheduled to be included with the PGI 6.1 release. Unfortunately until then, you’ll need to use gcc if you need to include complex.h.

Thanks,
Mat