Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Keep only one Directory.SHARED_SCRATCH" #223

Merged
merged 1 commit into from
Oct 2, 2024
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
6 changes: 5 additions & 1 deletion alea/submitters/htcondor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(self, *args, **kwargs):
self.generated_dir = os.path.join(self.workflow_dir, "generated")
self.runs_dir = os.path.join(self.workflow_dir, "runs")
self.outputs_dir = os.path.join(self.workflow_dir, "outputs")
self.scratch_dir = os.path.join(self.workflow_dir, "scratch")
self.templates_tarball_dir = os.path.join(self.generated_dir, "templates")

@property
Expand Down Expand Up @@ -211,12 +212,15 @@ def _generate_sc(self):
# Local site: this is the submit host
logger.debug("Defining local site")
local = Site("local")
# Logs and pegasus output goes here. This place is called stash in OSG jargon.
scratch_dir = Directory(Directory.SHARED_SCRATCH, path=self.scratch_dir)
scratch_dir.add_file_servers(FileServer(f"file:///{self.scratch_dir}", Operation.ALL))
# Jobs outputs goes here, but note that it is in scratch so it only stays for short term
# This place is called stash in OSG jargon.
storage_dir = Directory(Directory.LOCAL_STORAGE, path=self.outputs_dir)
storage_dir.add_file_servers(FileServer(f"file:///{self.outputs_dir}", Operation.ALL))
# Add scratch and storage directories to the local site
local.add_directories(storage_dir)
local.add_directories(scratch_dir, storage_dir)
# Add profiles to the local site
local.add_profiles(Namespace.ENV, HOME=os.environ["HOME"])
local.add_profiles(Namespace.ENV, GLOBUS_LOCATION="")
Expand Down
Loading