[Beowulf] Fastest way to compute Euclediant distance [spin off from: Building new cluster - estimate]

Eric Thibodeau kyron at neuralbs.com
Thu Aug 7 10:02:58 PDT 2008


>
>>>   Most of the arguments I have heard are "oh but its compiled with 
>>> -O3" or whatever. Any decent HPC code person will tell you that that 
>>> is most definitely not a guaranteed way to a faster system ...
>> Hey...as I stated above, one would have to be quite silly to claim 
>> -O3 as the all well and all good optimization solution. At least you 
>> can rest assured your solutions will add up correctly with GCC. To get a 
> Well, sometimes.  You still need to be careful with it.
>
> This said, I am not sure icc/pgi/... are uniformly better than gcc.  I 
> did an admittedly tiny study of this http://scalability.org/?p=470 
> some time ago.  What I found was the gcc really held its own.  It did 
> a very good job on a very simple test case.
Very nice post, thanks for that, it so happens I am going through the 
exact same steps trying to optimize a very simple piece of code 
computing the Euclidean distance and I was a little stomped to find out 
the simople C code outperforms BLAS (both GOTO and MKL). If you have 
gnuplot, a BLAS library with cblas interface, and icc installed, all you 
have to do is run `make` with the three attached files in the same dir 
and you'll get nice plots of what's going on. I'm also attaching an 
example run with:

icc 10.1.017
gcc 4.3.1
GOTO BLAS 1.24

Eric
PS: regular disclaimers about crappy code writing apply ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EuclideanDist.c
Type: text/x-csrc
Size: 3596 bytes
Desc: not available
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20080807/63baf0c3/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20080807/63baf0c3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Plot.gp
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20080807/63baf0c3/attachment-0001.ksh>


More information about the Beowulf mailing list