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

bugfix/lsf-gpu-typo #453

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to Merlin will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Typo in `batch.py` that caused lsf launches to fail (`ALL_SGPUS` changed to `ALL_GPUS`)

## [1.11.0]
### Added
- New reserved variable:
Expand Down
6 changes: 5 additions & 1 deletion merlin/study/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def construct_scheduler_legend(parsed_batch: Dict, nodes: int) -> Dict:
"lsf": {
"check cmd": ["jsrun", "--help"],
"expected check output": b"jsrun",
"launch": f"jsrun -a 1 -c ALL_CPUS -g ALL_SGPUS --bind=none -n {nodes}",
"launch": f"jsrun -a 1 -c ALL_CPUS -g ALL_GPUS --bind=none -n {nodes}",
},
# pbs is mainly a placeholder in case a user wants to try it (we don't have it at the lab so it's mostly untested)
"pbs": {
Expand Down Expand Up @@ -335,12 +335,16 @@ def construct_worker_launch_command(parsed_batch: Dict, nodes: int) -> str:
scheduler_legend: Dict = construct_scheduler_legend(parsed_batch, nodes)
workload_manager: str = get_batch_type(scheduler_legend)

LOG.debug(f"parsed_batch: {parsed_batch}")

if parsed_batch["btype"] == "pbs" and workload_manager == parsed_batch["btype"]:
raise TypeError("The PBS scheduler is only enabled for 'batch: flux' type")

if parsed_batch["btype"] == "slurm" and workload_manager not in ("lsf", "flux", "pbs"):
workload_manager = "slurm"

LOG.debug(f"workload_manager: {workload_manager}")

try:
launch_command = scheduler_legend[workload_manager]["launch"]
except KeyError as e: # pylint: disable=C0103
Expand Down
Loading