Skip to content

pytest fixtures in correlate_test alter omp threads #543

Open
@calum-chamberlain

Description

@calum-chamberlain

Describe the bug
I don't understand why, but when running py.test eqcorrscan.tests.correlate_test.py::TestStreamCorrelateFunctions the first test (or any single test selected) runs fine, but following tests raise warnings from the C code about more threads selected than available - it appears that following the first test, omp_get_max_threads() returns 1.

To Reproduce

py.test eqcorrscan.tests.correlate_test.py::TestStreamCorrelateFunctions

Expected behavior
Python testing should not alter the behaviour of omp_get_max_threads...

Desktop (please complete the following information):

  • Operating System: Manjaro (rolling, Gnome build 43.4)
  • Python version: 3.9.12
  • EQcorrscan version: 0.4.4

Additional context
This isn't something that happened after re-enabling outer core threading and is reproducible on the current master.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions