Skip to content

Conversation

capric98
Copy link

  1. Manually set the iparm so that:

    • iparm(2)=103 to use an OMP version of fill-in reduce algorithm with L=10 optimization
    • iparm(6)=0 or 1 depends on overwrite b or not
    • iparm(35)=1 to use 0-based indexing, hence no need to add 1 for ia and ja
  2. Support overwrite_b parameter:

    • if b got an implicit copy in _check_b() (c_contiguous -> f_contiguous or b is not contiguous), or overwrite_b=True is explicitly provided by the user, however currently the ans array still need to be allocated (I change it to np.empty_like(b) to avoid a 0-fill overhead) because PARDISO will try to overwrite x with 0 if iparm(6)=1
    • removed return np.ascontiguousarray(x) in _call_pardiso(), in case user can benefit from keeping f_contiguous with overwrite_b=True or multiplicate ccontig matrix with fcontig matrix, etc.
  3. pytest result: 1 failed, 23 passed. There is a "ValueError: scipy.sparse does not support dtype float16." I guess it is not from my changes?

@capric98 capric98 changed the title [ENH] manually set iparm & support overwrite_b parameter ENH: manually set iparm & support overwrite_b parameter Jul 24, 2025
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

Successfully merging this pull request may close these issues.

1 participant