- removed comment
Timers are never started
I modified clock.cc to add a boolean named "started". I initialized it to false in the constructor, set it to true inside the start() method, and call abort() inside stop() if "started" is false. It fails for me during every run.
This is a problem because the variable "last" inside the clock class is uninitialized, and is potentially random.
I'm not sure what's going wrong, as it appears that funcs->start() is being called inside CactusTimers.c, but somehow the relevant start function isn't called in clock.cc.
Keyword:
Comments (5)
-
-
- removed comment
This ticket is in the "carpet" component, so I guess it is
Carpet/CycleClock/src/clock.cc
-
reporter - removed comment
Yes, that is the file. Sorry, I didn't know of any other clock.cc.
-
- removed comment
I think that timers that are running when a clock is created have clocks added that are not started. The problem is that Cactus does not keep track of whether a timer is running, and thus does not know whether to start such clocks. In other clocks, I either add a "bool is_running", or implicitly call start when the clock is created.
-
- changed status to resolved
- removed comment
Implemented.
- Log in to comment
The file "clock.cc" is not part of the flesh. Who wrote this file? Can you point to it, or attach it?