Skip to content

Commit 9d250b9

Browse files
committed
Make sure that module loading during workflow generation does not change the O2DPG_ROOT of the current O2DPG that executes the job
1 parent e65323b commit 9d250b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

DATA/tools/parse

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ for line in f:
6565
calibworkflows = []
6666
print("Found topology", sys.argv[2], "-", args)
6767
if 'EPNSYNCMODE' in os.environ and int(os.environ['EPNSYNCMODE']) and (not 'GEN_TOPO_RUN_HOME' in os.environ or not int(os.environ['GEN_TOPO_RUN_HOME'])):
68+
restore_O2DPG_ROOT = 'O2DPG_ROOT' in os.environ
69+
if restore_O2DPG_ROOT:
70+
restore_O2DPG_ROOT_val = os.environ['O2DPG_ROOT']
6871
if 'OVERRIDE_PDPSUITE_VERSION' in os.environ and os.environ['OVERRIDE_PDPSUITE_VERSION'] != "":
6972
args[1] = os.environ['OVERRIDE_PDPSUITE_VERSION']
7073
for i in args[1].split():
@@ -74,6 +77,8 @@ for line in f:
7477
raise
7578
print("Loading module", i)
7679
mod.module('load', i)
80+
if restore_O2DPG_ROOT:
81+
os.environ['O2DPG_ROOT'] = restore_O2DPG_ROOT_val
7782
if len(args) > 2 and not 'O2_ROOT' in os.environ:
7883
print("O2 not loaded")
7984
raise

0 commit comments

Comments
 (0)