Hi,
I need a little help with the compare files.
I am sending the files I am using so you can understand it bette.
It is compiling, but when it starting running it freezes. I don’t know yet what is the problem. I think it is not reading the input.
I tested it using our Queue manager (Torque) since we are using on a cluster. The compile phase is ok.
Now I need to create the compare file and try to understand why it is freezing. Something maybe wrong with my code.
So it prints the ordered vector and the speedup, I need to check the result with the out file and check if the speedup if greater than 1.
Thank You.
On 03-08-15 09:18, Leandro Zanotto wrote:
Hi,
Hi Leandro,
I need a little help with the compare files.
I am sending the files I am using so you can understand it bette.
It is compiling, but when it starting running it freezes. I don’t know yet what is the problem. I think it is not reading the input.
In this case you should inspect the judgedaemon log files, and post the relevant parts of these, so that we can analyse the problem. But read below first.
I tested it using our Queue manager (Torque) since we are using on a cluster. The compile phase is ok.
Now I need to create the compare file and try to understand why it is freezing. Something maybe wrong with my code.
So it prints the ordered vector and the speedup, I need to check the result with the out file and check if the speedup if greater than 1.
The build and run scripts are supposed to compile (if necessary) and run the compare script, they are not meant to compile the contestant solution. If I understand what you're trying to do, then tarefa1.c would be a sample contestant submission tarefa1.out the corresponding team output, and the compare script should check whether everything but the last line matches the sorted list, and the last line should contain a floating point number higher than one.
This means that run should be a script/program that reads the team output and a jury reference answer/output file (let's call it tarefa1.ans), and compare these up until the last line of the team file, then check the float on the last line of the team output.
However, the run script you attached is a compile script for the C language, which is why it doesn't work.
Have a look at the boolfind_cmp compare script, to be found in the web interface, but also under sql/files/examples/boolfind_cmp. The build script compiles the included check_boolfind.c file and then the run script is a wrapper around calling check_boolfind, which does the actual checking of the team output (without needing any reference output for that particular example).
What you may want to do, is adapt the default "compare" script (see sql/files/defaultdata/compare), either by modifying the file compare.c directly, or by writing a wrapper around it that chops off the last line from the team output and separately compares it to 1.
Also, see the boolfind_cmp run script for the calling syntax of these compare scripts.
Best, Jaap