Skip to content

Commit 71f1c7f

Browse files
committed
Log PATH when bsub cannot be found
This is to aid debugging.
1 parent f297d33 commit 71f1c7f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/ert/scheduler/lsf_driver.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import itertools
55
import json
66
import logging
7+
import os
78
import re
89
import shlex
910
import shutil
@@ -282,6 +283,13 @@ def __init__(
282283
self._bjobs_cmd = Path(bjobs_cmd or shutil.which("bjobs") or "bjobs")
283284
self._bkill_cmd = Path(bkill_cmd or shutil.which("bkill") or "bkill")
284285

286+
if not shutil.which(self._bsub_cmd):
287+
logger.error(
288+
"No bsub command found in PATH, "
289+
f"job submissions are likely to fail, PATH={os.getenv('PATH')}, "
290+
f"bsub_cmd={self._bsub_cmd}"
291+
)
292+
285293
self._jobs: MutableMapping[str, JobData] = {}
286294
self._iens2jobid: MutableMapping[int, str] = {}
287295
self._max_attempt: int = 100

0 commit comments

Comments
 (0)