Re: [eigen] Why BTL measures CPU time? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Why BTL measures CPU time?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Sat, 10 Mar 2012 16:08:18 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=L7Wowv4xHLy8C9BKd97NINwLaA/FKE2zX7iW5H+xa7U=; b=X6TxdZm+09MEsk+W+H8mlaMzP32aWC59fBW06HPnKAhZhPfIZemoog0OyuB+A0zOoV Z8wet3wFiFVL7NdKHV3CYVA7VxcS6GOLr662UblaGoU7xcVbkclmPmbMpvLDr/AKPd0Q lLJ5fQETmo6NYfAYyU0LQ9Ibat3lj4Pqr2Zpnqf44IHtejE5823eEX0/n/GtjPg0aVZD uaAraYMeIku/pvOETlibfPdmeuDLUtIs0RYj3k1NqZsIewHPeq3+ISoR+qVVhGICLSsp MmeyeXAragN4zdH5v/R7xlCnQGg6dSa4dmb3ZqRnpDJYz0WrGQOPgaZ/Z2ZSc3oxq5n4 exaw==
Well, it was designed to bench sequential code only, and in this case
the CPU time is more stable (less sensitive to the system overhead).
But you can use real time timer with the "--real" option. Recall that
options are read from the BTL_CONFIG environment variable at runtime.
gael
On Fri, Mar 9, 2012 at 8:51 PM, Andrea Arteaga <yo.eres@xxxxxxxxx> wrote:
> I was looking into the BTL because I had a problem with the
> benchmarks: all the multi-threaded libraries that I tested seemed to
> be slower than the respective single-threaded counterparts (e.g. atlas
> VS atlas-threads, openblas VS openblas-threads,...).
>
> So I discovered that the BTL, within the Portable_Timer is measuring
> the CPU time, not the wall-clock time. This means that in the
> multi-threaded case all the CPU times of the threads were summed
> together, resulting in no advantage of using many threads, but rather
> a disadvantage because of the overhead. Nevertheless, when benchmarked
> against the wall-clock time the multi-threaded implementations are
> actually faster. Why is the CPU time measured?
>
> Best regards
> Andrea Arteaga
>
>