Commit 65d6e263 authored by Kento HASEGAWA's avatar Kento HASEGAWA

Make it possible to receive a problem from a solver

parent 174785f7
......@@ -46,14 +46,17 @@ def resolve():
print(data)
outpath = "./works/resolved.txt"
probpath = "./problems/{}".format(data['qname'])
probpath = "./works/problem.txt"
tmppath = "./works/answer.txt"
with open(probpath, "w") as fp:
fp.write(data['problem'])
with open(tmppath, "w") as fp:
fp.write(data['answer'])
# Resolver
cmd = "/home/pi/adc2017/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
cmd = "/home/xilinx/adc2017/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
subprocess.call(cmd.strip().split(" "))
resolved = ""
......@@ -93,6 +96,7 @@ def start():
data = {
'client': request.form['client'],
'qname': request.form['qname'],
'problem': request.form['problem'],
'answer': request.form['solution'],
'cputime': request.form['cputime'],
'req_id': request.form['req_id']
......
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