Open edhartnett opened 5 years ago
I got the same error. I simply comment out the second `include' and it worked.
Genuine bug. I will fix.
OK, the problem is, without the second 'include' then my build fails like this:
mpifort -DPACKAGE_NAME=\"netCDF-Fortran\" -DPACKAGE_TARNAME=\"netcdf-fortran\" -DPACKAGE_VERSION=\"4.5.0-development\" -DPACKAGE_STRING=\"netCDF-Fortran\ 4.5.0-development\" -DPACKAGE_BUGREPORT=\"support-netcdf@unidata.ucar.edu\" -DPACKAGE_URL=\"\" -DPACKAGE=\"netcdf-fortran\" -DVERSION=\"4.5.0-development\" -DNF_RELAX_COORD_BOUND=1 -DENABLE_CDF5=1 -DNF_HAS_PARALLEL4=1 -DHAVE_F2008=1 -DHAVE_TS29113_SUPPORT=1 -DTEMP_LARGE=\".\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DNF_INT1_T=byte -DNF_INT2_T=integer\*2 -DNF_INT8_T=integer\*8 -DNF_INT1_IS_C_SIGNED_CHAR=1 -DNF_INT2_IS_C_SHORT=1 -DNF_INT8_IS_C_LONG_LONG=1 -DNF_INT_IS_C_INT=1 -DNF_REAL_IS_C_FLOAT=1 -DNF_DOUBLEPRECISION_IS_C_DOUBLE=1 -DNCBYTE_T=byte -DNCSHORT_T=integer\*2 -DHAVE_LIBM=1 -DHAVE_NETCDF_H=1 -DHAVE_NC_DEF_OPAQUE=1 -DHAVE_NCCREATE=1 -DHAVE_NC_SET_LOG_LEVEL=1 -DHAVE_NC_DEF_OPAQUE=1 -DUSE_NETCDF4=1 -DLOGGING=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_LOCALE_H=1 -DHAVE_STDIO_H=1 -DHAVE_STDARG_H=1 -DHAVE_ERRNO_H=1 -DHAVE_CTYPE_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_VPRINTF=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_SSIZE_T=1 -DHAVE_PTRDIFF_T=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DSIZEOF_FLOAT=4 -DSIZEOF_DOUBLE=8 -DSIZEOF_OFF_T=8 -DSIZEOF_SIZE_T=8 -DSIZEOF_PTRDIFF_T=8 -I. -I../fortran -I/usr/local/netcdf-c-4.7.0-development_mpich-3.2/include -g -O2 -c -o f03tst_parallel.o f03tst_parallel.F
f03tst_parallel.F:73:39:
call MPI_Comm_rank(MPI_COMM_WORLD, my_rank, ierr)
1
Error: Symbol ‘mpi_comm_world’ at (1) has no IMPLICIT type
f03tst_parallel.F:84:24:
$ MPI_INFO_NULL, ncid)
1
Error: Symbol ‘mpi_info_null’ at (1) has no IMPLICIT type
Makefile:985: recipe for target 'f03tst_parallel.o' failed
make[2]: *** [f03tst_parallel.o] Error 1
make[2]: Leaving directory '/home/ed/tmp/netcdf-fortran/nf_test4'
Makefile:1441: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/home/ed/tmp/netcdf-fortran/nf_test4'
Makefile:1444: recipe for target 'check' failed
make: *** [check] Error 2
So now I don't know what to do...
Just for your reference, I use ifort wrapped by openmpi (mpifort) to compile the program, then the second `include' is extraneous. It might be a compiler dependent issue.
From Chris H. at NOAA: