[General boards] [Fall 2018 courses] [Summer 2018 courses] [Winter 2018 courses] [Older or newer terms]

Std::bad_alloc when trying to run 2b in labs[FIXED]


I’m using BA3185 to run 2b since I can’t run it on my own machine. I run the command python3.6 model.py as I was told and with the given batch_size of 2048 i get a CUDA_ERROR_OUT_OF_MEMORY error. I don’t get the error when I reduce the batch_size, but then I run into different errors such as segmentation fault.

What should I do? What can I use for batch_size? As far as I know the error I’m getting means that the machine is running out of memory. I will try it on the other labs now but are there any different fixes to this problem?

Thank you very much for your help.


export CUDA_VISIBLE_DEVICES=""; seems to have fixed the problem for now.


Yes, that’ll disable GPU usage. It’ll go a bit slower, but frankly the GPU isn’t necessary for this assignment.