[mpich-discuss] icc error with mpich2
chan at mcs.anl.gov
chan at mcs.anl.gov
Mon Aug 23 20:30:42 CDT 2010
----- "Siraj" <sirajkhan78 at gmail.com> wrote:
> /usr/include/mpi.h(30): error: invalid redeclaration of type name
> "MPI_Request" (declared at line 264 of
> "/hpc/home/sislam/mpich2-1.2.1p1/include/mpi.h")
> typedef unsigned int MPI_Request;
It looks like you have 2 mpi.h header files, one in /usr/include/mpi.h
and one in /hpc/home/sislam/mpich2-1.2.1p1/include. You may have
more than 1 MPI implementation on your machine.
> Note: I have compiled mpich using following command
> ./configure --prefix=/hpc/u2/sislam/mpich2-1.2.1p1'
> '--with-atomic-primitives=no' 'CC=icc' 'F77=ifort'
did you do "make" and "make install" after configure ?
your mpich2 install directory, /hpc/u2/sislam/mpich2-1.2.1p1,
is different from above 2 ?!
Can you try using the mpi wrappers, like mpicc and pif90,
from /hpc/u2/sislam/mpich2-1.2.1p1/bin to compile and link
your ccsm code ? In general, one should use MPI wrappers provided
by MPI implementation instead of using native compiler directly.
MPI wrappers provided by MPICH2 is very careful about the include
and link path orders, so it should avoid the problem that you see here.
If not, let us know...
A.Chan
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list