jessieren / DeepVirFinder

Identifying viruses from metagenomic data by deep learning
Other
116 stars 32 forks source link

program uses more cores than specified #4

Closed snayfach closed 3 years ago

snayfach commented 5 years ago

I've noticed that by default DVF uses multiple cores (up to 20 on my machine) and that the flag -c or --core does not change this behavior. Do you know why this might be happening?

bsiranosian commented 4 years ago

This was really confusing to me as well, but disabling multiprocessing completely still used all my cpus. Turns out the theano backend to keras automatically uses all available cores for the internal matrix operations.

For a fix: http://deeplearning.net/software/theano/tutorial/multi_cores.html or just export OMP_NUM_THREADS=4 to get max 4 threaded operation