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 setup prevents mindlessgen from doing anything #119

Closed
marcelmbn opened this issue Jan 30, 2025 · 4 comments · Fixed by #122
Closed

Parallelization setup prevents mindlessgen from doing anything #119

marcelmbn opened this issue Jan 30, 2025 · 4 comments · Fixed by #122
Assignees
Labels
algorithm Related to the back-end algorithm for generating the mindless molecules. bug Something isn't working

Comments

@marcelmbn
Copy link
Member

marcelmbn commented Jan 30, 2025

Parallelization setup with dead end

The following setup leads to mindlessgen waiting forever for free cores (seemingly). What is definitely happening is that mindlessgen is stuck at this point for forever and htop does not show any activity.

parallelization_problem.md

@marcelmbn marcelmbn added bug Something isn't working algorithm Related to the back-end algorithm for generating the mindless molecules. labels Jan 30, 2025
@marcelmbn
Copy link
Member Author

marcelmbn commented Jan 30, 2025

Can also be reproduced with this minimal working example:

[general]
# > Verbosity level defining the printout: Options: -1 = super-silent, 0 = silent, 1 = default, 2 = verbose, 3 = debug
verbosity = 1
# > Number of parallel processes to use. Corresponds to the number of physical CPU cores used. Options: <int>
parallel = 4
max_cycles = 200
# > Number of molecules to generate. Options: <int>
num_molecules = 4
# > Do post-processing after the optimization with another engine (e.g., `orca`). Default: false. Options: <bool>
postprocess = true
# > Switch molecule structure XYZ writing on and off. Default: true. Options: <bool>
write_xyz = true

[generate]
# > Minimum number of atoms in the generated molecule. Options: <int>
min_num_atoms = 3
# > Maximum number of atoms in the generated molecule. Options: <int>
max_num_atoms = 5

[refine]
engine = "xtb"
hlgap = 0.5
ncores = 2

[postprocess]
engine = "orca"
optimize = true
opt_cycles = 3
ncores = 4

@lmseidler, could you look into this? According to htop in the initial seconds, the refinement step (here with xtb) does still do something, but then no process is allowed to start anymore. Probably, postprocess wants to run with 4 cores, but only 2 are available. As it happened with both turbomole and orca, I'm quite sure that it's not a problem with the QM programs.
Could it be a problem with the logic in setup_blocks (https://github.com/grimme-lab/MindlessGen/blob/main/src/mindlessgen/prog/parallel.py#L44)?

@lmseidler
Copy link
Member

Please try with the parallelization-setup branch whether this works now. I made a small mistake in the setup logic.

@marcelmbn
Copy link
Member Author

Please try with the parallelization-setup branch whether this works now. I made a small mistake in the setup logic.

If that doesn't complicate things too much, please just open a PR so that I can checkout the branch from there and we can directly merge what was tested.

@lmseidler lmseidler linked a pull request Jan 30, 2025 that will close this issue
@marcelmbn
Copy link
Member Author

Found the branch and tried it. Seems to work, great!

If you open the PR, we can quickly merge this, IMHO. Could you add maybe two sentences on what was wrong before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithm Related to the back-end algorithm for generating the mindless molecules. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants