help-octave
[Top][All Lists]
Advanced

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

Re: MinGW libblas [WAS: Re: Octave 3.6.0 on Windows XP plot fails.]


From: Martin Helm
Subject: Re: MinGW libblas [WAS: Re: Octave 3.6.0 on Windows XP plot fails.]
Date: Mon, 20 Feb 2012 11:13:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 20.02.2012 11:04, schrieb Tatsuro MATSUOKA:
> Hello
>
> Please tell me which is correct to measure the performance.
>
> 1. n=2000; A=randn(n); B=randn(n);tic; C=A*B; t=toc, MFLOPS=2*n^3/t*1e-6
>
> 2. n=2000; A=randn(n); B=randn(n);ta=cputime; C=A*B; t=cputime-ta, 
> MFLOPS=2*n^3/t*1e-6
>
> Case 1 gives two - four times faster than that of the case 2.
>
> Example
> octave:2> n=2000; A=randn(n); B=randn(n);tic; C=A*B; t=toc, 
> MFLOPS=2*n^3/t*1e-6
> t =  0.70904
> MFLOPS = 2.2566e+004
> octave:3> n=2000; A=randn(n); B=randn(n);ta=cputime; C=A*B; t=cputime-ta, 
> MFLOPS=2*n^3/t*1e-6
> t =  1.4040
> MFLOPS = 1.1396e+004
>
>
> Which test is correct to check the performance.
>
> Regards
>
> Tatsuro
>
The cputime sums together the time spent on all cpu's so if it runs lets
say a total of 4sec till its complete parallel on 4 cpu's then cputime
will give 16sec.
You better use tic/toc.


reply via email to

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