DataParallel gave RuntimeError: can't start new thread with the ImageNet dataset.
I tired with 4 x V100 (cuda 10) in GCP with the DCGAN example code.
It was Python 3.7.1 and torch 1.0.1.post2.
Without DataParallel, training has no problem.
Error report was like below:
File “/opt/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py”, line 143, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File “/opt/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py”, line 153, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File “/opt/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py”, line 73, in parallel_apply
thread.start()
File “/opt/anaconda3/lib/python3.7/threading.py”, line 847, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
any idea will be very helpful!.
thanks.