I’m periodically sending between processes a tuple consisting a time.time() float and some pytorch tensors/variables via a torch.multiprocessing.queue.Queue(1) object.
queue.get() is in a while loop that immediately grabs tuple once it’s put on queue by other process.
PyTorch version:
'0.1.11+dfa2d26’
with no Cuda on default 8-core 2016 macbook pro.
When I use python’s default multiprocessing, no error occurs.
When I use torch.multiprocessing, this error occurs every ~10 minutes:
Traceback (most recent call last):
File “/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/queues.py”, line 241, in _feed
obj = ForkingPickler.dumps(obj)
File “/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/reduction.py”, line 50, in dumps
cls(buf, protocol).dump(obj)
File “/usr/local/lib/python3.5/site-packages/torch/multiprocessing/reductions.py”, line 108, in reduce_storage
metadata = storage.share_filename()
RuntimeError: unable to open shared memory object </torch_77083_582458219> in read-write mode at /private/var/folders/h6/8bw_02_n0vs0h0d3qr7w67m80000gn/T/pip-0_y0f7tx-build/torch/lib/TH/THAllocator.c:226