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.
Hello, Thank you for providing the information below; I had read your pull request (https://github.com/Unidata/netcdf-c/pull/120) while I was out of the office last week, and was trying to figure out the context where this check would cause problems. This answers that question splendidly. I will need to check for potential unintended effects of the pull request which applies the fix you describe below, but I should be able to do that in the next day or two. Thanks again for the detailed information! -Ward > In netcdf-4.3.2 and netcdf-4.3.1, we use the capability of calling > nc_get_var_longlong to read an int dataset variable into a longlong > client datatype. This works in serial and in parallel. > > I recently tested upgrading to netcdf-4.3.3.1 and am encountering errors > when doing this. The basic issue seems to be that the dispatcher in the > 4.3.2 is NC_DISPATCH_NC3; however, in 4.3.3.1, the dispatcher is forced > to be NC_DISPATCH_NC5 when run in parallel. This is done at line 177 > of dfile.c. > > The problem with this is that when I call nc_get_var_longlong, I get an > NC_EINVAL return from line 569 in nc5dispatch.c. > > If I remove that memtype check, then the code falls through to the switch > statements and seems to correctly handle the NC_INT64 memory type at > either line 598 or line 619 in the same file. > > It looks like there is either a problem with forcing the dispatcher to be > NC_DISPATCH_NC5 or the "memtype == NC_INT64" check needs to be removed. > Note that the NC5_get_att and NC5_put_att functions do not have that > check, but the NC5_get_vara and NC5_put_vara functions do. > > Thanks, > ..Greg > > Ticket Details =================== Ticket ID: DMD-262410 Department: Support netCDF Priority: Normal Status: Closed