Skip to content

Commit 8398c7a

Browse files
committed
sy - plom cmd update
1 parent 64ec50c commit 8398c7a

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

modules/performUQ/SimCenterUQ/runPLoM.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,26 @@ def _run_simulation(self):
209209
command_line = f"{pythonEXE} {dakotaScript} --workflowInput sc_dakota_plom.json --driverFile {os.path.splitext(self.workflow_driver)[0]} --workflowOutput EDP.json --runType {runType}"
210210
print(command_line)
211211
# run command
212+
dakotaTabPath = os.path.join(self.work_dir,"dakotaTab.out")
213+
print(dakotaTabPath)
212214

213215
try:
214-
#os.system(command_line)
215-
subprocess.call(command_line)
216+
os.system(command_line)
216217
except:
217218
print('runPLoM._run_simulation: error in running dakota to generate the initial sample.')
218219
print('runPLoM._run_simulation: please check if the dakota is installed correctly on the system.')
219220

221+
if not os.path.exists(dakotaTabPath):
222+
try:
223+
subprocess.call(command_line)
224+
except:
225+
print('runPLoM._run_simulation: error in running dakota to generate the initial sample.')
226+
print('runPLoM._run_simulation: please check if the dakota is installed correctly on the system.')
227+
228+
if not os.path.exists(dakotaTabPath):
229+
msg = 'Dakota preprocessor did not run successfully'
230+
self.errlog.exit(msg)
231+
220232
# remove the new dakota.json
221233
#os.remove('sc_dakota_plom.json')
222234

0 commit comments

Comments
 (0)