Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] mpi.h incorrect format error?
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-08-06 11:32:31


On Aug 6, 2012, at 10:35 AM, PattiMichelle wrote:

> /usr/local/openmpi_16/include/mpi.h:1083:25: error: expected identifier or ‘(’ before ‘int’
> /usr/local/openmpi_16/include/mpi.h:1097:25: error: ‘MPI_Comm’ redeclared as different kind of symbol
> /usr/local/openmpi_16/include/mpi.h:319:37: note: previous declaration of ‘MPI_Comm’ was here

+1 on what Tim said.

Additionally, what version of Open MPI is this (1.6?), and where did you get it from?

I ask because these are very strange lines to get errors on in mpi.h. In my copy of OMPI 1.6, mpi.h:1081-4 is:

-----
1081: OMPI_DECLSPEC int MPI_Comm_accept(char *port_name, MPI_Info info, int root,
1082: MPI_Comm comm, MPI_Comm *newcomm);
1083: OMPI_DECLSPEC MPI_Fint MPI_Comm_c2f(MPI_Comm comm);
1084: OMPI_DECLSPEC int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode);
-----

MPI_Fint on 1083 should likely resolve to "int", and OMPI_DELCSPEC will resolve to be nothing or an __attribute__ directive. But OMPI_DECLSPEC has already been used a bajillion times already in mpi.h, so that can't be the error. I don't see any other error before MPI_Fint.

Similarly, line 1097 also uses MPI_Fint.

Is something else defining the value of MPI_Fint before you include mpi.h, perchance?

I ask because I notice that we define MPI_Fint thusly:

-----
#ifndef MPI_Fint
/* MPI_Fint is the same as ompi_fortran_INTEGER_t */
#define MPI_Fint ompi_fortran_integer_t
#endif
-----

Meaning that if someone else has defined MPI_Fint before us, we'll keep that definition. Which actually seems like a bad idea, but even so, no one else should be defining what MPI_Fint is.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/