Skip to content

Commit

Permalink
Merge pull request #19 from ml-evs/develop
Browse files Browse the repository at this point in the history
Fix name for `ntasks` in slurm template
  • Loading branch information
davidwaroquiers authored Jul 14, 2023
2 parents 28edf7e + a3c7c00 commit fbb2060
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qtoolkit/io/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ def _parse_scontrol_cmd_output(self, stdout):
def _get_jobs_list_cmd(
self, job_ids: list[str] | None = None, user: str | None = None
) -> str:

if user and job_ids:
raise ValueError("Cannot query by user and job(s) in SLURM")

Expand Down Expand Up @@ -394,7 +393,6 @@ def parse_jobs_list_output(self, exit_code, stdout, stderr) -> list[QJob]:
jobs_list = []
for data in jobdata_raw:
if len(data) != num_fields:

msg = f"Wrong number of fields. Found {len(jobdata_raw)}, expected {num_fields}"
# TODO should this raise or just continue? and should there be
# a logging of the errors?
Expand Down Expand Up @@ -557,11 +555,11 @@ def _convert_qresources(self, resources: QResources) -> dict:

nodes, processes, processes_per_node = resources.get_processes_distribution()
if processes:
header_dict["number_of_tasks"] = processes
header_dict["ntasks"] = processes
if processes_per_node:
header_dict["ntasks_per_node"] = processes_per_node
if nodes:
header_dict["number_of_nodes"] = nodes
header_dict["nodes"] = nodes

if resources.threads_per_process:
header_dict["cpus_per_task"] = resources.threads_per_process
Expand Down

0 comments on commit fbb2060

Please sign in to comment.