Commit 3712e72e authored by Kento HASEGAWA's avatar Kento HASEGAWA
Browse files

Remove software resolver in host

parent cf46e101
Loading
Loading
Loading
Loading
+0 −12
Changes for comm/server/main.py: 0 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -152,7 +152,6 @@ def post():

    pattern = r"judge += +\[(.+?), ([0-9.]+)\]"
    m = re.match(pattern, nlcheck)
    print(nlcheck, m)
    if m and (m.group(1) == "True"):
        dat["nlcheck"] = float(m.group(2))
    else:
@@ -195,22 +194,11 @@ def start():

    qstr = "\n".join(_q_lines)

    qnumber  = _question_name.replace(".txt", "").replace("NL_Q", "")
    probpath = "{}/{}".format(app_args["question"], _question_name)
    tmppath  = "{}/T03_A{}_tmp.txt".format(app_args["out"], qnumber)
    outpath  = "{}/T03_A{}.txt".format(app_args["out"], qnumber)

    res = {}
    if line_num >= 0:
        # LINE_NUMが閾値未満のとき,PYNQに問題を配信して問題を解かせる
        res = solve_questions(_question_name, qstr)

    # 整形ルーティング (再配線) する
    #cmd = "/home/pi/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
    cmd = "/home/pi/adc2017/pynq-router/resolver/solver --reroute --output {} {} {}".format(outpath, probpath, tmppath)
    print("`{}`".format(cmd))
    subprocess.call(cmd.strip().split(" "))

    # 最終結果だけを保存
    questions[_question_name]["status"] = res["status"]