Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,11 @@ def compile(self):
f'systems/0/partitions/@{self.current_partition.name}'
f'/time_limit')
)
# Get job options from managed resources and prepend them to
# build_job_opts. We want any user supplied options to be able to
# override those set by the framework.
resources_opts = self._map_resources_to_jobopts()
self._build_job.options = resources_opts + self._build_job.options
with osext.change_dir(self._stagedir):
# Prepare build job
build_commands = [
Expand Down Expand Up @@ -1921,11 +1926,7 @@ def _get_cp_env():
# Get job options from managed resources and prepend them to
# job_opts. We want any user supplied options to be able to
# override those set by the framework.
resources_opts = []
for r, v in self.extra_resources.items():
resources_opts.extend(
self._current_partition.get_resource(r, **v))

resources_opts = self._map_resources_to_jobopts()
self._job.options = resources_opts + self._job.options
with osext.change_dir(self._stagedir):
try:
Expand All @@ -1949,6 +1950,13 @@ def _get_cp_env():
if self.job.sched_flex_alloc_nodes:
self.num_tasks = self.job.num_tasks

def _map_resources_to_jobopts(self):
resources_opts = []
for r, v in self.extra_resources.items():
resources_opts += self._current_partition.get_resource(r, **v)

return resources_opts

@final
def compile_complete(self):
'''Check if the build phase has completed.
Expand Down