ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 40 forks source link

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

Closed chapouvalpin closed 6 years ago

chapouvalpin commented 6 years ago

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:

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 commented 6 years ago

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 commented 6 years ago

Thanks for the note. You can build adios without netcdf by using the configure option --without-netcdf

On Feb 15, 2018 5:39 AM, "chapouvalpin" notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ornladios/ADIOS/issues/167#issuecomment-365888649, or mute the thread https://github.com/notifications/unsubscribe-auth/ADGMLbtEXkRFa6Gq_Jf1LFRpgHjMe6lDks5tVAlXgaJpZM4SGnk3 .