-
Notifications
You must be signed in to change notification settings - Fork 222
added features for runsolver/starexec compatibility #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Now the stdout and stderr work, interleaved, and I added "-" to allow output to stdout. But the --timelimit and --walltimelimit are not working. |
|
The --timelimit and --walltimelimit are working. I was confused by the amount of WC time it takes to print a lot of tracing from my test program (recursive Fibonacci). |
|
When you are happy with what I have done give me a push, and I'll work on the container version. |
|
In general this looks quite promising, nice, and thank you! We can still discuss naming a little bit. I can also somewhat understand the request for configuring output files, though maybe you can also simply redirect the output? Maybe we should not add the overhead of piping the tool output through BenchExec for everyone and disable the new code if no timestamp is requested? Should be easy.
Would be great! I just remembered that we have a start of the GSoC attempt on this here: https://github.com/sosy-lab/benchexec/pull/1170/files It is a more complicated because it keeps stdout and stderr separate and thus needs to work on two streams in parallel. But actually I think your approach should also work, I don't see any disadvantage right now. |
|
Yes, last night I also thought about disabling the code for timestamping. I'll do it this afternoon. I like the symmetry of having "-" to pipeline both stdin and stdout/stderr ... it's easy for users to remember when it's the same in both directions. |
|
The container version has got me stumped for now. I might need you (Philip) to nudge me in the right direction. |
|
I see the code ... If I have a soft limit, typically that means the solver will catch the SIGTERM and continue. The code sets the termination reason with self.callback("cputime-soft"). If the solver hits the hard limit while continuing, and that really stops the solver, then the code tries to set the termination reason with self.callback("cputime"). However, as it was set previously the real new reason is not recorded and the output says "terminationreason=cputime-soft". I suggest taking out "if not self._termination_reason:". Whatcha think? |
|
It is deliberate that we record the first reason for termination that occurs, because this is the actual reason why the run was a failure. For example, if the process first reaches the soft memory limit and then the memory limit, it is a timeout and not an OOM. |
|
This PR is accumulating more and more independent features :-) I like them, but it is becoming a little bit hard to review the diff and keeping in mind which pieces of changes belong together. How much effort would it be to split off orthogonal stuff like soft wall-time limits and output redirections? If it is too much effort we can probably proceed with the current MR, but otherwise it would be helpful (and allow merging already finished features). |
Finally I could really think about this. I have the hypothesis that either of the following would work:
I would tend to say 3. looks like the most promising option. The place to create these new pipes would be in the same place here we already create pipes by calling |
|
It would be hard to separate the varo=ious things I have done:
I will start a separate branch for the containerexecutor.py work. |
|
Regarding the reason, how about ... def _set_termination_reason(self, reason): |
|
I have a cunning scheme for the container case, but my limited Python skills are holding me back. I think I'll need help from you or Marco (he's a Python wizard). |
|
I marked the lines with change with ZZZZ, if that helps. I can remove those lines ATGB. |
|
Strangely, the non-container "solver" runs slower than the container version. |
|
You said we should discuss, at least, the option names. Already there was yuckkiness --timelimit --softtimelimit --walltimelimit, and my softwalltimelimit was a horrible attempt to be compatible. I know you have to keep the old ones for backwards compatibility, but they could be deprecated under these new options ... --timestamp and --add-eof seem OK to me. I shortened the stats file one to --statistics-file, which is fine for me. Any others? |
Hi Philip, I'll happily take feedback rather than a merge. I have done the work for only the --no-container case. I run with ...
bin/runexec --no-container --read-only-dir / --no-output-header --timestamp --add-eof --