[OMPI users] mpi.h incorrect format error?
Hi All: I'm trying to build the weather code WRF under openSUSE 12.1 x64 and it *should* be building easily but I'm getting a very odd error during the build where it claims my mpi.h file has an incorrect format. I suspect that there is some other needed file it's not finding, but I am not sure how to troubleshoot this. Has anyone seen this before and can enlighten me as to what it means? I have tried a couple of different versions of openMPI and they all give the same error. THANK YOU!! make[3]: Leaving directory `/home/patti/00_GCMs/WRF/WRFV3/external/io_netcdf' ( cd /home/patti/00_GCMs/WRF/WRFV3/external/RSL_LITE ; make CC="mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25" \ FC="mpif90 -O3 -ftree-vectorize -ftree-loop-linear -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -fconvert=big-endian -frecord-marker=4" \ CPP="/lib/cpp -C -P -I. -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DCOAMPS_CORE=0 -DDA_CORE=0 -DEXP_CORE=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DDM_PARALLEL -DNETCDF -DUSE_ALLOCATABLES -DGRIB1 -DINTIO -DLIMIT_ARGS -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0 -traditional" AR="ar" ARFLAGS="ru" ;\ ranlib /home/patti/00_GCMs/WRF/WRFV3/external/RSL_LITE/librsl_lite.a ) make[3]: Entering directory `/home/patti/00_GCMs/WRF/WRFV3/external/RSL_LITE' mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c c_code.c In file included from c_code.c:23:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [c_code.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c buf_for_proc.c In file included from buf_for_proc.c:63:0: */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 /usr/local/openmpi_16/include/mpi.h:1099:34: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:1100:38: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:1102:44: error: expected declaration specifiers or '...' before 'MPI_Comm'* */usr/local/openmpi_16/include/mpi.h:1103:38: error: expected declaration specifiers or '...' before 'MPI_Comm' * << snip! >> */usr/local/openmpi_16/include/mpi.h:1921:55: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:1924:40: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:1940:35: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:2027:32: error: expected declaration specifiers or '...' before 'MPI_Comm' /usr/local/openmpi_16/include/mpi.h:2045:51: error: expected declaration specifiers or '...' before 'MPI_Comm' *make[3]: [buf_for_proc.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c rsl_malloc.c In file included from rsl_malloc.c:87:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [rsl_malloc.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c rsl_bcast.c In file included from rsl_bcast.c:67:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [rsl_bcast.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c task_for_point.c mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c period.c In file included from period.c:13:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [period.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c swap.c In file included from swap.c:13:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [swap.o] Error 1 (ignored) mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c cycle.c In file included from cycle.c:13:0: rsl_lite.h:152:13: error: two or more data types in declaration specifiers make[3]: [cycle.o] Error 1 (ignored) mpif90 -O3 -ftree-vectorize -ftree-loop-linear -funroll-loops -w -ffree-form -ffree-line-length-none -fconvert=big-endian -frecord-marker=4 -
Re: [OMPI users] mpi.h incorrect format error?
On 08/06/2012 07:35 AM, PattiMichelle wrote: mpicc -DFSEEKO64_OK -w -O3 -c -DLANDREAD_STUB -DDM_PARALLEL -DMAX_HISTORY=25 -c buf_for_proc.c You might need to examine the pre-processed source (mpicc -E buf_for_proc.c > buf_for_proc.i) to see what went wrong in pre-processing at the point where the compiler (gcc?) complains. I suppose you must have built mpicc yourself; you would need to assure that the mpicc on PATH is the one built with the C compiler on PATH. -- Tim Prince
Re: [OMPI users] mpi.h incorrect format error?
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 jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/