HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy feedback >> MP on 2 Dual Xeon 64bit
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1156455702

Message started by tlefebure on Aug 24th, 2006 at 2:41pm

Title: MP on 2 Dual Xeon 64bit
Post by tlefebure on Aug 24th, 2006 at 2:41pm
Hello,
I'm trying to run hyphy with Linux (Ubuntu 6.06) on the following box:
[code]uname -a
Linux babylon 2.6.15-26-amd64-xeon #1 SMP PREEMPT Thu Aug 3 03:58:27 UTC 2006 x86_64 GNU/Linux[/code]
So basically I have ~4 processors with hyper-threading (virtually 8 cpus). Compilation works great with ./build.sh MP or ./build.sh MP2. But when I try speedtest.bf, I have quite bad results for the Xeon 3.73GHz processors, and the computation time is almost independent of the number of given cpus:

./HYPHYMP CPU=1 -> 31s
./HYPHYMP CPU=1 -> 22s
./HYPHYMP CPU=1 -> 22s
./HYPHYMP CPU=1 -> 21s
./HYPHYMP CPU=1 -> 22s
./HYPHYMP CPU=1 -> 21s
./HYPHYMP CPU=1 -> 24s
...

I monitored cpus during those runs, and only 1 was used independently of the CPU flag (compiling with MP or MP2 has no effect).

Am I doing something wrong?
Thanks
Tristan


Title: Re: MP on 2 Dual Xeon 64bit
Post by Sergei on Aug 24th, 2006 at 3:12pm
Dear Tristan,

This is odd (I presume you changed CPU=1 to CPU=2, CPU=3 etc). I just recompiled the latest build on a 4 core Opteron, and I am seeing speedups and appropriate numbers of threads based on the CPU command.

Hyperthreading doesn't actually speed up things much, in my experience (I saw 10-15% gains on older Xeons). My only guess is that the PREEMPT kernel flag may have something to do with thread scheduling...

My box has
[code]
Linux monkeysupreme 2.4.29-295u0001.Scyldsmp #1 SMP Thu Jun 9 17:05:43 PDT 2005 x86_64 x86_64 x86_64 GNU/Linux[/code]

and I have not heard of MP issues like yours before.

Sorry I can't be of more help.

Sergei

Title: Re: MP on 2 Dual Xeon 64bit
Post by tlefebure on Aug 24th, 2006 at 3:21pm
yep, sorry, it should be written:

./HYPHYMP CPU=1 -> 31s
./HYPHYMP CPU=2 -> 22s
./HYPHYMP CPU=3 -> 22s
./HYPHYMP CPU=4 -> 21s
./HYPHYMP CPU=5 -> 22s
./HYPHYMP CPU=6 -> 21s
./HYPHYMP CPU=7 -> 24s

I will look around the PREEMPT flag ...

Title: Re: MP on 2 Dual Xeon 64bit
Post by Sergei on Aug 24th, 2006 at 3:25pm
Dear Tristan,

You get a decent speed-up from 1 to 2, but then everything levels out, so at least for CPU=2, there is something going on. The test data set is too small to see much improvement past 3 or 4 CPUs, though (that is not suprising). I am a bit puzzled by why the single processor result is so poor, given that my tests on a 3.2 GHz (old) Xeon (under Windows) gave 16 seconds (1 CPU) and 10 seconds (2 CPUs).

Let me make a bigger speedtest example for you to test...

Cheers,
Sergei

Title: Re: MP on 2 Dual Xeon 64bit
Post by tlefebure on Aug 24th, 2006 at 4:28pm
I've tried the speedtest_2.bf, and obtained:
CPU=1 -> 87
CPU=2 -> 86
CPU=4 -> 92
CPU=6 -> 96

The more cpus we use, the longer hyphy is! (but times may not be significantly different)

The problem seems that I can't use multi-threading. I'm now looking for another program to test the multi-threading on this box.
Tristan

Title: Re: MP on 2 Dual Xeon 64bit
Post by Sergei on Sep 15th, 2006 at 4:41pm
Dear Tristan,

MP builds seem to be working fine on the Xeon, but the standard speedtest.bf example is too small to be effectively parallelized on your machine; a larger example gets 2x speed up as expected from CPU=1 to CPU=2 (it's in my home directory under BatchFiles as speedtest_large.bf)

Cheers,
Sergei

Title: Re: MP on 2 Dual Xeon 64bit
Post by tlefebure on Sep 19th, 2006 at 5:44am
Thanks ! It works great.

So on 64bit Xeon cpus, the compilation flags should be:
COMPILER_FLAGS=" -w -c -fsigned-char -O3 -fpermissive -I`pwd`/Source -I`pwd`/Source/SQLite -march=nocona "

Tristan

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.