-
Notifications
You must be signed in to change notification settings - Fork 24
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
Limit for sinv needs to be increased #579
Comments
This is a parameter setting in the sinv utility, based on the expected maximum number of data subsets that one would ever expect to read from a single BUFR file. We could certainly set it to a larger number, but since we're already at 16 million, and since that number is used to dimension two underlying real*8 arrays, then at some point we could conceivably reach a limit where the resulting compiled object is too big to load into RAM. So we may also need to modify the utility to redefine the underlying said and siid arrays as allocatable and dynamically allocate them at run time, rather than fixing their sizes at compile time. Either way, we'd need to set some practical limit in the utility. @SudhirNadiga-NOAA do you have any idea how much larger you'd need this setting to be? Note that you can get the count of subsets in any BUFR file by just calling ufbtab with a negative logical unit number, and if you do that then you don't need to worry about how big your array is actually dimensioned because it won't actually try to read and store any of the requested mnemonics in the last argument. Also CCing @jack-woollen for his awareness :-) |
FWIW, I just did this for the file you mentioned above, and it had just under 110 million subsets in it! Do you know if that's a typical daily count for these files? |
Thanks for all your efforts. I will need to ask Iliana if she knows how big our tanks can get in the next year or so. My guess is that the biggest tanks we have are the b021/xx206 tanks. |
@ilianagenkova Do we have an idea as to the maximum desired for sinv in terms of number of subsets? |
It looks like the xx054 tank may have more subsets by a lot (~18X ) type messages subsets bytes NC021206 32409 5832000 1646306317 179.95 [clogin07 /lfs/h1/ops/prod/dcom/20240319/b021]$ binv xx054 type messages subsets bytes NC021054 4943114 104542051 1953387584 21.15 [clogin07 /lfs/h1/ops/prod/dcom/20240319/b021]$ |
I am running binv on all our tanks, so we should have an idea as to the largest tanks by number of subsets. This will help answer your question. |
My check shows that the poes_sst files have close to 600 million subsets. type messages subsets bytes NC012023 139362 556549305 -990011533 3993.55 Iliana and I will discuss this problem and get back to you on any further details, since we are considering writing the two different instruments in different tanks to reduce the number of subsets and for ease of dumping. |
@SudhirNadiga-NOAA @ilianagenkova any updates on this? |
I'll provide the largest obs counts that we see (per tank) in the next few days. |
@SudhirNadiga-NOAA @ilianagenkova any updates? I'm asking b/c I never heard anything more from either of you about this. Or, if you're no longer interested in pursuing this, then please feel free to close this issue. |
@jbathegit , the largest tanks at the moment are ~10GB and they contain about ~700-800 millions subsets: [clogin03 /lfs/h2/emc/obsproc/noscrub/iliana.genkova/TEMPTEST]$ binv /lfs/h1/ops/prod/dcom//20241113/b012/xx023 sinv already can't handle these. If it would be too much work to update sinv, we can use the simple code we wrote: |
@ilianagenkova The problem with sinv as it is, is it tries to reads all the data into a table first, which can be quicker than parsing each subset separately. I didn't envision multiple hundreds of million subsets in a file when writing it! I could rewrite it (or a lookalike code) to just read through and count the data which doesn't require storing it. That's pretty simple. I'll make a sample to try and see if that works out. |
Again, only if it's relatively easy lift. I don't know how many ppl use the NCEPLIBS-bufr utilities and if it's justified to update it only for us/obsproc. My count_readall.x is pretty slow but at least it does the job. |
@ilianagenkova My reading everything one at a time is no faster than yours I'm sure. There is some tricky things that might work faster, but will take longer to develop. I'll let you know if I find the time to find them! Its an interesting problem for sure. |
@ilianagenkova on hera: I'll make one on wcoss2. |
@ilianagenkova - the wcoss2 version is here - runt builds sinv.x and runs a timing test - wcoss2 is a little slower than hera. |
@jack-woollen, this is fantastic! Thank you! I will leave it up to you and @jbathegit to decide whether to add the new sinv to the Bufr library utilities as one more utility, or to replace the current sinv. Also, you can do it when it's convenient for you. We can use your executable until then. @SudhirNadiga-NOAA @SteveStegall-NOAA , you can test it too (Dogwood): |
@jack-woollen thanks for this, but it looks like whatever changes you made in
Is there some particular reason you made your updates to an older version of the sinv code, rather than to the latest release version in the develop branch? I'm asking b/c I don't see how we can merge any of this into the develop branch in GitHub, unless that was never your intent to begin with(?) |
@jbathegit Good point. I never meant to merge this code into develop because of the significant change to ufbtab that is needed along with it. I have to think that through when I have more time. I'll get back to it when I have a chance to work it through. |
@jack-woollen , are the changes in ufbtab to speeding it up or to handle larger data arrays? |
@ilianagenkova The change to ufbtab allows an app to call it repeatedly to extract data progressively from one input file. The current ufbtab is one and done. If it can't read all the data in one call, it errs off. Since the modified sinv is collapsing the data by itemizing counts of satellite types, it doesn't need to store all the data at one time. The purpose of ufbtab has always been to turbo read simple elements from complicated files. That doesn't change. But the modified version defines output arguments differently. Probably I will introduce a new version of ufbtab with a new name to preserve the current interface of ufbtab. When I get a couple more days to work on it, I'll merge the new stuff into develop. Other things are calling at the moment! |
When running sinv on a large tank, I get an error message.
[clogin07 /lfs/h2/emc/obsproc/noscrub/sudhir.nadiga]$ ls -l /lfs/h1/ops/para/dcom/20240318/b021/xx054
-rw-rw-r-- 1 ops.para para 2073922960 Mar 19 01:16 /lfs/h1/ops/para/dcom/20240318/b021/xx054
[clogin07 /lfs/h2/emc/obsproc/noscrub/sudhir.nadiga]$
ERROR MESSAGE BELOW
[clogin07 /lfs/h2/emc/obsproc/noscrub/sudhir.nadiga]$ sinv /lfs/h1/ops/para/dcom/20240318/b021/xx054
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: UFBTAB - THE NO. OF DATA SUBSETS IN THE BUFR FILE IS .GT. LIMIT OF 16000000 IN THE 4TH ARG. (INPUT) - INCOMPLETE READ
+++++++++++++++++++++WARNING+++++++++++++++++++++++
BUFRLIB: UFBTAB - THE NO. OF DATA SUBSETS IN THE BUFR FILE IS .GT. LIMIT OF 16000000 IN THE 4TH ARG. (INPUT) - INCOMPLETE READ
209 NOAA 18 9109137 000
223 NOAA 19 6890154 000
[clogin07 /lfs/h2/emc/obsproc/noscrub/sudhir.nadiga]$
How do we address this issue? Thanks.
The text was updated successfully, but these errors were encountered: