INGInious
INGInious copied to clipboard
Ability to execute code on the same machine
For performance-related course (execution time of sorting algorithms, number of cycles to execute a loop, number of cache misses in a code, ...), we'd like students to get the same "numbers". This also allows a scoreboard, to create a competition between the students.
Potential solutions A few solutions are:
- Use a dedicated backend for an exercise.
- Force the use of a similar backend for the jobs of the same exercise. Both solutions would actually need the backend to have a per-cpu (at least) exclusive mode. Maybe memory could be reserved too. I don't know if this is already possible.
Alternatives
- Executing scripts through ssh on one of my own servers?
- Use a simulator like GEM5, but it is complex in certain scenarios and the simulator does not support some novel CPU instructions.
You will never get accurate time measurements whatever the setup is, except if your code is the only thing running on the machine with the exact same initial conditions for the whole machine state (hardware state included). That is why measuring code complexity, implementing and counting software traps or using simulators are probably the best solutions.
Trying to shrink the measurement approximation window with such requirements makes implementing the missing instructions in a simulator look like a trivial and inexpensive goal.
I agree there will still be external parameters. But if we can run the code on a dedicated CPU per jobs, on the same machine, the biggest ones are out of the picture already :)