Skip to content

Commit

Permalink
Move fileDistributionEndPoint from lustre to weka
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyu committed Jun 23, 2023
1 parent 8412604 commit 9272c1a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/bps_usdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ computeCloud: US
computeSite: SLAC
s3EndpointUrl: "https://storage.googleapis.com"
payloadFolder: payload
fileDistributionEndPoint: "file:///sdf/group/rubin/sandbox/{operator}/panda_cache_box/{payloadFolder}/{uniqProcName}/"
fileDistributionEndPoint: "${LSST_RUN_TEMP_SPACE}/{operator}/panda_cache_box/{payloadFolder}/{uniqProcName}/"
fileDistributionEndPointDefault: "file:///sdf/data/rubin/panda_jobs/panda_cache/{operator}/panda_cache_box/{payloadFolder}/{uniqProcName}/"

# location of main butler repo at USDF
payload:
Expand All @@ -32,7 +33,7 @@ jobCleanup: "rm -fr EXEC_REPO-*;"


# Specify memory request for executionButler, pipetaskInit and forcedPhotCoadd, placeholder for now
requestMemory: 2048 # PanDA does the scheduling based on memory request
requestMemory: 2048 # PanDA does the scheduling based on memory request
executionButler:
requestMemory: 7000
queue: "SLAC_Rubin_Merge"
Expand Down
1 change: 1 addition & 0 deletions doc/changes/DM-39334.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move fileDistributionEndPoint from lustre to weka
7 changes: 6 additions & 1 deletion python/lsst/ctrl/bps/panda/panda_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ def submit(self, workflow):
"maxCopyWorkers", opt={"default": PANDA_DEFAULT_MAX_COPY_WORKERS}
)
# Docstring inherited from BaseWmsService.submit.
file_distribution_uri = self.config["fileDistributionEndPoint"]
lsst_temp = "LSST_RUN_TEMP_SPACE"

Check warning on line 66 in python/lsst/ctrl/bps/panda/panda_service.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/panda_service.py#L65-L66

Added lines #L65 - L66 were not covered by tests
if lsst_temp in file_distribution_uri and lsst_temp not in os.environ:
file_distribution_uri = self.config["fileDistributionEndPointDefault"]

Check warning on line 68 in python/lsst/ctrl/bps/panda/panda_service.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/panda_service.py#L68

Added line #L68 was not covered by tests

copy_files_for_distribution(
workflow.files_to_pre_stage, self.config["fileDistributionEndPoint"], max_copy_workers
workflow.files_to_pre_stage, file_distribution_uri, max_copy_workers
)

idds_client = get_idds_client(self.config)
Expand Down
8 changes: 8 additions & 0 deletions python/lsst/ctrl/bps/panda/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ def _make_doma_work(config, generic_workflow, gwjob, task_count, task_chunk):
"fileDistributionEndPoint", opt={"curvals": cvals, "default": None}
)

_, file_distribution_end_point_default = config.search(

Check warning on line 240 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L240

Added line #L240 was not covered by tests
"fileDistributionEndPointDefault", opt={"curvals": cvals, "default": None}
)

# Assume input files are same across task
local_pfns = {}
direct_io_files = set()
Expand Down Expand Up @@ -264,6 +268,10 @@ def _make_doma_work(config, generic_workflow, gwjob, task_count, task_chunk):
if not direct_io_files:
direct_io_files.add("cmdlineplaceholder")

lsst_temp = "LSST_RUN_TEMP_SPACE"

Check warning on line 271 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L271

Added line #L271 was not covered by tests
if lsst_temp in file_distribution_end_point and lsst_temp not in os.environ:
file_distribution_end_point = file_distribution_end_point_default

Check warning on line 273 in python/lsst/ctrl/bps/panda/utils.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/bps/panda/utils.py#L273

Added line #L273 was not covered by tests

executable = add_decoder_prefix(
config, cmd_line, file_distribution_end_point, (local_pfns, direct_io_files)
)
Expand Down

0 comments on commit 9272c1a

Please sign in to comment.