EQcorrscan icon indicating copy to clipboard operation
EQcorrscan copied to clipboard

pytest fixtures in correlate_test alter omp threads

Open calum-chamberlain opened this issue 1 year ago • 0 comments

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.

calum-chamberlain avatar Apr 06 '23 04:04 calum-chamberlain