diff --git a/comm/resolver/main.py b/comm/resolver/main.py index 4fcb894581616724123921c480aa9ca2e39c811b..cfcc2440f44de39dd9d5646bcbd0109b3a1fe1a3 100644 --- a/comm/resolver/main.py +++ b/comm/resolver/main.py @@ -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']