STRUMPACK icon indicating copy to clipboard operation
STRUMPACK copied to clipboard

Does it support complex number

Open ztdepztdep opened this issue 3 years ago • 8 comments

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

ztdepztdep avatar Sep 30 '22 10:09 ztdepztdep

You need to also pass A and x as complex.

pghysels avatar Sep 30 '22 16:09 pghysels

You need to also pass A and x as complex.

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

ztdepztdep avatar Sep 30 '22 23:09 ztdepztdep

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

pghysels avatar Sep 30 '22 23:09 pghysels

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.

xiaoyeli avatar Sep 30 '22 23:09 xiaoyeli

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 avatar Oct 01 '22 00:10 ztdepztdep

I didn't find the cuda example in the example directory. is it still in test ?

| | @.*** | | @.*** |

---- Replied Message ---- | From | X. Sherry @.> | | Date | 10/01/2022 07:56 | | To | @.> | | Cc | @.@.> | | Subject | Re: [pghysels/STRUMPACK] Does it support complex number (Issue #77) |

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.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ztdepztdep avatar Oct 05 '22 11:10 ztdepztdep

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 avatar Oct 05 '22 17:10 pghysels

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

pghysels avatar Oct 07 '22 20:10 pghysels