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.
John, >Date: Thu, 28 Mar 1996 14:53:47 -0500 (EST) >From: address@hidden (John Sheldon) >Organization: NOAA/GFDL >Subject: Re: 960328: netCDF 2.4.1 for Unicos 7.0.6 >Keywords: 199603281505.AA27313 In the above message you wrote: > Done. The 'if' now looks like this: > > if( fd == -1 ) { > fprintf(stderr, "ffopens(): stat.sw_error=%d\n", > stat.sw_error); > fprintf(stderr, "ffopens(): %s\n", strerror(stat.sw_error)); > perror("ffopens()"); > nc_serror("filename \"%s\"", path) ; > return (-1); > } > > Here's the result: > > making `test' in directory > /ftmp/jps/tmpdir.045859a/unidata.ucar.edu/pub/netcdf/netcdf-2.4.1/src/libsrc > > c89 -c -O -DDEBUG xdrffio.c > cc-101 c89: WARNING xdrffio.c, Line = 43, File = /usr/include/rpc/types.h, > Line = 19 > The macro "FALSE" is redefined. > cc-101 c89: WARNING xdrffio.c, Line = 43, File = /usr/include/rpc/types.h, > Line = 20 > The macro "TRUE" is redefined. > > TOTAL WARNINGS DETECTED IN xdrffio.c: 2 > ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o > error.o globdef.o putget.o putgetg.o sharray.o string.o var.o xdrffio.o > r - xdrffio.o > : libnetcdf.a > c89 -o cdftest -O cdftest.o libnetcdf.a > ./cdftest > cdftest_out.new > NCxdrfile_create(): path="test.nc" > NCxdrfile_create(): fmode=0x502 > NCxdrfile_create(): ControlString="bufa:336:2" > ffopens(): stat.sw_error=5025 > ffopens(): > ffopens(): Error 0 > nccreate: filename "test.nc" > trying again > NCxdrfile_create(): path="test.nc" > NCxdrfile_create(): fmode=0x302 > NCxdrfile_create(): ControlString="bufa:336:2" > ffopens(): stat.sw_error=5025 > ffopens(): > ffopens(): Error 0 > nccreate: filename "test.nc" > nccreate: couldn't remove filename "test.nc": No such file or directory > Make: "./cdftest > cdftest_out.new": Error code 2 > Make: "dir=`echo libsrc/test | sed 's,/.*,,'`; \ > target=`echo libsrc/test | sed "s,$dir/,,"`; \ > cd $dir && \ > echo "making \`$target' in directory `pwd`" && \ > echo "" && \ > make CC="c89" CPP="c89 -E" > exec_prefix="/ftmp/jps/tmpdir.045859a/unidata.ucar.edu/pub/netcdf/netcdf-2.4.1" > FC="cf77" > prefix="/ftmp/jps/tmpdir.045859a/unidata.ucar.edu/pub/netcdf/netcdf-2.4.1" \ > > prefix=/ftmp/jps/tmpdir.045859a/unidata.ucar.edu/pub/netcdf/netcdf-2.4.1 > exec_prefix=/ftmp/jps/tmpdir.045859a/unidata.ucar.edu/pub/netcdf/netcdf-2.4.1 > \ > $target || exit 1": Error code 1 According to /usr/include/liberrno.h on our UNICOS 8 Y-MP, an error code of 5025 means the following: Bad open spec, usually layer (You should check this with your header files.) I suspect that this error message refers to the ffopens() `ControlString' argument, which has the following value: bufa:336:2 I further suspect that the above specification is incompatible, in some way, with UNICOS 7. Is there anyone out there who would know? I suggest you look up the meaning of this argument, find some likely values, and then try setting the environment variable NETCDF_FFIOSPEC to them and re-executing the `make test' (the function we've been modifying first looks at the environment variable). When you've found a value that works, you can replace the default value in the function with it. Please let me know what you find. -------- Steve Emmerson <address@hidden>