GCC suggestions needed
Mon Nov 17 13:49:00 GMT 2008
The problem is not about setting up an online judge. It is about users
submitting code which produces errors by compiler and clogging the
Say an C++ template file takes 3 secs for output and there are 300
users , 1000 secs are wasted. The submissions are much more than that.
If we stop at the first error it would only take maybe < 1s.
About parallel, gcc a.c b.c d.c can they be output to a1.out b1.out
d1.out ? Invoking gcc for each of a,b,c seems slow for me . Do we
have anything better ?
On Mon, Nov 17, 2008 at 7:01 PM, Tom St Denis <email@example.com> wrote:
> Niklaus wrote:
>> I've an online judge system where i take the source code submitted
>> by an user and compile it to an executable and then run it against a
>> predetermined input to produce an output which is checked against a
>> predetermined output. This determines the results as Correct, Wrong or
>> Compile error.
>> The languages are C,C++,java.
>> Please suggest solutions for the below problems
>> 1) How to tell gcc to stop after the first error. I use both gcc
>> 4.2 and gcc 3.4. I tried -Wfatal-error and -Wfatal-error it says
>> unrecognized option.
> I'm going to suggest for the good of all humanity, that the person who is
> judging a comp.sci challenge should probably be able to script up an
> automated testing harness such that you can do something like
> for f in *.zip; do ./run_test.sh $f; done
> At the high level (say submissions are zip files or whatever) and then your
> shell script unpacks, tries to compile, run, compares, etc.
> Just saying...
More information about the Gcc-help