Mimino666/tc-marathoner

Getting stuck when using cached solutions

martinezgjuan opened this issue · 6 comments

When running cached solutions the program gets stuck.

I think this especially happens with solutions of large size and when it happens it doesn't get unstuck even when pressing 'q'.

When I disable the cache in the .cfg file such solutions run well., (or when I'm running them for the first time).

I'm using:
Windows 7.
Java 1.8.0_45
Python 3.4.3.

I don't see any particular reason why this should be happening. It may be, that the cached data somehow got corrupted. Try to delete the SmallPolygonsMarat/cache directory and let me know, if it helped. If not I will look deeper into the issue.

I just tried deleting the cache directory and attempted with one of the same larger output cases (6 kb) which is actually not so large.

Again:

  • The first run went normally.
  • Trying to run the same case with the same code got unresponsive after printing "[NOTE] Running solution from cache"
  • When I disable the cache it runs well again.

I don't understand neither. It was working well before. So I wonder if it has something to do with my environment.

I will definitely look into the this. Let's just try one last simple thing - restarting the system.

If it didn't help, I just have a few questions, to make sure I understand the problem fully:

  • Does the problem occur only for large test cases? So for the small test cases the caching works fine?
  • Did caching work before on large test cases without any problems?
  • Are you maybe outputting too much data (>1MB) on standard error output?
  • Type into marathoner: hash It will output the hash of the current solution. Open the directory SmallPolygonsMarat/cache/<hash>. You will find there for each seed the cached standard output and standard error output of your solution. Open the files for the seed which causes the problem and look into them. Do they look okay? Do you see any anomaly there?

Note: be careful not to share with me any specific information related to the contest or your solution, as it is against the TC rules.

I tried restarting the system and unfortunately it didn't change anything.

Yes, it seems to happen only with cases with large outputs. The caching works fine with cases of small output.

Caching worked well before for such cases because I ran the same cases and didn't encounter this problem before.

My standard error outputs are only 2 short lines.

I opened the files and they seem to be OK, the only difference with the rest seems to be the size of the stdout.

I noticed now that when the files are big but not as big as some others it doesn't get unresponsive, it finishes but it fails to load the cached solution and the tester outputs a parsing error. These seeds without cache work fine.

P.S.: I reckon it's difficult to debug these problems properly because of the contest. And probably it's something about my environment. So don't worry too much about it. I can survive without the caching for the rest of the contest.

I have found the issue and fixed it.
Run: pip install marathoner --upgrade and try it out.

Once again, thank you for your help :)

Everything seems to be working fine now :)

No problem. Thank you a lot for this great tool!