Are you using multiprocessing? I’ve run into deadlock issues with multiprocessing and OpenMP. Here are a few things to try:


Try adding import multprocessing; multiprocessing.set_start_method('spawn') at the very beginning of your program. The default (“fork”) can have problems with threads.


Try running with the environment variable OMP_NUM_THREADS=1. This may be slower, but I think should avoid the OpenMP deadlocks.