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 now built and tested both the 3.6.3 and 4.1.3 on OSX with gcc/gfortran > 4.5.3. It is correctly noted in the installation instruction that the > -DgFortran (or -DpgiFortran) cpp flag is automatically detected and set > during the configuration. This works only if the respective fortran compiler > is gfortran (pgf90/95). For NetCDF-4 compilation using MPI the fortran > compiler is a wrapper like mpif90 and thus -DgFortran (-DpgiFortran) have to > be manually set by the user. > > Would it be possible to either add this to the Installation instructions or > alternatively find a way to auto-detect the compiler type even though the > compiler is embedded in a MPI wrapper? Thanks for the suggestion, I've added it to our list of tasks. If you want to follow its progress, you can see the Jira entry here: https://www.unidata.ucar.edu/jira/browse/NCF-84 --Russ > On Jun 20, 2011, at 6:34 PM, Unidata netCDF Support wrote: > > > 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 > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: QVV-651237 Department: Support netCDF Priority: High Status: Closed