优化部分逻辑

This commit is contained in:
virusdefender 2016-10-06 11:43:49 +08:00
parent eb5785d58f
commit 56a7907ad8
3 changed files with 6 additions and 7 deletions

View File

@ -12,14 +12,13 @@ c_lang_config = {
},
"run": {
"command": "{exe_path}",
"seccomp_rule": None,
"max_process_number": -1
"seccomp_rule": None
},
"spj_compile": {
"src_name": "spj-{spj_version}.c",
"exe_name": "spj-{spj_version}",
"max_cpu_time": 10000,
"max_real_time": 20000,
"max_cpu_time": 3000,
"max_real_time": 5000,
"max_memory": 1024 * 1024 * 1024,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c99 {src_path} -lm -o {exe_path}"
},

View File

@ -72,7 +72,7 @@ class JudgeClient(object):
max_real_time=self._max_cpu_time * 9,
max_memory=self._max_memory * 3,
max_output_size=1024 * 1024 * 1024,
max_process_number=self._run_config["max_process_number"],
max_process_number=_judger.UNLIMITED,
exe_path=command[0].encode("utf-8"),
input_path=in_file_path.encode("utf-8"),
output_path="/tmp/spj.out".encode("utf-8"),
@ -102,7 +102,7 @@ class JudgeClient(object):
max_real_time=self._max_real_time,
max_memory=self._max_memory,
max_output_size=1024 * 1024 * 1024,
max_process_number=self._run_config["max_process_number"],
max_process_number=_judger.UNLIMITED,
exe_path=command[0].encode("utf-8"),
input_path=in_file,
output_path=out_file,

View File

@ -76,7 +76,7 @@ class JudgeServer(object):
max_memory=max_memory,
test_case_id=str(test_case_id),
submission_dir=submission_dir,
spj_version=str(spj_version),
spj_version=spj_version,
spj_config=spj_config)
run_result = judge_client.run()
return run_result