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 the output of L U matrix to a file? #66

Open
ztdepztdep opened this issue Oct 20, 2022 · 1 comment
Open

Does it support the output of L U matrix to a file? #66

ztdepztdep opened this issue Oct 20, 2022 · 1 comment

Comments

@ztdepztdep
Copy link

I want to transfer the L and U matrix to the gpu , does superlu support the output of L and U matrix to a file?

@liuyangzhuan
Copy link
Collaborator

I'm not sure how do you plan to use the L and U. If you want to work with CSR or triplet formats:

  1. You can output the L factor to a file with the triplet format by using
    https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L675
    but use line 755 instead of line 753.
  2. You can convert the L factor to CSR or triplet using https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L815
    https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1075
    but need to make sure you only use 1 MPI to call superlu_dist
  3. You can modify
    https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/dutil_dist.c#L1229
    to generate CSR/triplet for the U factor as well.

If you can work with the supernodal representation, they can already accessed from GPU, for example using
https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/pdgssvx.c#L1894
https://github.com/xiaoyeli/superlu_dist/blob/324d65fced6ce8abf0eb900223cba0207d538db7/SRC/pdgssvx.c#L1448

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

2 participants