This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Reto > I've upgraded to both NetCDF 3.6.3 and the fink install of gcc/gfortran > 4.5.2 on OSX 10.6 x86_64. NetCDF 3.6.3 builds fine and runs with both > the C and F90 interfaces. So far so good. > > What worries me is the following warning during build-time, that was > never there before in earlier NetCDF or gcc/gfortran versions. This may > be a hint that the array is initialized with 0 dimension size and may > cause problem under certain circumstances? > > libtool: compile: gfortran -I../libsrc -I. -g -O2 -c netcdf.f90 -o netcdf.o > netcdf_text_variables.f90:284.93: > Included at netcdf.f90:51: > > localMap(:numDims ) = (/ 1, (product(localCount(:counter)), counter = 1, > numDims - 1) /) > 1 > Warning: DO loop at (1) will be executed zero times > netcdf_text_variables.f90:60.93: > Included at netcdf.f90:51: > > localMap(:numDims ) = (/ 1, (product(localCount(:counter)), counter = 1, > numDims - 1) /) > 1 > Warning: DO loop at (1) will be executed zero times > > > Please let me know what you think. numDims is initialized earlier on in > netcdf_text_variables.f90 with the value of 1, so numDims - 1 is 0, > which means that the localMap(:numDims) will be of size 0. Is that ok or > not? It's OK, and has never caused any reported problems other than this harmless warning that gfortran added in an upgrade. Getting rid of the warning actually makes the code less maintainable, but it's probably worth it for reassuring users who look at the compiler warnings that it's not a symptom of a bug. By the way, we just released netCDF-4.1.3 and it can be built with the --disable-netcdf-4 configure option that results in a netCDF-3 library completely compatible with the old netCDF-3.6.3 library, but with some bug fixes and enhancements that haven't been incorporated in the 3.6.3 release. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: QVV-651237 Department: Support netCDF Priority: Normal Status: Closed