Skip to content

Commit

Permalink
Name job after its executable when not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
cmrqs committed Dec 16, 2024
1 parent 72babc5 commit d7f69ea
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ert/scheduler/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: str | None = None,
runpath: Path | None = None,
num_cpu: int | None = 1,
realization_memory: int | None = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/ert/scheduler/local_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: str | None = None,
runpath: Path | None = None,
num_cpu: int | None = 1,
realization_memory: int | None = 0,
Expand Down
4 changes: 3 additions & 1 deletion src/ert/scheduler/lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: str | None = None,
runpath: Path | None = None,
num_cpu: int | None = 1,
realization_memory: int | None = 0,
) -> None:
if runpath is None:
runpath = Path.cwd()
if name is None:
name = Path(executable).name

arg_queue_name = ["-q", self._queue_name] if self._queue_name else []
arg_project_code = ["-P", self._project_code] if self._project_code else []
Expand Down
4 changes: 3 additions & 1 deletion src/ert/scheduler/openpbs_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: str | None = None,
runpath: Path | None = None,
num_cpu: int | None = 1,
realization_memory: int | None = 0,
) -> None:
if runpath is None:
runpath = Path.cwd()
if name is None:
name = Path(executable).name

arg_queue_name = ["-q", self._queue_name] if self._queue_name else []
arg_project_code = ["-A", self._project_code] if self._project_code else []
Expand Down
4 changes: 3 additions & 1 deletion src/ert/scheduler/slurm_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: str | None = None,
runpath: Path | None = None,
num_cpu: int | None = 1,
realization_memory: int | None = 0,
) -> None:
if runpath is None:
runpath = Path.cwd()
if name is None:
name = Path(executable).name

script = create_submit_script(runpath, executable, args, self.activate_script)
script_path: Path | None = None
Expand Down

0 comments on commit d7f69ea

Please sign in to comment.