Boost logo

Boost Users :

Subject: [Boost-users] Interaction between boost::timer and boost::thread
From: Matthieu Brucher (matthieu.brucher_at_[hidden])
Date: 2010-09-08 03:04:14


Hi,

I've decided to use boost::thread to run a background thread in my MPI
application. Only one rank has a timer, and I only make some calls to
elapsed().

Here is what I get if I print the values I retrieve from this single rank:
2.98
(...)
6.58
6.6
6.6
6.61
6.71
6.73
6.75
2.69
2.69
6.78
2.77
2.77
2.83
6.91
2.87
2.87
6.94
6.96
6.97
2.91
2.91
2.91
2.94
7.02
2.99
3.01
3.01
3.02
3.05
3.05
(...)

You may notice that the values are not incresing, which leads to very
bad total time in my case.

Is there a known interaction between these two classes? I'm trying to
create a simple example, but I can't get boost::timer to count sleep()
time :|

Matthieu Brucher

-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net