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

ValueError: Too large work array required -- computation cannot be performed with standard 32-bit LAPACK #334

Open
MaartenDie opened this issue Aug 15, 2022 · 7 comments

Comments

@MaartenDie
Copy link

MaartenDie commented Aug 15, 2022

When I used pyamg's multigrid ruge_stuben_solver I get the mentioned error. The strange thing, for one matrix A the solver works. However, when I alter the matrix along the middle diagonal I get the error. Is this a known issue?

Thanks!

Maarten

@lukeolson
Copy link
Member

lukeolson commented Aug 15, 2022

Not a known issue as far as I know. To help track it down, do you have a small example?

Does pyamg.test() pass?

Also, some package info would help:

import sys, numpy, scipy, pyamg
print(sys.version, numpy.__version__, scipy.__version__,  pyamg.__version__, sep='\n')

@MaartenDie
Copy link
Author

Thanks for the quick reply!

Unfortunately it's not possible to provide a small example. When I calculate the same problem with a discretisation resulting in a matrix of 6000x6000 the solver works. When I increase the discretisation with a factor 2 resulting in a matrix of 12000x12000 I get the former mentioned error. Next week I'm going to try to reduce the code and provide a simple, but unfortunately large, example. In the mean time I did find a work around, but I'm still curious about the error. Thanks for the help.

@bensworth
Copy link
Collaborator

How big is your coarsest matrix? In particular are you doing two-level? That is the only place I can think of LAPACK throwing an error in RS.

If not, have you used pdb before? Would be useful if you stepped through the code so we knew more specifically where the error happens. I don't recall anywhere in RS that we should be using LAPACK aside from potentially a dense solve on the coarsest level.

@lukeolson
Copy link
Member

lukeolson commented Aug 18, 2022

That's my guess too. As a start, can you paste the pyamg call that throws the error?

Something like pyamg.ruge_stuben_solver(... and ml.solve(...

@MaartenDie
Copy link
Author

The coarsest matrix is a pentadiagonal matrix Poisson matrix with some empty elements. The other diagonals are sparse. The large matrix is 12000x12000, here the error came up. The same problem for 6000x6000 did work. A different problem with a different values on the first diagonal on a matrix of 12000x12000 did work. The final call I made was:

ml = pyamg.ruge_stuben_solver(temp_LHS)
x_new = ml.solve(temp_RHS, tol=1e-6, x0=x_old)

I have only used pdb in my thesis on which I'm working right now. I assume two level means the level on which the V-cycle happens. I do no specify a level in a call, but I think the error happens on the fifth level. The program I use is called Transient.py, the exact error I get is in the document
slurm-499260.txt

Thanks in advance!

@lukeolson
Copy link
Member

Ok, this is helpful. I'll try to reproduce ... it does look like a coarse-level issue. Can you provide

import sys, numpy, scipy, pyamg
print(sys.version, numpy.__version__, scipy.__version__,  pyamg.__version__, sep='\n')

@MaartenDie
Copy link
Author

The response is the following:

3.8.12 (default, Jun 16 2022, 10:30:18)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
1.19.5
1.9.0
4.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants