File tree Expand file tree Collapse file tree
modules/performUQ/SimCenterUQ Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments