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

OpenMP Default max cap #8

Open
arthurd2 opened this issue Jul 23, 2020 · 3 comments
Open

OpenMP Default max cap #8

arthurd2 opened this issue Jul 23, 2020 · 3 comments

Comments

@arthurd2
Copy link

Hi, first of all, thanks for docker image, is quite handy!
Would be possible to increase the GMX_OPENMP_MAX_THREADS from 64 to 512 by default?
That would help a lot user with Phi processors.
Thanks!

@tbugfinder
Copy link
Contributor

Hi @arthurd2,

could you kindly elaborate (for me) your request little deeper although this isn't the gmx-users list.
From the gromacs page I copied:

-ntomp
The total number of OpenMP threads per rank to start. The default, 0, will start one thread on each available core. Alternatively, mdrun will honor the appropriate system environment variable (e.g. OMP_NUM_THREADS) if set. Note that the maximum number of OpenMP threads (per rank) is, for efficiency reasons, limited to 64. While it is rarely beneficial to use a number of threads higher than this, the GMX_OPENMP_MAX_THREADS CMake variable can be used to increase the limit.

Currently the build repo doesn't include this parameter.
https://github.com/bioexcel/gromacs-docker-container-maker/search?q=GMX_OPENMP_MAX_THREADS&unscoped_q=GMX_OPENMP_MAX_THREADS

Thanks

@arthurd2
Copy link
Author

arthurd2 commented Sep 18, 2020

Hi @tbugfinder ,
We're currently using a server with Xeon Phi processor, that gives us 572 cores of pure joy.
As far I understood, the -ntomp has this max limit of 64 process, even if we set it to 0.
And the only way to change that is changing the GMX_OPENMP_MAX_THREADS
Am I wrong?

@mabraham
Copy link
Contributor

It's technically possible to do this, but the way mdrun uses OpenMP means this approach will not perform. It might even be worse than a single core of Xeon Phi :-) Treat it like a normal CPU and run with hybrid MPI and OpenMP, with a small number of OpenMP threads per rank (e.g. 2 or 4). Also, while you have 512 hardware threads, those are not physical cores, and it is very likely that GROMACS will do best using only one or two hardware threads per physical core.

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