Bogus stats when running SMP programs
Tomasz Zielonka
tomasz.zielonka at gmail.com
Tue Sep 26 02:10:18 EDT 2006
On Tue, Sep 26, 2006 at 01:46:30AM +0100, Ian Lynagh wrote:
> I couldn't reproduce this with a simple program that forked off 4
> threads to do computation on a single CPU machine, and neither could
> someone on IRC with head from Sep 15 on a Core Duo.
>
> Is it possible to send us a small example program along with exactly
> what flags you used to compile and run it please?
It turns out it happens even with the simplest program:
main = return
Compilation command:
ghc -threaded --make B -o B
Running:
tomekz at gfs6:~/src/par$ ./B +RTS -sstderr
./B +RTS -sstderr
21,864 bytes allocated in the heap
1,404 bytes copied during GC (scavenged)
4,156 bytes copied during GC (not scavenged)
21,936 bytes maximum residency (1 sample(s))
1 collections in generation 0 ( 0.00s)
1 collections in generation 1 ( 0.00s)
1 Mb total memory in use
Task 0 (worker) : MUT time: 402094045.13s ( 0.00s elapsed)
GC time: 0.00s ( 0.00s elapsed)
Task 1 (worker) : MUT time: 200.00s ( 0.00s elapsed)
GC time: 0.00s ( 0.00s elapsed)
Task 2 (worker) : MUT time: 0.00s ( 0.00s elapsed)
GC time: 0.00s ( 0.00s elapsed)
INIT time 0.00s ( 0.00s elapsed)
MUT time 0.00s ( 0.00s elapsed)
GC time 0.00s ( 0.00s elapsed)
EXIT time 0.00s ( 0.00s elapsed)
Total time 0.00s ( 0.00s elapsed)
%GC time 0.0% (11.5% elapsed)
Alloc rate 21,864,000,000 bytes per MUT second
Productivity 100.0% of total user, 0.2% of total elapsed
It doesn't happen when I compile without -threaded. But it doesn't show
task statistics then.
Can it have something to do with using gcc-4.1.2?
Perhaps I should try compiling GHC on my machine. Right now I am using
a precompiled snapshot.
Best regards
Tomasz
More information about the Glasgow-haskell-bugs
mailing list