Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use purely CPU for CNN? #234

Open
AquifersBSIM opened this issue Nov 9, 2023 · 7 comments
Open

Is it possible to use purely CPU for CNN? #234

AquifersBSIM opened this issue Nov 9, 2023 · 7 comments

Comments

@AquifersBSIM
Copy link

Issue summary

Just a quick question as per the title.

  1. Is it rather possible to use purely CPU for CNN?
  2. If yes, what would be the repercussions (will it be slower? faster? or will the produced results not be as good as to when GPU was used instead)

Thank you in advance!

Steps to reproduce

Your system configuration

Operating system:
Compiler:
CUDA version (if applicable):
CUDNN version (if applicable):
Python version:

@dkoes
Copy link
Contributor

dkoes commented Nov 9, 2023

Yes, it will be slower. Timings are in the gnina paper https://jcheminf.biomedcentral.com/articles/10.1186/s13321-021-00522-2

@Jnelen
Copy link

Jnelen commented Nov 25, 2023

Yes, it will be slower. Timings are in the gnina paper https://jcheminf.biomedcentral.com/articles/10.1186/s13321-021-00522-2

I understand not using a GPU will impact the overall docking time by a lot. However, can multiple cpu-cores still help to speed up the CNN scoring? Or can multiple cores only accelerate the initial steps of pose generation? If so, I suppose it would be more efficient to run 4 separate gnina docking calculations on 1 core, instead of 1 gnina calculation using 4 cpu cores?

@dkoes
Copy link
Contributor

dkoes commented Nov 25, 2023

Presumably you are doing high throughput docking (docking a lot of ligands) in which case running all your gnina jobs on 1 or 2 cores should give you the best throughput. This lets your job scheduler load balance the jobs and schedule your jobs on nodes with only a few cores available.

The technical reason to request 2 cores is your scheduler (i.e., SLURM) may count hyperthread contexts as cores.

@Jnelen
Copy link

Jnelen commented Nov 25, 2023

Presumably you are doing high throughput docking (docking a lot of ligands) in which case running all your gnina jobs on 1 or 2 cores should give you the best throughput. This lets your job scheduler load balance the jobs and schedule your jobs on nodes with only a few cores available.

The technical reason to request 2 cores is your scheduler (i.e., SLURM) may count hyperthread contexts as cores.

I am indeed using SLURM. I haven't tried running gnina with 2 cores per job before, but I might play around with that. Thanks for the suggestion! To understand the reasoning slightly better however, what exactly do you mean with hyperthread contexts here?

@dkoes
Copy link
Contributor

dkoes commented Nov 27, 2023

Modern processors can run more simultaneous threads than they have cores, see https://www.intel.com/content/www/us/en/gaming/resources/hyper-threading.html

This is only relevant if you have hyperthreading enabled on your cluster nodes.

@Jnelen
Copy link

Jnelen commented Nov 27, 2023

Modern processors can run more simultaneous threads than they have cores, see https://www.intel.com/content/www/us/en/gaming/resources/hyper-threading.html

This is only relevant if you have hyperthreading enabled on your cluster nodes.

Thanks a lot for elaborating! I was familiar with the concept of hyperthreading (on desktops at least), but wasn't aware of its (potential) relevance in the context of HPC clusters. Thanks for pointing that out, I really appreciate the insight!

@AquifersBSIM
Copy link
Author

Thank you so much @dkoes for the insightful elaboration! Additionally, thank you so much @Jnelen for contributing valuable insights that enhances the discussion! :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants