Skip to content
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

关于多个评测机的部署 #51

Closed
haitaoya opened this issue Apr 29, 2019 · 13 comments
Closed

关于多个评测机的部署 #51

haitaoya opened this issue Apr 29, 2019 · 13 comments

Comments

@haitaoya
Copy link

可以在一台windows电脑上部署两个评测机吗?
我运行了ApplicationBootstrap两次,开启了 两个评测机,但是局域网中另两台电脑同时提交的话,只有一台提交的代码可以成功评测。 另一个在评测机报错java.lang.Error: API: SetupIoRedirection

@haitaoya
Copy link
Author

呃... 我知道原因了 两个评测机的judger.workDir = F:/tmp judger.checkpointDir = F:/tmp/eoj-testpoints
路径冲突了... 不好意思- -

@hzxie
Copy link
Owner

hzxie commented Apr 29, 2019

机智!
请问你#50 解决了吗?

@haitaoya
Copy link
Author

我认为,应该判断一下标准输出有没有遍历到最后
image

还有这里 i的起始坐标 应该是startIndex吧

@hzxie
Copy link
Owner

hzxie commented Apr 30, 2019

我来改一波吧。你这样不对。因为没有忽略多余的空白字符。

@hzxie
Copy link
Owner

hzxie commented Apr 30, 2019

对。是的,应该是startIndex。
这个项目Open-source了这么多年,你是第一个发现这些错误的🤦‍♂️。

@haitaoya
Copy link
Author

尴尬...
因为想做一个OJ系统,您的VOJ系统写的规范,易懂。就仔细观摩一下源码,当做学习的过程。

@haitaoya
Copy link
Author

这里 返回的实时评测结果,应该加个判断吧

if("AC".equals(runtimeResult.get("runtimeResult"))) {
				runtimeResult.put("score", checkpointScore);
			}
			else {
				runtimeResult.put("score", 0);
			}

@hzxie
Copy link
Owner

hzxie commented Apr 30, 2019

不AC不一定是0分啊。

@haitaoya
Copy link
Author

但是后边的操作都是按AC判断的
持久化
格式化log

@hzxie
Copy link
Owner

hzxie commented Apr 30, 2019

后面的2处应该是对每个checkpoint的判断。
你刚才说的那处是对整个Problem中Checkpoints的判断。

@haitaoya
Copy link
Author

runtimeResult.put("score", checkpointScore);

不是呀,这个也是对每个checkpoint的局部成绩计算(在for循环里边,返回的是单个checkpoint评测结果)

@haitaoya
Copy link
Author

image
image
为什么时间超过了限制,exitCode却是0。 是因为超出的比较少吗 - -#

@hzxie
Copy link
Owner

hzxie commented Apr 30, 2019

应该是发现超时之后会触发KILL机制。
但是KILL的时候进程已经正常退出了。所以exit code是0。

hzxie added a commit that referenced this issue May 7, 2019
hzxie added a commit that referenced this issue Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants