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.
>To: address@hidden >From: Dierk Polzin <address@hidden> >Subject: Re: 20020114: Do you know what these errors mean? >Organization: Univ. of Wisc. >Keywords: Dierk, > How can I debug why I get a Bus Error while opening a netcdf file? > > ierr = nf_open(filen,FN_NOWRITE,ides) I assume you meant ierr = nf_open(filen,NF_NOWRITE,ides) If you're getting a bus error while opening the file, how can the subsequent print statement print anything? Do you mean you're getting a bus error later, when using "ides"? > print *, filen,NF_NOWRITE,ides,ierr > gives > ./input/topo.nc 0 -1073744016 0 Is "ides" declared to be an INTEGER? If ierr is returned as zero, ides should be returned as a small integer, such as 11. > This is using the netcdf libraries on OS X.. > > f77 -N15 -f -N90 -o testnc testnetcdf.f > /Volumes/Alpine/IBISgnu/lib/libnetcdf.a I don't know what the "-N15" or "-N90" flags mean. I assume "f77" is the Absoft Fortran compiler. Did the "make test" work OK in the src/nf_test directory with this compiler? If so, you might want to look at the compiler flags used in that test, since it calls "nf_open" several times. If you are using different Fortran compiler flags than were used in building the netCDF library, that might cause problems. --Russ