std.parallelism: Request for Review
Russel Winder
russel at russel.org.uk
Sun Feb 27 04:26:57 PST 2011
On Sat, 2011-02-26 at 16:13 -0500, dsimcha wrote:
[ . . . ]
> One last note: Due to Bug 5612
> (http://d.puremagic.com/issues/show_bug.cgi?id=5612), the benchmarks
> don't work on 64-bit because core.cpuid won't realize that your CPU is
> multicore. There are two ways around this. One is to use 32-bit mode.
> The other is to change the benchmark files to manually set the number
> of cores by setting the defaultPoolThreads property.
Actually this bug is worse that at first appears: 32-bit is badly
broken in that the core count of one processors is reported, it ignores
having multiple processors. So on my twin-Xeon in 64-bit core.cpuid
report 1 and in 32-bit mode it reports 4 instead of 8.
Aaarrrgggghhhhhh....
NB The source code link on
http://digitalmars.com/d/2.0/phobos/core_cpuid.html points to
https://github.com/D-Programming-Language/phobos/blob/master/core/cpuid.d which is a 404.
I guess I'll have to clone Phobos in its entirety in order to take a
look at this. Damn I only want to look at the one file.
In 64-bit mode:
|> scons runall
/usr/bin/python /home/Checkouts/Mercurial/SCons/bootstrap/src/script/scons.py runall
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
dmd -I. -I/home/users/russel/lib/D -m64 -release -O -inline -c -ofeuclidean.o euclidean.d
gcc -o euclidean -m64 euclidean.o -L/home/users/russel/lib.Linux.x86_64 -L/home/users/russel/lib.Linux.x86_64/DMD2/lib64 -lparallelism -lphobos2 -lpthread -lm -lrt
dmd -I. -I/home/users/russel/lib/D -m64 -release -O -inline -c -ofmatrixInversion.o matrixInversion.d
gcc -o matrixInversion -m64 matrixInversion.o -L/home/users/russel/lib.Linux.x86_64 -L/home/users/russel/lib.Linux.x86_64/DMD2/lib64 -lparallelism -lphobos2 -lpthread -lm -lrt
dmd -I. -I/home/users/russel/lib/D -m64 -release -O -inline -c -ofmillionSqrt.o millionSqrt.d
gcc -o millionSqrt -m64 millionSqrt.o -L/home/users/russel/lib.Linux.x86_64 -L/home/users/russel/lib.Linux.x86_64/DMD2/lib64 -lparallelism -lphobos2 -lpthread -lm -lrt
dmd -I. -I/home/users/russel/lib/D -m64 -release -O -inline -c -ofparallelSort.o parallelSort.d
gcc -o parallelSort -m64 parallelSort.o -L/home/users/russel/lib.Linux.x86_64 -L/home/users/russel/lib.Linux.x86_64/DMD2/lib64 -lparallelism -lphobos2 -lpthread -lm -lrt
dmd -I. -I/home/users/russel/lib/D -m64 -release -O -inline -c -ofpipelining.o pipelining.d
gcc -o pipelining -m64 pipelining.o -L/home/users/russel/lib.Linux.x86_64 -L/home/users/russel/lib.Linux.x86_64/DMD2/lib64 -lparallelism -lphobos2 -lpthread -lm -lrt
runEverything(["runall"], ["euclidean", "matrixInversion", "millionSqrt", "parallelSort", "pipelining"])
======== euclidean ============
Serial reduce: 1158 milliseconds.
Parallel reduce with 1 cores: 1159 milliseconds.
======== matrixInversion ============
Inverted a 256 x 256 matrix serially in 62 milliseconds.
Inverted a 256 x 256 matrix using 1 cores in 60 milliseconds.
======== millionSqrt ============
Parallel benchmarks being done with 1 cores.
Did serial millionSqrt in 956 milliseconds.
Did parallel foreach millionSqrt in 990 milliseconds.
Did parallel map millionSqrt in 985 milliseconds.
======== parallelSort ============
Serial quick sort: 4542 milliseconds.
Parallel quick sort: 4616 milliseconds.
======== pipelining ============
Did serial string -> float, euclid in 2097 milliseconds.
Did parallel string -> float, euclid with 1 cores in 1939 milliseconds.
scons: done building targets.
In 32-bit mode:
<pending, I need to fix the SCons D mode to get this to work :-(>
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110227/40611d3e/attachment-0001.pgp>
More information about the Digitalmars-d
mailing list