Skip to content

Commit

Permalink
0706
Browse files Browse the repository at this point in the history
  • Loading branch information
tian50 committed Jul 6, 2021
1 parent 8002b95 commit 111bc7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 67 deletions.
68 changes: 1 addition & 67 deletions msgpi/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def solve(
if timer:
timer.start()
sg_in, smdim = psg.preSG(
sg_xml, analysis, ppcmd, solver,
sg_xml, analysis, ppcmd, solver, integrated,
timeout=timeout, scrnout=scrnout, logger=logger
)
if timer:
Expand Down Expand Up @@ -99,36 +99,6 @@ def solve(
elif 'swiftcomp' in solver.lower():
results = miosc.readSCOut(sg_in, smdim, analysis, scrnout)


# if solver == 'vabs':
# return miovabs.readVABSOut(sg_in, analysis, scrnout)

# if analysis == 'h':
# if solver == 'vabs' or solver == 'integrated':
# bp = miovabs.readVABSOutHomo(sg_in + '.K')
# if timer:
# timer.stop()
# return bp
# elif solver == 'swiftcomp':
# sm = miosc.readSCOutHomo(sg_in + '.k', smdim)
# if timer:
# timer.stop()
# return sm
# elif analysis == 'd':
# if timer:
# timer.stop()
# pass
# elif 'f' in analysis:
# if analysis == 'fi':
# fis, srs = miosc.readSCOutFailure(sg_in, analysis)
# if timer:
# timer.stop()
# return fis, srs

# results = miosc.readSCOutFailure(sg_in, analysis)
# if timer:
# timer.stop()
# return results

if timer:
timer.stop()
Expand Down Expand Up @@ -338,42 +308,6 @@ def run(
scrnout, logger
)

# cmd = []

# if solver == 'vabs':
# # solver = solver + 'iii'
# cmd = ['VABSIII', input_name]
# if analysis == 'fi' or analysis == 3:
# cmd.append('3')
# elif solver == 'swiftcomp':
# cmd = ['SwiftComp', input_name]

# if solver == 'swiftcomp':
# cmd.append(str(smdim) + 'D')
# if 'd' in analysis:
# analysis = analysis.replace('d', 'l')
# cmd.append(analysis.upper())

# # cmd = ' '.join(cmd)
# logger.debug(' '.join(cmd))

# # try:
# if scrnout:
# # sys.stdout.write(msg.format(
# # cn=solver, an=analysis_long[analysis]
# # ))
# # sys.stdout.flush()
# sbp.call(cmd)
# else:
# FNULL = open(os.devnull, 'w')
# sbp.call(cmd, stdout=FNULL, stderr=sbp.STDOUT)
# # except:
# # sys.stdout.write('failed\n')
# # sys.stdout.flush()
# # return
# # else:
# # sys.stdout.write('done\n')
# # sys.stdout.flush()
except:
e = traceback.format_exc()
logger.critical(e, exc_info=1)
Expand Down
1 change: 1 addition & 0 deletions msgpi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

def run(cmd, timeout, scrnout):
# proc = sbp.Popen(cmd, stdout=sbp.PIPE, stderr=sbp.PIPE)
# print('command: ', cmd)
if scrnout:
# sbp.call(cmd)
proc = sbp.Popen(cmd)
Expand Down

0 comments on commit 111bc7f

Please sign in to comment.