[W ParallelNative.cpp:229] Warning: Cannot set number of intraop threads after parallel work has started
andreped opened this issue · 1 comments
andreped commented
When testing the CLI on macOS, it seems like the lungmask might hang yielding this warning:
[W ParallelNative.cpp:229] Warning: Cannot set number of intraop threads after parallel work has started or after set_num_threads call when using native parallel backend (function set_num_threads)
This does not seem to crash the run, but it for sure hangs the process for quite some time.
andreped commented
A simple workaround is basically to just add this before the CLI:
OMP_NUM_THREADS=1 lungtumormask
Only seems to be an issue with macOS on some Python/PyTorch versions:
https://stackoverflow.com/a/64855500/17883656