RARS RISC-V CPU Simulator support for EJudge contest management system
- Preparations:
- Download RARS Simulator .jar file and install java runtime
- Create rars symlink (rars-simulator) for EJudge, e.g.:
sudo ln -s '/home/ejudge/rars_1.5.jar' /usr/local/bin/rars-simulator
- EJudge integration:
- Put both
*.in
files in$EJUDGE_PREFIX/libexec/ejudge/lang
in (e.g. /home/ejudge/inst-ejudge/libexec/ejudge/lang/in) and runejudge-setup
- Or put both
*.in
files in/home/ejudge/compile/scripts/in
and runejudge-configure-compilers
.
- Put both
- Update EJudge limits (because RARS is java-based simulator), e.g. for
/home/judges/000001/conf/serve.cfg
set:
[problem]
max_vm_size = 64G
max_stack_size = 64G
max_file_size = 64G
time_limit = 10
- References:
- RARS RISC-V CPU Simulator: https://github.com/TheThirdOne/rars
- EJudge contest management system: https://github.com/blackav/ejudge
- EJudge wiki: https://ejudge.ru/wiki/index.php/%D0%A1%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_ejudge
- Some known issues:
- RARS executes .asm files without this extention incorrectly (e.g. no user input). Maybe they are treated as binary/compiled files?
- No built-in way in RARS to disable 1st (copyright) & last (exit type) output lines to stdio. Workround is used for now.
- RARS syscall for reading int's (and other numbers) - no EOF handling