crowsonkb / style_transfer

Data-parallel image stylization using Caffe.
MIT License
113 stars 14 forks source link

no space left on device #7

Closed rayset closed 7 years ago

rayset commented 7 years ago

with the highest resolutions the program tends to fill all /run/shm. the usage goes on as iterations go up. at a certain point it launches this pytho io error :''no space left on device'' and stops.

is this avoidable/how it should work? to do a 2000px image it takes around 4-5gb for the standard iterations. the only difference I have in my setup (ubuntu 14.04) is atlas instead of MKL, and the usage of python2.

why does it spawn so many files in there? Isn't linux supposed to get rid of them on its own?

the strange thing is that if the program saturates that partition, it will refuse to start again with the same error untill I reboot the system.

crowsonkb commented 7 years ago

/run/shm is a RAM disk that's used for interprocess communication, in this case between style_transfer and its worker processes. You can just delete them after style_transfer is done, but the shared memory for a given iteration is supposed to get removed as soon as the process is done with that iteration. Let me go make sure I'm deleting them...

rayset commented 7 years ago

I read about what it is supposed to be, but deleting the content in the folder (select them all+ hit delete button) doesn't actually free the space displayed in df -h. which is kinda weird.

crowsonkb commented 7 years ago

This is fixed now. I never noticed it using up memory before because I tended to use cloud machines with lots of memory that were often rebooted for large renders. I missed a call to SharedNDArray.unlink(): https://github.com/crowsonkb/style_transfer/commit/2e953f25dbecee3d05c669e7e47bc4d6883a4f36