ktan8 / nanopore_telomere_basecall

14 stars 3 forks source link

RuntimeError: CUDA out of memory #5

Closed k-Vartika closed 2 years ago

k-Vartika commented 2 years ago

Hi, I am encountering the following error when running 3_basecall_problematic_reads step on WSL2 (windows 10, 8 Gb RAM).

RuntimeError: CUDA out of memory. Tried to allocate 1000.00 MiB (GPU 0; 2.00 GiB total capacity; 1.23 GiB already allocated; 0 bytes free; 1.24 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I know this error is caused by bonito in this step, but if you know/could suggest any solution to overcome this problem, it would be of great help.

ktan8 commented 2 years ago

Hi,

It seems to me that the GPU that you are using has a total capacity of 2GB of memory, but CUDA has ran out memory when trying to load the model.

I can't remember precisely how much memory Bonito requires on the GPU, but it is potentially more than 2GB (i.e. more than the GPU you have). So you might need to find another GPU with a larger memory size to run Bonito.

If Bonito requires less than 2GB of memory on the GPU, then you can try trying up the memory on the GPU as noted by "1.23 GiB already allocated" in your error log. That might help you run Bonito.

Hope this helps.