[mpich-discuss] Getting an undeclared error on compile, with mpicc

Kenneth Raffenetti raffenet at mcs.anl.gov
Thu May 1 09:56:46 CDT 2014

How was MPICH installed? Are you including the right mpi.h header in 
your program? Have you tried compiling and running the cpi.c example 
that comes with MPICH?

If you send us the smallest possible program that can reproduce this 
error, it would help us get to the bottom of the issue.


On 05/01/2014 09:49 AM, mark wrote:
> Hello.
> I am getting an error that i wasn't getting before.
> ------------------------------------------------------------------------
> test.c: In function 'main':
> test.c:63: error: 'MPI_COMM_WORLD' undeclared (first use in this function)
> test.c:63: error: (Each undeclared identifier is reported only once
> test.c:63: error: for each function it appears in.)
> test.c:111: error: 'MPI_INT' undeclared (first use in this function)
> ------------------------------------------------------------------------
> line 63  : MPI_Comm_size(MPI_COMM_WORLD, &numnodes);
> line 111:MPI_Scatter( array, PARTS, MPI_INT, my_array, PARTS, MPI_INT,
> master, MPI_COMM_WORLD);
> I am under a 2.6.23-gentoo-r5 cluster with gcc version 4.2.2 (Gentoo
> 4.2.2 p1.0)
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

More information about the discuss mailing list