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

Does it support complex number #77

Open
ztdepztdep opened this issue Sep 30, 2022 · 8 comments
Open

Does it support complex number #77

ztdepztdep opened this issue Sep 30, 2022 · 8 comments

Comments

@ztdepztdep
Copy link

I want to use STRUMPACK to solve Ax=b, where b is complex vector. it seems strumpack doesn't support it?

@pghysels
Copy link
Owner

You need to also pass A and x as complex.

@ztdepztdep
Copy link
Author

You need to also pass A and x as complex.

the matrix A is real, only the x and rhs are complex

@pghysels
Copy link
Owner

That is not supported, you need to also treat A as complex.

@xiaoyeli
Copy link
Collaborator

If only b (and x) are complex, it's more efficient to solve 2 real linear systems:
A x_r = b_r (real part of b)
A x_i = b_i (imaginary part of b)
Then, the final solution is x = x_r + i * x_i

Going into complex arithmetic is more expensive.

@ztdepztdep
Copy link
Author

ztdepztdep commented Oct 1, 2022

If only b (and x) are complex, it's more efficient to solve 2 real linear systems: A x_r = b_r (real part of b) A x_i = b_i (imaginary part of b) Then, the final solution is x = x_r + i * x_i

Going into complex arithmetic is more expensive.

Thank you very much. If matrix A is symmetry but not SPD, do we have a special setting for this condition? I use the defaults seeting
" CSPOptions opts;
opts.rel_tol = 1e-8;
opts.type = SP_TYPE_HSS;
"

@ztdepztdep
Copy link
Author

ztdepztdep commented Oct 5, 2022 via email

@pghysels
Copy link
Owner

pghysels commented Oct 5, 2022

The solver will off-load work to the GPU using CUDA. But the interface takes all input/output matrix and vectors in host/CPU memory. So there is no CUDA code in the examples.
You need to configure strumpack through CMake to use CUDA, and if you want MPI code and GPU support, you also need to enable SLATE, see here https://portal.nersc.gov/project/sparse/strumpack/master/installation.html .
To enable/disable GPU offloading in the solver, see here: https://portal.nersc.gov/project/sparse/strumpack/master/GPU_Support.html

@pghysels
Copy link
Owner

pghysels commented Oct 7, 2022

We do not have special support for symmetry.
Also note that GPU off-loading is not supported when HSS is enabled.

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