Open vassilyl opened 5 years ago
Well certainly this can be better documented.
Can this be detected? That is, is there some code that runs on the 32-bit machine that will identify when this condition has occurred?
@edhartnett I guess this was never fixed ever since? I just got an apparently related error in an R
package which relies on NetCDF: https://github.com/pvanlaake/CFtime/issues/5
Maybe it can be addressed?
Any update on this one?
I don't know what should be done.
We do not want to limit the dimension size. So what should we do here?
I don't know what should be done.
We do not want to limit the dimension size. So what should we do here?
There must be a way to have it working on 32-bit? Any needed changes can be done conditionally, so nothing is adversely affected on 64-bit platforms.
Well what should it do if there is a dimension that is too big for a 32-bit int? Error out?
Does windows really not have a 64-bit int? That sounds wrong...
Well what should it do if there is a dimension that is too big for a 32-bit int? Error out?
Does windows really not have a 64-bit int? That sounds wrong...
I have no idea about Windows, but normally on a 32-bit platform int
is, of course, 32-bit, so long long
should be used.
NetCDF 4.7.0 on Windows 10 using Microsoft (R) C/C++ Optimizing Compiler Version 19.22.27905.
It appears it is totally possible to create a NetCDF4 file with the length of dimension > 2**32. On systems with 32-bit size_t, e.q. 32-bit Windows, the NetCDF API reports wrong values. Does the API has functions capable of reporting 64-bit sizes on 32-bit platforms? I would, at least, expect that the limitation is clearly documented and the function to report an error.
Steps to reproduce:
Create a .nc file using this simple code:
... and then open the file with the following:
F
or a 64-bit program the output is
while for a 32-bit code it is
The .nc file: a.zip