Skip to content

Document how to set Pardiso thread counts - #1803

Open
manduinca wants to merge 2 commits into
simpeg:mainfrom
manduinca:docs/pardiso-threads
Open

manduinca wants to merge 2 commits into
simpeg:mainfrom
manduinca:docs/pardiso-threads

Conversation

@manduinca

Copy link
Copy Markdown
Contributor

Summary

Add a how-to guide for setting Pardiso's thread count using solver_opts={"n_threads": ...} and link it from the user guide and solver selection guide.

PR Checklist

  • Added documentation with executable examples.
  • Built the HTML documentation with gallery execution disabled.
  • Executed both code blocks with real Pardiso on Linux x86_64 under emulation.

Reference issue

Closes #1730.

What does this implement/fix?

The guide includes a complete DC simulation, explains when SimPEG applies solver_opts, and demonstrates inspecting/changing the process-wide thread count via the solver's n_threads property. It explicitly notes that different Pardiso instances in one process do not have independent thread limits, as clarified in the issue discussion.

Additional information

Validation used the current SimPEG checkout with Python 3.12, pymatsolver 0.4.0 and pydiso 0.2.0 in an x86_64 container. Both examples passed, including a finite DC prediction and assertions showing the shared thread setting. The emulated environment used MKL_NUM_THREADS=2, OMP_WAIT_POLICY=PASSIVE, and KMP_BLOCKTIME=0.

sphinx-build -D plot_gallery=0 -b html docs <output> -j 2 completed successfully. The full documentation emits existing warnings/errors in unrelated API/release pages; the final incremental build emits none for the new guide or the modified solver-selection page. No simulation code is changed.

@codecov

codecov Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.85%. Comparing base (4bdcf2d) to head (b53df81).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1803   +/-   ##
=======================================
  Coverage   86.84%   86.85%           
=======================================
  Files         436      436           
  Lines       57952    57952           
  Branches     5460     5460           
=======================================
+ Hits        50330    50332    +2     
+ Misses       6186     6185    -1     
+ Partials     1436     1435    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

DOC: Add how to guide on setting number of threads in Pardiso solver

1 participant