-
Notifications
You must be signed in to change notification settings - Fork 15
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
memory usage in scaloa #10
Comments
Hi @dksasaki, Thanks for raising this issue. Do you mean that there is a memory leakage after running the function or just cleaning these variables before running the rest of the interpolation to reduce the peak of memory usage? We could check how other packages usually deal with this problem and see if Me and @dantecn were also thinking about creating an option for breaking grid points into blocks to reduce performance while keeping low memory usage. We can also just simply add an example for that on documentation. |
Hi @iuryt, There is no memory leakage. When the method runs, these extra matrices can contribute significantly to the memory usage making the peak in memory even worse. The Breaking the grid into chunks is a good idea, although the whole processing gets slower due to multiple matrix inversions. Let me know if you plan to implement it, I have written a few lines that may help. |
If you want to implement breaking into blocks, go ahead. You can add an argument like Can you check how other packages as Once you make some of the modifications on your forked repo, you can make a pull request and relate to this issue. Please, let me know if you have any questions, we just started the group and we are also still learning how to manage the development process here. |
It turns out that I came back here for some reason. I just think that we could make this package better by making it work with |
Sorry for not replying, I also forgot about this issue. I developed a way to make this piece faster without using as much memory. I basically only consider data from a given point within a certain distance range. Not sure how to use dask and xarray with it though, but we can give it a try. |
Hey guys,
I've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage.
The variables d2 and dc2 can occupy a huge memory space, so deleting them after defining both correlation and cross correlation matrices (A,C, respectively) and before inverting the matrix is useful. In one of my cases, it it frees up a few gbs of memory (of course, this depends on both grid and data).
The text was updated successfully, but these errors were encountered: