Very strange DataLoader Error - Simplified code inside

Unfortunately yes, I get the same error I mentioned in the first post.

I found several other posts here and on github with a similar problem:
https://github.com/facebookresearch/maskrcnn-benchmark/issues/103
https://discuss.pytorch.org/t/runtimeerror-unable-to-open-shared-memory-object/22641
https://github.com/pytorch/pytorch/issues/2706
https://github.com/pytorch/pytorch/issues/2926

In all posts there is no apparent solution besides either turning off the multiprocessing by setting num_workers to 0 or suggestion to increase shared memory.

But I already tried increasing shared memory and it didn’t help, there are probably different methods of increasing shared memory and if anyone will suggest some particular steps I will happily try additional methods.

Though, the workstation hardware and software were set up with default configuration so I’m not sure why I will get this error while others don’t. Also, if I have this problem with the default setup other might have the same error (which is supported by the various post I’ve linked earlier).

PS - it might be relevant that I’m dual booting windows with linux. The first OS was windows and later I added linux. The code is running on linux.

EDIT: it was fixed by simply increasing limit of opened files (although it was one of the first solutions I tried, probably didn’t try hard enough). It was suggested in the github issue page: https://github.com/pytorch/pytorch/issues/14768

1 Like