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 3, 2024
1 parent 13fdda2 commit f4ff605
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: Optional[str] = None,
runpath: Optional[Path] = None,
num_cpu: Optional[int] = 1,
realization_memory: Optional[int] = 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: Optional[str] = None,
runpath: Optional[Path] = None,
num_cpu: Optional[int] = 1,
realization_memory: Optional[int] = 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 @@ -300,13 +300,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: Optional[str] = None,
runpath: Optional[Path] = None,
num_cpu: Optional[int] = 1,
realization_memory: Optional[int] = 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 @@ -228,13 +228,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: Optional[str] = None,
runpath: Optional[Path] = None,
num_cpu: Optional[int] = 1,
realization_memory: Optional[int] = 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 @@ -174,13 +174,15 @@ async def submit(
executable: str,
/,
*args: str,
name: str = "dummy",
name: Optional[str] = None,
runpath: Optional[Path] = None,
num_cpu: Optional[int] = 1,
realization_memory: Optional[int] = 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: Optional[Path] = None
Expand Down

0 comments on commit f4ff605

Please sign in to comment.