-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to make correction for opening file larger than 2 GB #36
Comments
Hi Ed, |
The test code should create a file larger than 2 GB and then try to open it. |
This has been addressed on v3.4.2 and corrected on v3.4.3. |
Hang this was not related to v3.4.2 which was for opening file units > 100. |
What I've gathered is that there is an integer that's overflowing somewhere and it needs to be changed to 64-bit. Gfortran has the flag |
Line 32 in e184a5d
I was able to get DEGRIB2 to work after changing the integers here to int64. There's more, and anything that deals with byte counts needs to be made int64. |
I'm also running into issues reading > 2 GB GRIB2 files, so happy to see that this issue is being addressed. Is there a timeline for version 3.5.0? |
I am also having problems with > 2GB files. That function must work to support this ufs_utils project - ufs-community/UFS_UTILS#660. That is a high priority project according to @EricRogers-NOAA. |
@kgerheiser so in file getg2ir.F90 did you make these variables: into INTEGER(KIND=8)? Or did you turn all the integers into KIND=8? |
I'm trying this again with @GeorgeGayno-NOAA's test case. |
Let me add some diagnostic print so you can see where it breaks. |
I ran chgres_cube with the GNU
Which is this call to Line 53 in a8bdf75
And the addition of So, this will also require a change in bacio as well. And anyone that uses these functions will also have to change to match the int64 interface. You can't just pass an int32 to an int64 function because the data will be offset and you'll get junk. (Or can you because the bottom 32 bits are the same?) |
What if we add new functions to bacio which handle 64-bit? |
Yes, maybe that is a solution. And the 32-bit interface could cast to in64 internally. |
OK, I am looking at bacio. Actually there already is a function bareadl() which handles 64-bit ints:
So if you just change your call in skgb.F90 to use bareadl() you can pass in your 64-bit arguments. |
Thanks @edwardhartnett |
OK, unfortunately this is something Kyle didn't get to finish. I'm taking a look at this now, @GeorgeGayno-NOAA is there a test file I can use >2 GB on hera? |
You can try: /scratch1/NCEPDEV/da/George.Gayno/noscrub/eric.rrfs/fv3lam.t00z.prslev.f003.grib2 |
OK, I have taken a stab at this and I think some major surgery will be required. The problem is that the skgb() subroutine takes integer parameters (so *4 on _4 builds, and 8 on _8 builds) and it needs to take integer8 always. So this means I need to add a new function skgb8(), which does the same thing as skgb() but with I*8 parameters. Then I can combine these two functions so it is really just one function doing the work. |
Thanks for fixing this. We can now resume work on ufs-community/UFS_UTILS#660 Has the latest G2 tag been installed on any of our machines? |
No but it's coming soon, along with a new release of grib_util. |
Great. @LarissaReames-NOAA would like to use it on Jet. |
Need to make correction for opening file larger than 2 GB.
The text was updated successfully, but these errors were encountered: