Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeltrankyl committed Jan 15, 2025
1 parent 0e9d23e commit 07ddb52
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion autosubmit/autosubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,8 @@ def prepare_run(expid, notransitive=False, start_time=None, start_after=None,
"job_packages not found", 6016, str(e))
Log.debug("Processing job packages")
try:
wrapper_wallclock = "48:00" # fallback value, only affects to is_overclock
# fallback value, only affects to is_overclock
wrapper_wallclock = as_conf.experiment_data.get("CONFIG", {}).get("WRAPPERS_WALLCLOCK", "48:00")
for (exp_id, package_name, job_name, wrapper_wallclock) in packages:
if package_name not in job_list.packages_dict:
job_list.packages_dict[package_name] = []
Expand Down
12 changes: 5 additions & 7 deletions autosubmit/job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def wallclock_in_seconds(self, wallclock):
if not self._wallclock_in_seconds or self.status not in [Status.RUNNING, Status.QUEUING, Status.SUBMITTED]:
# Should always take the max_wallclock set in the platform, this is set as fallback ( and local platform doesn't have a max_wallclock defined )
if not wallclock or wallclock == "00:00":
wallclock = "24:00"
Log.warning(f"No wallclock is set for this job. Default to {wallclock}")
wallclock = self.parameters.get("CONFIG.JOB_WALLCLOCK", "24:00")
Log.warning(f"No wallclock is set for this job. Default to {wallclock}. You can change this value in CONFIG.WALLCLOCK")
wallclock = self.parse_time(wallclock)
self._wallclock_in_seconds = self._time_in_seconds_and_margin(wallclock)

Expand Down Expand Up @@ -1286,11 +1286,9 @@ def retrieve_logfiles(self, platform: Any, raise_error: bool = False) -> Dict[st
def _max_possible_wallclock(self):
if self.platform and self.platform.max_wallclock:
wallclock = self.parse_time(self.platform.max_wallclock)
if not wallclock:
return None
return int(wallclock.total_seconds())
else:
return None
if wallclock:
return int(wallclock.total_seconds())
return None

def _time_in_seconds_and_margin(self, wallclock: datetime.timedelta) -> int:
"""
Expand Down
18 changes: 10 additions & 8 deletions docs/source/userguide/configure/develop_a_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,16 @@ Autosubmit configuration
# This parameter is used to enable the use of threads in autosubmit for the wrappers. # Default False
ENABLE_WRAPPER_THREADS: False
OUTPUT:pdf
# wrapper definition
wrappers:
wrapper_1_v_example:
TYPE: Vertical
JOBS_IN_WRAPPER: sim
wrapper_2_h_example:
TYPE: Horizontal
JOBS_IN_WRAPPER: da
WRAPPERS_WALLCLOCK: 48:00 # Default max_wallclock for wrappers before getting killed
JOB_WALLCLOCK: 24:00 # Default max_wallclock for jobs before getting killed
# wrapper definition
wrappers:
wrapper_1_v_example:
TYPE: Vertical
JOBS_IN_WRAPPER: sim
wrapper_2_h_example:
TYPE: Horizontal
JOBS_IN_WRAPPER: da
Jobs configuration
==================
Expand Down

0 comments on commit 07ddb52

Please sign in to comment.