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

Don't use getenv=true with HTCondor workflows #164

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
16 changes: 14 additions & 2 deletions omicron/cli/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,13 @@ def main(args=None):

ppjob.add_condor_cmd('periodic_remove', '(JobStatus == 1) && MemoryUsage >= 7G')

ppjob.add_condor_cmd('environment', '"HDF5_USE_FILE_LOCKING=FALSE"')
ppjob.add_condor_cmd('environment', "\"{}\"".format(" ".join((
# disable file locking over NFS
"HDF5_USE_FILE_LOCKING=FALSE",
# provide the PATH so that omicron-merge-with-gaps can find the
# executables it needs
f"PATH='{os.getenv('PATH', sys.prefix)}'",
))))
ppjob.add_short_opt('e', '')
ppnodes = []
prog_path = dict()
Expand Down Expand Up @@ -1262,9 +1268,15 @@ def main(args=None):
if newdag:
# write shell script to seed archive
with open(archivejob.get_executable(), 'w') as f:
cmd = [
prog_path["omicron_archive"],
"--indir", mergedir.absolute(),
"--outdir", os.getenv("OMICRON_ARCHIVE", const.OMICRON_ARCHIVE),
"-vv",
]
print('#!/bin/bash -e\n', file=f)
print('# Archive all trigger files saved in the merge directory ', file=f)
print(f'{prog_path["omicron_archive"]} --indir {str(mergedir.absolute())} -vv', file=f)
print(" ".join(map(str, cmd)), file=f)

os.chmod(archivejob.get_executable(), 0o755)
# write caches to disk
Expand Down
1 change: 0 additions & 1 deletion omicron/condor.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,6 @@ def __init__(self, universe, executable, tag=None, subdir=None,
logdir, '%s-%s.err' % (tag, self.logtag)))
self.set_stdout_file(os.path.join(
logdir, '%s-%s.out' % (tag, self.logtag)))
cmds.setdefault('getenv', 'True')
for key, val in cmds.items():
if hasattr(self, 'set_%s' % key.lower()):
getattr(self, 'set_%s' % key.lower())(val)
Expand Down