-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
정답 및 제출 코드를 여러 소스파일로 제출, 채점할 수 있도록 수정 (multiple source codes) #5
Comments
Judge Traceback 분석Running live judge... 1. main 도입부 시작 File "/usr/local/bin/dmoj", line 33, in <module>
sys.exit(load_entry_point('dmoj', 'console_scripts', 'dmoj')())
File "/home/ubuntu/jota/judge/dmoj/judge.py", line 634, in main
judge.listen()
File "/home/ubuntu/jota/judge/dmoj/judge.py", line 263, in listen
self.packet_manager.run()
File "/home/ubuntu/jota/judge/dmoj/packet.py", line 183, in run
self._read_forever()
# judge 종료 전까지 패킷 읽기를 반복함
... continue ... 2. 패킷 수신부 File "/home/ubuntu/jota/judge/dmoj/packet.py", line 153, in _read_forever
self._receive_packet(self._read_single())
# 실제로 패킷을 읽는 부분
File "/home/ubuntu/jota/judge/dmoj/packet.py", line 256, in _receive_packet
self.judge.begin_grading(
Submission(
id=packet['submission-id'],
problem_id=packet['problem-id'],
language=packet['language'],
source=packet['source'],
# 현재 str로 받고 있음. 이 부분을 dict<filename, source> 타입으로 받아야 함
# 복수개의 코드이므로 복수형 sources 로 개명 필요.
time_limit=float(packet['time-limit']),
memory_limit=int(packet['memory-limit']),
short_circuit=packet['short-circuit'],
meta=packet['meta'],
)
)
# Submission 개체 생성 후 파라미터 전달
... continue ... 3. 멀티 프로세싱 채점자(JudgeWorker) 생성부 File "/home/ubuntu/jota/judge/dmoj/judge.py", line 131, in begin_grading
self.current_judge_worker = JudgeWorker(submission)
# JudgeWorker 생성자 호출
File "/home/ubuntu/jota/judge/dmoj/judge.py", line 313, in __init__
self.worker_process.start()
# 멀티 프로세싱 실행 직전
File "/usr/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.8/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75, in _launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
... continue ... 4. JudgeWorker 인스턴스 File "/home/ubuntu/jota/judge/dmoj/judge.py", line 405, in _worker_process_main
ipc_msg = next(case_gen)
File "/home/ubuntu/jota/judge/dmoj/judge.py", line 444, in _grade_cases
# Problem 개체 생성 후
self.grader = problem.grader_class(
self, problem, self.submission.language, utf8bytes(self.submission.source)
)
# grader 종류 선택해서 해당 Grader 인스턴스 생성(생성자 호출)
... continue ... 5. Grader: 채점 담당 File "/home/ubuntu/jota/judge/dmoj/graders/base.py", line 11, in __init__
self.binary = self._generate_binary()
# 최상위 클래스 생성자부터 실행. 바이너리 생성하는 메서드 _generate_binary() 는 다형성(오버라이딩)이 적용됨. 여기서는 StandardGrader의 메서드를 실행
File "/home/ubuntu/jota/judge/dmoj/graders/standard.py", line 102, in _generate_binary
return executors[self.language].Executor(
self.problem.id,
self.source,
hints=self.problem.config.hints or [],
unbuffered=self.problem.config.unbuffered,
)
# self.language에 해당하는 Executor 선택 후, 인스턴스 생성. C언어로 제출한 경우 GCCExecutor를 실행.
... continue ... 6. Executor: 컴파일 담당 File "/home/ubuntu/jota/judge/dmoj/executors/compiled_executor.py", line 47, in __call__
obj: 'CompiledExecutor' = super().__call__(*args, **kwargs)
File "/home/ubuntu/jota/judge/dmoj/executors/gcc_executor.py", line 34, in __init__
super().__init__(problem_id, main_source, **kwargs)
File "/home/ubuntu/jota/judge/dmoj/executors/compiled_executor.py", line 126, in __init__
super().__init__(problem_id, source_code, **kwargs)
... continue ... 7. Traceback 종료 File "/home/ubuntu/jota/judge/dmoj/executors/base_executor.py", line 54, in __init__
traceback.print_stack() 목표
|
현재 Grader(채점자) 및 submitter (제출자) 간의 Judge Issue를 구분하여 enhancement 진행 중에 있습니다.
|
Judge-side Implementation Steps
Judge-side 구현 완료됐습니다. |
현재 JOTA는 정답 코드 및 제출 코드를 모두 하나의 소스 코드로만 작성하여야 함
이는 헤더 파일을 따로 관리하거나, 규모가 큰 프로그램을 채점하기에 부적잘함
The text was updated successfully, but these errors were encountered: