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, > > ftst_vars4 of netdcf-4.1.1 fails on SPARC with a SIGBUS when compiled > with 64 bits enabled for the following reason: > > The len member of nc_vlen_t is 64 bits wide (for -m64) and thus, it has > to be aligned on a 8 byte boundrary. > > A integer in gfortran is always 32 bits wide (independent of whether > -m32 or -m64 has been given) and so your > integer vlen(10) > may be aligned on a 4 byte boundrary and gfortran does exactly this on > my system resulting in a SIGBUS when nf_put_vlen_element gets invoked. > > The attached diff fixes that (make check completes successfully). > > You might also want to update that netcdf-f77.texi about how to proper > use functions where a size_t is involved on 64 bit systems. > > Wishes > > Nicolai > > Howdy Nicolai! Thanks for pointing this out and providing a fix. I would have had a hard time figuring that one out! I have checked your fix into the repository and it is in the current snapshot release: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4-daily.tar.gz Please give it a try and let me know if it works for you. Thanks, Ed Ticket Details =================== Ticket ID: OKY-144340 Department: Support netCDF Priority: Critical Status: Closed