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 Ben, > I managed to reproduce the error in my tester which I will attach. In > my tester the issue is when you try to define the time variable when > time was an unlimited dimension. The crash is on issue is on line 273 of > nc4var.c the suggested_size = (pow . . . . ) > > In that line you have 1/(double)(var->ndims - num_set), and when it > crashes ndims = 1 and num_set = 1. If turned out the reason our model > was crashing but that my tester was not was that in our model we compile > with ifort and enable the -fpe0 option that enables divide by zero > floating point exception. > Initially I was not building my tester with this option but when I > compile with -fpe0 option my little tester program will crash in the > same way. > > We are building with intel 13.1.2.183, presumably with gfortran it would > be something like --ffpe-trap=0 do the equivalent of -fpe0 in ifort. The bug is fixed in the GitHub sources. The only file involved in the fix was libsrc4/nc4var.c, but if you want a patch, I can send that. The fix will be in netCDF-C 4.3.2, and additional release candidates before 4.3.2, should we decide any are needed. Thanks again for reporting the bug and for your work in helping isolate it. --Russ Ticket Details =================== Ticket ID: LBV-326209 Department: Support netCDF Priority: Normal Status: Open