Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
MP on 2 Dual Xeon 64bit (Read 4171 times)
tlefebure
YaBB Newbies
*
Offline



Posts: 36
Cornell University
MP on 2 Dual Xeon 64bit
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 


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

Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: MP on 2 Dual Xeon 64bit
Reply #1 - 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 



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

Sorry I can't be of more help.

Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
tlefebure
YaBB Newbies
*
Offline



Posts: 36
Cornell University
Re: MP on 2 Dual Xeon 64bit
Reply #2 - 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 ...
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: MP on 2 Dual Xeon 64bit
Reply #3 - 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
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
tlefebure
YaBB Newbies
*
Offline



Posts: 36
Cornell University
Re: MP on 2 Dual Xeon 64bit
Reply #4 - 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
Back to top
 
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: MP on 2 Dual Xeon 64bit
Reply #5 - 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
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
tlefebure
YaBB Newbies
*
Offline



Posts: 36
Cornell University
Re: MP on 2 Dual Xeon 64bit
Reply #6 - 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
Back to top
 
WWW WWW  
IP Logged