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

imdt-gc algorithm detailed control of threading #398

Open
venturellac opened this issue Feb 1, 2025 · 3 comments
Open

imdt-gc algorithm detailed control of threading #398

venturellac opened this issue Feb 1, 2025 · 3 comments
Labels
question Further information is requested

Comments

@venturellac
Copy link

I would like to use imtd-gc with metadynamics and optimizations carried out with energies and gradients from GFN2-xtb. I am wondering if it is possible to have more detailed control of the utilization of OMP threads. For example, I want to devote all my threads/cores to one energy/gradient calculator and run each metadynamics run in serial.

With my CREST 3.0.1, I notice that each metadynamics runs on a single thread (if I have 6 metadynamics trajectories to do, CREST will put each one on one thread). This is not ideal if I have a more expensive energy calculator than GFNFF. Maybe this can be configured somehow, but I cannot find details. Any help would be greatly appreciated!

@venturellac venturellac added the question Further information is requested label Feb 1, 2025
@pprcht
Copy link
Contributor

pprcht commented Feb 1, 2025

Nested parallelism in OMP, unfortunately, is quite the annoying thing. The code technically is prepped to implement what you describe, but getting it to compile and run is a whole other issue. The problems arise (at least in parts) because the "pure" OMP parts and the linear algebra OMP parts (like intels MKL) fail to properly communicate with each other in nested OMP mode. So far I always ran into some troubles when attempting this.
If you'd like me to, I can look into it again, but currently all threads are automatically chosen and distributed automatically with no manual option available.

@venturellac
Copy link
Author

Thank you for commenting on this - I just wanted to ensure I was using crest variables properly. Anyway, I believe this can be worked around by externally handling parallelism. For example, one can run independent xtb metadynamics runs in parallel, then subsequently run ensemble sorting and z matrix crossing in a separate calculation run.

@pprcht
Copy link
Contributor

pprcht commented Feb 1, 2025

Technically, yes. However, since we switched to tblite from xtb as the tight-binding backend in 3.0, we won't be pursuing subprocess implementations any further (with some temporary exceptions for QCG and MSREACT). Also, on top of the subprocess bookkeeping, such workaround would also require a similar thread handling infrastructure that is needed for the nested parallelism (which already exists in the latter case).

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

No branches or pull requests

2 participants