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

parallelization issue for simple MLP dynamics #90

Open
gtusha opened this issue Mar 26, 2024 · 2 comments
Open

parallelization issue for simple MLP dynamics #90

gtusha opened this issue Mar 26, 2024 · 2 comments

Comments

@gtusha
Copy link

gtusha commented Mar 26, 2024

Hello!
I was playing around with the parallelization of MLP-MDs in mlp-train.
I have used the mlptrain/sampling/tests/test_umbrella.py as a template for my tests. I have notinced that each window in the umbrella sampling cannot run on more than one core (check on my output.log). Am I missing something?

I am including the scripts used in my test.
test.zip
data.zip

Thank you for your time!

Cheers,
Gers

@vitartas
Copy link
Contributor

Hi Gers,

I believe this is correct. As far as I understand the ASE MD code which is called in the run_mlp_md() routine does not benefit from additional OMP threads. However, it might be possible for the ASE calculator (depending on the calculator used) to use multiple OMP threads, but this is unlikely, as can be seen in your test. For this reason I have set kwargs["n_cores"] = 1 in the _run_individual_window() routine in umbrella.py. Therefore, it might be a good idea to set OMP_NUM_THREADS to 1 in run_mlp_md routine in the future versions of the mlp-train code.

Because of this, to fully utilize all the available cores, the number of windows used in umbrella sampling should match the number of cores available.

Best,
Valdas

@gtusha
Copy link
Author

gtusha commented Mar 29, 2024

Hi Valdas!
Thank you for the thorough and quick answer.

Cheers,
Gers

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

2 participants