From 07ddb52753961e5d52505900fd8f4864848ceb9d Mon Sep 17 00:00:00 2001 From: dbeltran Date: Wed, 15 Jan 2025 11:34:20 +0100 Subject: [PATCH] feedback --- autosubmit/autosubmit.py | 3 ++- autosubmit/job/job.py | 12 +++++------- .../userguide/configure/develop_a_project.rst | 18 ++++++++++-------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/autosubmit/autosubmit.py b/autosubmit/autosubmit.py index 1d31d5b45..e17527444 100644 --- a/autosubmit/autosubmit.py +++ b/autosubmit/autosubmit.py @@ -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] = [] diff --git a/autosubmit/job/job.py b/autosubmit/job/job.py index 0ace0a9c3..6b51be2c7 100644 --- a/autosubmit/job/job.py +++ b/autosubmit/job/job.py @@ -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) @@ -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: """ diff --git a/docs/source/userguide/configure/develop_a_project.rst b/docs/source/userguide/configure/develop_a_project.rst index 132d800af..90c4ec164 100644 --- a/docs/source/userguide/configure/develop_a_project.rst +++ b/docs/source/userguide/configure/develop_a_project.rst @@ -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 ==================