Sometimes waitpid() will get a return value that is not a pid of a running task, causing KeyError.
Traceback (most recent call last):
File "./parallel_test.py", line 52, in <module>
main()
File "./parallel_test.py", line 42, in main
runtime = runParallel(i)
File "./parallel_test.py", line 25, in runParallel
runner.run()
File "/localHDD/music960633/DSnP/DSnP_grading/py/utils/task_runner.py", line 70, in run
self.waitUntilLessThan(self.parallel_num)
File "/localHDD/music960633/DSnP/DSnP_grading/py/utils/task_runner.py", line 80, in waitUntilLessThan
name, task = self.running_task.pop(pid)
KeyError: 12956
Sometimes waitpid() will get a return value that is not a pid of a running task, causing KeyError.