Skip to content

Commit 3f1289e

Browse files
lmseidlermarcelmbn
andauthored
parallelization block fixed setup (#122)
* parallelization block fixed setup using mincores = max(...) instead of min(...) * adapt CHANGELOG.md accordingly Signed-off-by: Marcel Müller <[email protected]> --------- Signed-off-by: Marcel Müller <[email protected]> Co-authored-by: Marcel Müller <[email protected]>
1 parent f520845 commit 3f1289e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- version string is now correctly formatted and printed
2626
- precision (# significant digits) of the coordinate files (`get_coord_str` and `get_xyz_str`) increased from 7 to 14
2727
- catch encoding errors when reading `Turbomole._run_opt` output files
28+
- bug in the parallelization, leading to a dead `mindlessgen` execution as a consequence of not allowing the required number of cores
2829

2930
## [0.5.0] - 2024-12-16
3031
### Changed

src/mindlessgen/generator/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def generator(config: ConfigManager) -> tuple[list[Molecule], int]:
124124
blocks = setup_blocks(
125125
num_cores,
126126
config.general.num_molecules,
127-
min(config.refine.ncores, config.postprocess.ncores),
127+
max(config.refine.ncores, config.postprocess.ncores),
128128
)
129129
blocks.sort(key=lambda x: x.ncores)
130130

src/mindlessgen/prog/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def setup_blocks(ncores: int, num_molecules: int, mincores: int) -> list[Block]:
4747
# Maximum and minimum number of parallel processes possible
4848
maxcores = ncores
4949
maxprocs = max(1, ncores // mincores)
50-
minprocs = max(1, ncores // maxcores)
50+
minprocs = 1
5151

5252
# Distribute number of molecules among blocks
5353
# First (if possible) create the maximum number of parallel blocks (maxprocs) and distribute as many molecules as possible

0 commit comments

Comments
 (0)