You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now i don't think any of those are supported or successfully tested by anyone although SuperLU supports of all this (at least with the expert driver). The only relevant scipy-user discussion i found is this:
I'm sure you are the first to try to use the Python wrapper for this
purpose, so the answers to your two questions here are not known.
If the matter in using SuperLU is simply to pass in this flag, then it
will probably work, but if you also need to pass in additional data
telling SuperLU about the previous permutation, then it probably won't
work out of the box.
Quick glance at the code
_superluobject.c seems not support getters for any error-information
I don't think there is a way to pass perm_c (as indicated in above citation)
Failed test
As there (imho) is no way of passing perm_c or any other internal states, i dropped approaches based on splu and looked for the next inner-level. Futhermore i don't see any kind of usage where i can hold my factorization-object to do non-complete (from scratch) work.
I tried to address A+B with using the low-level access to _superlu.gstrf with the assumption, internally perm c will be reused (indicated by code).
This sometimes gives a segfault (not debugged more detailed) or runs for a quite some time (which is not expected!).
Edit: on a second look, my approach does not make any sense as i do not reuse any superLU-object (internal ones get probably destroyed). In this case it might be possible that this is just calling superLU in any mode expecting some given perm_c which is not available.
Code:
importnumpyasnpimportscipy.sparseasspimportscipy.sparse.linalgassplinnp.random.seed(0)
A=sp.random(6, 6, density=0.5)
print('Classic API')
lhs_fact=splin.splu(A)
print(lhs_fact.L[:10])
print('---')
fromscipy.sparse.linalg.dsolveimport_superluA_=sp.csc_matrix(A)
A_.sort_indices()
A_=A_.asfptype() # upcast to a floating point formatN=A.shape[0]
res=_superlu.gstrf(N, A_.nnz, A_.data, A_.indices, A_.indptr,
ilu=False)
print('Low-level usage')
print(res.L[:10])
print('---')
print('Low-level usage with alternative ColPrerm option')
_options=dict(ColPerm='NATURAL')
res=_superlu.gstrf(N, A_.nnz, A_.data, A_.indices, A_.indptr,
ilu=False, options=_options)
print(res.L[:10])
print('---')
print('Low-level usage with Fact=SamePattern')
_options=dict(Fact='SamePattern')
res=_superlu.gstrf(N, A_.nnz, A_.data, A_.indices, A_.indptr,
ilu=False, options=_options)
print(res.L[:10])
print('---')
The general idea is to save computation in some algorithmic environments by reusing previous information, which A, B, C might achieve. This is for the moment only a theoretical-idea, but i think it's worthwile to check out!
For some more aggressive reuse, one should read out D: BERR (errors) and act according to these (SuperLU manual 1.3.8).
In my case, although other things are of higher priority right now, i'm implementing an Interior-point method for Convex Quadratic Programming (with the goal of adding it to scipy).
Without detailed checking, i expect supporting the above to have consequences at least for Matt's IPM for LPs. He also asked for C in the past (issue #7700).
Support for perm_c could also be used to incorporate METIS (without some complex intertwined core) when license-usage is not a problem.
The text was updated successfully, but these errors were encountered:
Interest
I'm interested in SuperLUs support for:
Fact='SamePattern'
Fact='SamePattern SameRowPerm'
ColPerm='MY_PERMC'
Additionally i'm interested in:
Previous scipy-related discussions
Now i don't think any of those are supported or successfully tested by anyone although SuperLU supports of all this (at least with the expert driver). The only relevant scipy-user discussion i found is this:
Quick glance at the code
perm_c
(as indicated in above citation)Failed test
As there (imho) is no way of passing
perm_c
or any other internal states, i dropped approaches based onsplu
and looked for the next inner-level. Futhermore i don't see any kind of usage where i can hold my factorization-object to do non-complete (from scratch) work.I tried to address A+B with using the low-level access to
_superlu.gstrf
with the assumption, internallyperm c
will be reused (indicated by code).This sometimes gives a segfault (not debugged more detailed) or runs for a quite some time (which is not expected!).
Edit: on a second look, my approach does not make any sense as i do not reuse any superLU-object (internal ones get probably destroyed). In this case it might be possible that this is just calling superLU in any mode expecting some given
perm_c
which is not available.Code:
Output:
General use-case
The general idea is to save computation in some algorithmic environments by reusing previous information, which A, B, C might achieve. This is for the moment only a theoretical-idea, but i think it's worthwile to check out!
For some more aggressive reuse, one should read out D: BERR (errors) and act according to these (SuperLU manual 1.3.8).
In my case, although other things are of higher priority right now, i'm implementing an Interior-point method for Convex Quadratic Programming (with the goal of adding it to scipy).
Without detailed checking, i expect supporting the above to have consequences at least for Matt's IPM for LPs. He also asked for C in the past (issue #7700).
Support for
perm_c
could also be used to incorporate METIS (without some complex intertwined core) when license-usage is not a problem.The text was updated successfully, but these errors were encountered: