diff --git a/omicron/cli/process.py b/omicron/cli/process.py index 0ca1735..ff297fc 100644 --- a/omicron/cli/process.py +++ b/omicron/cli/process.py @@ -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() @@ -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 diff --git a/omicron/condor.py b/omicron/condor.py index fee975b..a46918f 100644 --- a/omicron/condor.py +++ b/omicron/condor.py @@ -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)