-
Notifications
You must be signed in to change notification settings - Fork 26
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
Many Simultaneous 2D Integrands allocating more memory than expected #40
Comments
Yes, it does look like the memory needed for the covariance matrix is upsetting the computer. There is currently no way to turn the covariance matrices off but it looks like it might not be too difficult to make this an option. The code would still compute variances for each component of the integrand's output, but it would ignore correlations between different components. I will see what I can do but it could take a couple of weeks. In the meantime one thing you could do for the big case is to first generate the grid by integrating just the res[:, 0, 0] component of your integrand. Replace the code right after you define
Then use the grid from that integration to integrate the entire matrix, but using your own custom version of the
This code, which is equivalent to what
I believe this is what you want. |
I am trying to use Vegas to simultaneously perform many 2D integrations (something like
Nvec**2
where Nvec is ~500). Using the straightforward approach yields a memory allocation error, where an array of shape(Nvec**2, Nvec**2)
was failed to be allocated, despite the fact that my integrand is of shape(Nvec, Nvec)
. My best guess for this behavior is that vegas is trying to allocate memory for the covariance between each integrand, hence requiring a(Nvec**2, Nvec**2)
array.Is there a way to instruct Vegas integrators to not compute the covariance between all integrands? In principle, I do not require a rigorous error estimate of for these integrals, but I would like to share the integration grid between each of them. Below is an example cell from a JupyterNotebook where
Nvec=20
, producing an integration result of shape(20,20)
, andNvec=556
, producing the OOM traceback.Output is
The text was updated successfully, but these errors were encountered: