Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bp2ncd: src/public/mpidummy.h:24:13: error: two or more data types in declaration specifiers #167

Closed
chapouvalpin opened this issue Feb 15, 2018 · 2 comments

Comments

@chapouvalpin
Copy link

chapouvalpin commented Feb 15, 2018

Hi,

I get the following error while compiling ADIOS 1.13.0:

gcc -DHAVE_CONFIG_H -I. -I../..   -I../../src -I../../src/public -I../../src -I../../src/public -I../../src/core -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I/home/anlemoin/usr/include -D_NOMPI     -g -O2 -c -o bp2ncd-bp2ncd.o `test -f 'bp2ncd.c' || echo './'`bp2ncd.c
In file included from bp2ncd.c:12:0:
../../src/public/mpidummy.h:24:13: error: two or more data types in declaration specifiers
 typedef int MPI_Comm;
             ^
In file included from ../../src/public/adios_mpi.h:13:0,
                 from ../../src/core/adios_transport_hooks.h:15,
                 from bp2ncd.c:14:
../../src/public/mpidummy.h:24:1: warning: useless type name in empty declaration
 typedef int MPI_Comm;
 ^~~~~~~
In file included from bp2ncd.c:12:0:
../../src/public/mpidummy.h:27:13: error: two or more data types in declaration specifiers
 typedef int MPI_Info;
             ^
In file included from ../../src/public/adios_mpi.h:13:0,
                 from ../../src/core/adios_transport_hooks.h:15,
                 from bp2ncd.c:14:
../../src/public/mpidummy.h:27:1: warning: useless type name in empty declaration
 typedef int MPI_Info;
 ^~~~~~~
../../src/public/mpidummy.h:47:0: warning: "MPI_COMM_WORLD" redefined
 #define MPI_COMM_WORLD              1

System configuration:

  • gcc 7.3.0
  • OpenMPI 3.0.0
  • I used the autotools version to compile, not CMake.

If I am correct, the compilation fails when it compiles a nompi version of bp2ncd. Therefore, it is not a OpenMPI version issue but a compiler issue, but I have no problem to compile ADIOS on another system with the same compiler.

Antoine

@chapouvalpin
Copy link
Author

I found the error. There is a very old version of NetCDF (1.56) on the system that conflicts with the compilation. I don't need the NetCDF dependency, but autotools detects it. I have installed a modern version which fixes the issue.

Here was the error:

In file included from bp2ncd.c:12:0:
/usr/include/netcdf.h:44:0: note: this is the location of the previous definition
 #define MPI_COMM_WORLD 0

@pnorbert
Copy link
Contributor

pnorbert commented Feb 15, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants