Skip to content

Commit

Permalink
Use the -E flag for qstat to increase performance
Browse files Browse the repository at this point in the history
This flag causes qstat to group job status calls going to the same server
together. That makes qstat orders of magnitude faster for calls with many job
ids.
  • Loading branch information
JHolba authored and larsevj committed Apr 10, 2024
1 parent f394b3e commit ba916f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ert/scheduler/openpbs_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async def poll(self) -> None:
if self._non_finished_job_ids:
process = await asyncio.create_subprocess_exec(
"qstat",
"-x",
"-Ex",
"-w", # wide format
*self._non_finished_job_ids,
stdout=asyncio.subprocess.PIPE,
Expand Down Expand Up @@ -270,7 +270,7 @@ async def poll(self) -> None:
if self._finished_job_ids:
process = await asyncio.create_subprocess_exec(
"qstat",
"-fx",
"-Efx",
"-Fjson",
*self._finished_job_ids,
stdout=asyncio.subprocess.PIPE,
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/scheduler/bin/qstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def parse_args() -> Namespace:
ap.add_argument("-F", default="")
ap.add_argument("jobs", nargs="*")
ap.add_argument("-w", action="store_true")
ap.add_argument("-E", action="store_true")
return ap.parse_args()


Expand Down

0 comments on commit ba916f6

Please sign in to comment.