Commit c2d20909 authored by ext-bershanska_a's avatar ext-bershanska_a
Browse files

fixed a check, so simulation is ran even if OPTIMIZER is set in environment and *.tmpl can be found

parent 71dfe14c
...@@ -147,12 +147,11 @@ def main(argv): ...@@ -147,12 +147,11 @@ def main(argv):
print('Working directory is the same as the TEMPLATES or OPTIMIZER directory! This is not allowed... bye!') print('Working directory is the same as the TEMPLATES or OPTIMIZER directory! This is not allowed... bye!')
sys.exit() sys.exit()
#EDIT: determine what kind of job should be ran # determine what kind of job should be ran, simulation by default
if doOptimize and os.environ.get('OPTIMIZER'): if doOptimize and os.environ.get('OPTIMIZER'):
print('job type: OPTIMIZATION') print('job type: OPTIMIZATION')
inputfilePath = os.environ.get('OPTIMIZER') inputfilePath = os.environ.get('OPTIMIZER')
#NOTE: maybe set tmpl dirctory for simulation if not (inputfilePath and glob.glob(os.path.join(inputfilePath,'*.tmpl'))):
else:
print('job type: SIMULATION') print('job type: SIMULATION')
doOptimize = False doOptimize = False
if os.environ.get('TEMPLATES'): if os.environ.get('TEMPLATES'):
...@@ -218,9 +217,9 @@ def main(argv): ...@@ -218,9 +217,9 @@ def main(argv):
#run simulations of all possible combinations #run simulations of all possible combinations
args = [N, baseFileName, inputfilePath, tmplFile, oinpFile, doTest, doKeep, doNobatch, doOptimize, info, queue, hypert, quiet] args = [N, baseFileName, inputfilePath, tmplFile, oinpFile, doTest, doKeep, doNobatch, doOptimize, info, queue, hypert, quiet]
traverseRanges(list(ranges.items()), opaldict, args, doNobatch) traverseRanges(list(ranges.items()), opaldict, args, doNobatch)
# clean up # clean up
os.system("rm -f *.bak ") os.system("rm -f *.bak ")
os.chdir("..") os.chdir("..")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment