nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

batch size and GPU use #500

Closed CorentinEscobar closed 3 months ago

CorentinEscobar commented 3 months ago

Hi,

I use medaka with a GPU but I have an error (see attached file). I tried to run medaka with an other pc without GPU (so with CPU) and it's function normally. I want to know what this batch size consists of ? What if it has an impact on my final output when I decrease the batch size to make it work ? Or else, is it possible to run medaka on the CPU (and not the GPU) ? The GPU is already fully used for basecalling.

Thanks for you help

Corentin

Logging See attached file sal25_batch_size_100.log

Environment (if you do not have a GPU, write No GPU):

cjw85 commented 3 months ago

The error:

OOM when allocating tensor with shape[1032651776] and type uint8 on

suggests the GPU has run out of memory? Were you using the GPU for basecalling at the same time?

You can prevent medaka from using the GPU by exporting a CUDA environment variable before running medaka:

export CUDA_VISIBLE_DEVICES=""

Alternatively you can pip install medaka-cpu to install a version of medaka that has GPU usage disabled.

CorentinEscobar commented 3 months ago

Ok thank you ! I tested running medaka during basecalling but also alone. But if I export the CUDA environment variable I won't be able to do basecalling (with GPU) at the same time ?

cjw85 commented 3 months ago

The variable will only apply to processes running in the shell where it is set.

CorentinEscobar commented 3 months ago

it works ! Thanks a lot !