Skip to content
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

GridToMeshESMFRegridder: TypeError: buffer is too small for requested array #246

Open
arjclark opened this issue Mar 28, 2023 · 11 comments
Open
Assignees
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug

Comments

@arjclark
Copy link

🐛 Bug Report

@stephenworsley - When working with large source data and trying to generate a regridder am hitting TypeError: buffer is too small for requested array

How To Reproduce

Steps to reproduce the behaviour:

  1. Start a SPICE interactive session with 180GB memory (not actually necessary but gives sufficient overhead to prove this isn't a memory availability problem)
  2. module load scitools
  3. set: ulimit -u unlimited
  4. start python
  5. load in large source file (please contact separately for path)
  6. load in a C48 target cube
  7. generate regridder
  8. wait for traceback to be generated

Expected behaviour

regridder to be generated

Environment

  • SPICE interactive
  • scitools/default-current
  • esmf_regrid version: 0.5.0

Additional context

We need to be able to regrid this particular large source file to a range of UGrid resolutions (target C896 for now) in order to generate ancillary files for starting LFRic. An example script and source files can be provided on request but am not able to advertise on a public repo.
@arjclark arjclark added New: Issue Highlight a new community raised "generic" issue Type: Bug labels Mar 28, 2023
@stephenworsley stephenworsley self-assigned this Apr 12, 2023
@stephenworsley
Copy link
Contributor

As mentioned offline, this seems to be due to the way esmpy handles arrays and I'm not sure how possible it would be to solve this directly so I think this could be solved with a work around. If it is only the source data which is too large, it ought to be possible to create a series of regridders from slices of the large source which are each small enough to fit in memory. once regridding is done, the result can be concatenated back together. If this can be demonstrated as a viable solution, it should be possible to refine this process to be something that iris-esmf-regrid can handle internally.

@github-actions
Copy link
Contributor

@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 90 days. Remove stale label or comment, otherwise this issue will close automatically in 7 days time.

@github-actions github-actions bot added the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jul 12, 2023
@arjclark
Copy link
Author

Still relevant and proof of concept provided by @stephenworsley seems to be working in getting round this issue.

@github-actions github-actions bot removed the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jul 13, 2023
@trexfeathers trexfeathers moved this to In Progress in 🚴 Peloton Sep 20, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Dec 15, 2023
Copy link
Contributor

@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 180 days. Remove stale label or comment, otherwise this issue will close automatically in 14 days time.

@github-actions github-actions bot added the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jan 10, 2024
@arjclark
Copy link
Author

@stephenworsley - any chance this is going to get worked on any time soon?

@stephenworsley
Copy link
Contributor

@arjclark We're hoping to work on this as part of a focus on performance as planned in the roadmap here #278. The next release (0.10) ought to finish the work on regridder unification so that this should be included in work on 0.11 which ought to be starting up around March. If things go well there should be a release by summer, though that depends on how successful attempts at performance improvements are so I can't guarantee when these improvements will be released

@github-actions github-actions bot removed the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jan 11, 2024
Copy link
Contributor

github-actions bot commented Jul 9, 2024

@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 180 days. Remove stale label or comment, otherwise this issue will close automatically in 14 days time.

@github-actions github-actions bot added the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jul 9, 2024
@stephenworsley stephenworsley removed the Stale: Closure warning This stale issue or pull-request has been marked for closure label Jul 9, 2024
@arjclark
Copy link
Author

@stephenworsley - where are we at with this?

@stephenworsley
Copy link
Contributor

This is lined up to be the next bit of big work we do on iris-esmf-regrid. The timeline on this depends on how big this turns out to be, but I'd hope to start looking into this next month.

@hdyson
Copy link

hdyson commented Sep 18, 2024

Just to raise that we've encountered this issue in the wild with an additional dataset beyond the one from the original comment here. I'm happy to share the path for the other data set offline too, if that would be helpful.

@stephenworsley
Copy link
Contributor

I'd be interested to see if this is addressed by #396. Since ESMPy v8.1.0, there has been a "large_file" argument which looks like the kind of thing which could help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug
Projects
Status: No status
Development

No branches or pull requests

3 participants