컴퓨터/Python
[Warning / Error] There appear to be 2 leaked semaphore objects to clean up at shutdown
랑슈
2019. 11. 9. 22:30
반응형
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/resource_tracker.py:203: UserWarning: resource_tracker: There appear to be 2 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
Python에서 쓰레드를 이용하는 코드를 짰는데, 실행해보니, 위와 같은 Warning 이 생기면서 프로그램이 죽었다.
사용한 CPU는 Intel Core2 Duo (2.66Ghz), 구형 CPU다 보니, 쓰레드가 몇개나 있는지 모르겠지만, 4개의 쓰레드만 사용하게 하면 에러가 사라졌다.
참고 URL :
https://discuss.pytorch.org/t/issue-with-multiprocessing-semaphore-tracking/22943
Issue with multiprocessing semaphore tracking
Hi I am facing an issue with semaphore tracking while using pytorch multiprocessing over multiple GPUs. I get the following warning message multiple number of times every time and it is slowing down the code execution substantially (8 times slower). /anaco
discuss.pytorch.org
반응형