Skip to content

Commit 966ccd7

Browse files
authored
Merge pull request #486 from ExaWorks/update_slurm_qstat_strategy
`squeue` fails if a job id is passed to `-j` for a job that is not in…
2 parents 7de0811 + 160382c commit 966ccd7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/psij/executors/batch/slurm.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,10 @@ def process_cancel_command_output(self, exit_code: int, out: str) -> None:
147147

148148
def get_status_command(self, native_ids: Collection[str]) -> List[str]:
149149
"""See :meth:`~.BatchSchedulerExecutor.get_status_command`."""
150-
ids = ','.join(native_ids)
151-
152150
# we're not really using job arrays, so this is equivalent to the job ID. However, if
153151
# we were to use arrays, this would return one ID for the entire array rather than
154152
# listing each element of the array independently
155-
return [_SQUEUE_COMMAND, '-O', 'JobArrayID,StateCompact,Reason', '-t', 'all', '-j', ids]
153+
return [_SQUEUE_COMMAND, '-O', 'JobArrayID,StateCompact,Reason', '-t', 'all', '--me']
156154

157155
def parse_status_output(self, exit_code: int, out: str) -> Dict[str, JobStatus]:
158156
"""See :meth:`~.BatchSchedulerExecutor.parse_status_output`."""

0 commit comments

Comments
 (0)