Skip to content

Tests don't constrain solver thread count #718

@DLWoodruff

Description

@DLWoodruff

Most pytest test cases instantiate a Pyomo solver (cplex / gurobi / xpress) and leave the thread count at the solver's default — which on modern CPUs means each solve fans out to all physical cores. With many tests running in sequence (and several pytest processes in CI), this saturates the host, slows the suite, and makes test timings noisy on shared runners.

Suggested fix: set Threads=1 (or the per-solver equivalent) wherever tests construct a solver — most centrally in mpisppy/tests/utils.py::get_solver.

Out of scope: production code paths (those should keep solver-thread tuning configurable; this is only about the test environment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions