@@ -644,11 +644,11 @@ def pipeline_hooks(cls):
644644 #:
645645 #: Time limit is specified as a string in the form
646646 #: ``<days>d<hours>h<minutes>m<seconds>s`` or as number of seconds.
647- #: If set to :class:`None`, no time limit will be set.
648- #: The default time limit of the system partition's scheduler will be used.
647+ #: If set to :class:`None`, the |time_limit|_
648+ #: of the current system partition will be used.
649649 #:
650650 #: :type: :class:`str` or :class:`float` or :class:`int`
651- #: :default: ``'10m'` `
651+ #: :default: :class:`None `
652652 #:
653653 #: .. note::
654654 #: .. versionchanged:: 2.15
@@ -662,7 +662,25 @@ def pipeline_hooks(cls):
662662 #: - The old syntax using a ``(h, m, s)`` tuple is dropped.
663663 #: - Support of `timedelta` objects is dropped.
664664 #: - Number values are now accepted.
665- time_limit = variable (type (None ), field = fields .TimerField , value = '10m' )
665+ #:
666+ #: .. versionchanged:: 3.5.1
667+ #: The default value is now :class:`None` and it can be set globally
668+ #: per partition via the configuration.
669+ #:
670+ #: .. |time_limit| replace:: :attr:`time_limit`
671+ #: .. _time_limit: #.systems[].partitions[].time_limit
672+ time_limit = variable (type (None ), field = fields .TimerField , value = None )
673+
674+ #: .. versionadded:: 3.5.1
675+ #:
676+ #: The time limit for the build job of the regression test.
677+ #:
678+ #: It is specified similarly to the :attr:`time_limit` attribute.
679+ #:
680+ #: :type: :class:`str` or :class:`float` or :class:`int`
681+ #: :default: :class:`None`
682+ build_time_limit = variable (type (None ), field = fields .TimerField ,
683+ value = None )
666684
667685 #: .. versionadded:: 2.8
668686 #:
@@ -1228,7 +1246,11 @@ def compile(self):
12281246 self .modules , self .variables .items ())
12291247 environs = [self ._current_partition .local_env , self ._current_environ ,
12301248 user_environ , self ._cdt_environ ]
1231-
1249+ self ._build_job .time_limit = (
1250+ self .build_time_limit or rt .runtime ().get_option (
1251+ f'systems/0/partitions/@{ self .current_partition .name } '
1252+ f'/time_limit' )
1253+ )
12321254 with osext .change_dir (self ._stagedir ):
12331255 # Prepare build job
12341256 build_commands = [
@@ -1328,8 +1350,9 @@ def run(self):
13281350 self .job .num_tasks_per_socket = self .num_tasks_per_socket
13291351 self .job .num_cpus_per_task = self .num_cpus_per_task
13301352 self .job .use_smt = self .use_multithreading
1331- self .job .time_limit = self .time_limit
1332-
1353+ self .job .time_limit = (self .time_limit or rt .runtime ().get_option (
1354+ f'systems/0/partitions/@{ self .current_partition .name } /time_limit' )
1355+ )
13331356 exec_cmd = [self .job .launcher .run_command (self .job ),
13341357 self .executable , * self .executable_opts ]
13351358 commands = [* self .prerun_cmds , ' ' .join (exec_cmd ), * self .postrun_cmds ]
0 commit comments