Skip to content

Commit

Permalink
Merge pull request #58 from lsst/tickets/DM-36981
Browse files Browse the repository at this point in the history
DM-36981: retry jobs by increasing memory with user defined task para…
  • Loading branch information
wguanicedew authored Dec 6, 2023
2 parents c52380c + 8fad834 commit ad75819
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changes/DM-36981.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
updates to map bps memory boosting atrributes to panda memory boosting attributes
1 change: 1 addition & 0 deletions python/lsst/ctrl/bps/panda/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
PANDA_DEFAULT_PRIORITY = 900
PANDA_DEFAULT_MAX_JOBS_PER_TASK = 30000
PANDA_DEFAULT_RSS = 1024
PANDA_DEFAULT_RSS_MAX = 512000 # 500 * 1024
PANDA_DEFAULT_MAX_WALLTIME = 90000
PANDA_DEFAULT_MAX_ATTEMPTS = 3
PANDA_DEFAULT_CORE_COUNT = 1
Expand Down
10 changes: 9 additions & 1 deletion python/lsst/ctrl/bps/panda/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
PANDA_DEFAULT_PROCESSING_TYPE,
PANDA_DEFAULT_PROD_SOURCE_LABEL,
PANDA_DEFAULT_RSS,
PANDA_DEFAULT_RSS_MAX,
PANDA_DEFAULT_TASK_TYPE,
PANDA_DEFAULT_VO,
)
Expand Down Expand Up @@ -248,6 +249,10 @@ def _make_doma_work(config, generic_workflow, gwjob, task_count, task_chunk):
"fileDistributionEndPointDefault", opt={"curvals": cvals, "default": None}
)

task_rss = gwjob.request_memory if gwjob.request_memory else PANDA_DEFAULT_RSS
task_rss_retry_step = task_rss * gwjob.memory_multiplier if gwjob.memory_mulitplier else 0
task_rss_retry_offset = 0 if task_rss_retry_step else task_rss

# Assume input files are same across task
local_pfns = {}
direct_io_files = set()
Expand Down Expand Up @@ -314,7 +319,10 @@ def _make_doma_work(config, generic_workflow, gwjob, task_count, task_chunk):
"type": "template",
},
encode_command_line=True,
task_rss=gwjob.request_memory if gwjob.request_memory else PANDA_DEFAULT_RSS,
task_rss=task_rss,
task_rss_retry_offset=task_rss_retry_offset,
task_rss_retry_step=task_rss_retry_step,
task_rss_max=gwjob.request_memory_max if gwjob.request_memory_max else PANDA_DEFAULT_RSS_MAX,
task_cloud=gwjob.compute_cloud if gwjob.compute_cloud else PANDA_DEFAULT_CLOUD,
task_site=site,
task_priority=int(gwjob.priority) if gwjob.priority else PANDA_DEFAULT_PRIORITY,
Expand Down

0 comments on commit ad75819

Please sign in to comment.