#1420: Timers are never started ---------------------+------------------------------------------------------ Reporter: sbrandt | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Keywords: | ---------------------+------------------------------------------------------ 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.
#1420: Timers are never started ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by eschnett):
The file "clock.cc" is not part of the flesh. Who wrote this file? Can you point to it, or attach it?
#1420: Timers are never started ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by hinder):
This ticket is in the "carpet" component, so I guess it is
{{{ Carpet/CycleClock/src/clock.cc }}}
#1420: Timers are never started ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by sbrandt):
Yes, that is the file. Sorry, I didn't know of any other clock.cc.
#1420: Timers are never started ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Resolution: | Keywords: ----------------------+-----------------------------------------------------
Comment (by eschnett):
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.
#1420: Timers are never started ----------------------+----------------------------------------------------- Reporter: sbrandt | Owner: eschnett Type: defect | Status: closed Priority: major | Milestone: ET_2013_11 Component: Carpet | Version: ET_2013_05 Resolution: fixed | Keywords: ----------------------+----------------------------------------------------- Changes (by eschnett):
* status: new => closed * resolution: => fixed
Comment:
Implemented.
trac@lists.einsteintoolkit.org