octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multithreaded Atlas can be used by GCC-4.3.3-sjlj-mingw-TDM (Was Re: Sjl


From: Tatsuro MATSUOKA
Subject: Multithreaded Atlas can be used by GCC-4.3.3-sjlj-mingw-TDM (Was Re: Sjlj vs dwarf2 on mingw for octave)
Date: Mon, 30 Mar 2009 18:26:25 +0900 (JST)

Hello

I wrote prevously
> Sjlj octave-3.0.4RC7
> octave.exe:2> testOregoB
> ans =  1.5469
> 
> Dwarfs octave-3.0.4RC5
> octave:3> testOregoB
> ans =  1.1875

The speed of octave interpreter that built by dw2-eH is 25-30% faster than that 
by sjlj-EH on
mingw-GCC-4.3.3-TDM.

However I found that the merit of sjlj EH on the view point of multithreaded 
ATLAS. 

By gcc-4.3.3 mingw (sjlj), I found that multithreaded atlas can be used, 
without error by configured
with the following
 
../../octave-3.0.4RC7/configure --prefix=/c/Programs/octave-3.0.4RC7s
--with-blas=--with-blas='-lptf77blas -latlas -lpthread'

 d:\usr\Tatsu\mingwhome\octaves\octave-3.0.4RC7\scripts/geometry\griddata3.m  
PASS    2/2

If I use dw2 version of gcc-4.3.3, griddata3.m cannot be executed due to the 
error of pthread mutex.
(I do not remember in detail.)

The speed check by 
n=2000; A=randn(n); B=randn(n);tic; C=A*B; t=toc, MFLOPS=2*n^3/t*1e-6

MFLOPS =  4970.9 (Ht-Pentium-4 prescott 3.4GHz)

On the other hand single thread ATLAS by GCC-4.3.3-dw2 on the same computer, 
n=2000; A=randn(n); B=randn(n);tic; C=A*B; t=toc, MFLOPS=2*n^3/t*1e-6

MFLOPS = 4830.2 

The multithreaded atlas is a little bit faster than the single thread atlas 
even though 
one physical core with hyper-threading.
(On GotoBLAS with smp on for my computer is slower than that by single thread.)

If the multi-thread atlas to Core2Duo and so on, the merit of sjlj EH may exist.

Of course, the data should be accumulated for other computers.
I will distribute the dependency library kit for mingw in thre near future on 
my web.

Similar kind of experiments on Unix are also to be useful for users who would 
like to carry out fast
Matrix calculation of large n (n x n).

Regards

Tatsuro 

 
--- Tatsuro MATSUOKA  wrote:

> Hello
> According to README-gcc-tdm.txt in MiGW GCC by TDM, there exists the 
> following description,
> 
> ***********
> Until recently, only SJLJ has been available for the Windows
> platform. This affects you, the end user, primarily in programs that throw and
> catch exceptions. Programs which utilize the DW2 unwind method handle 
> exceptions
> much more quickly than programs which utilize the SJLJ method. However, the 
> DW2
> method increases code size by a noticeable amount, and additionally cannot yet
> unwind (pass exceptions) through "foreign" stack frames: stack frames compiled
> by another non-DW2-enabled compiler, such as OS DLLs in a Windows callback.
> ***********
> 
> 
> I have tested this the following the code, 
> 
> 
> #script testOregoB.m
> function dx = oregonator_m (x, t)
> 
>   dx = zeros (3, 1);
> 
>   dx(1) = 77.27*(x(2) - x(1)*x(2) + x(1) - 8.375e-06*x(1)^2);
>   dx(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27;
>   dx(3) = 0.161*(x(1) - x(3));
> 
> end
> 
> % The test of `oregonator'.
> x0 = [ 4; 1.1; 4 ];
> %t = [0, logspace (-1, log10(303), 150), logspace (log10(304), log10(500), 
> 150)];
> %t=linspace(0,500,1000);
> t=0:0.5:500;
> ts=cputime();
> y = lsode ('oregonator_m', x0, t);
> cputime()-ts
> plot (t',y(:,1),"",t',y(:,2),"",t',y(:,3));
> #*******end of script
> 
> Sjlj octave-3.0.4RC7
> octave.exe:2> testOregoB
> ans =  1.5469
> 
> Dwarfs octave-3.0.4RC5
> octave:3> testOregoB
> ans =  1.1875
> 
> Optimizing option
> export FFLAGS='-O3 -fomit-frame-pointer'
> export CFLAGS='-O3 -fomit-frame-pointer'
> export CXXFLAGS='-O3 -fomit-frame-pointer'
> 
> For Benjamin Binary of octave-3.0.2
> > testOregoB
> ans =  1.2344
> 
> That is near to 3.0.4RC5 with dwarf2 because Benjamin's binaries are built by 
> GCC-4.3.0-TDM-dw2.
> The speed of binaries built with dw2 is 25 to 30 % faster than that of sjlj.
> 
> This is a just record so that I would not like to say dw2 EH is better than 
> sjlj EH.
> 
> Regards
> 
> Tatsuro  
> 
> 
> 
> --------------------------------------
> Power up the Internet with Yahoo! Toolbar.
> http://pr.mail.yahoo.co.jp/toolbar/
> 


--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]