Skip to content

Commit

Permalink
Keep only one Directory.SHARED_SCRATCH (#222)
Browse files Browse the repository at this point in the history
* Keep only one `Directory.SHARED_SCRATCH`

* Recover a comment
  • Loading branch information
dachengx authored Oct 1, 2024
1 parent 356c4b1 commit 8e6fd31
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions alea/submitters/htcondor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ 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 @@ -212,15 +211,12 @@ 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(scratch_dir, storage_dir)
local.add_directories(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

0 comments on commit 8e6fd31

Please sign in to comment.