Boost logo

Ublas :

From: Paul C. Leopardi (leopardi_at_[hidden])
Date: 2005-03-14 06:07:21


Hi all,
I have updated my test code and my output. Code is attached.
Output and comments below. Perhaps someone could explain why my results should
be expected to be different from Gunter's and why they should be the order
that they are?
Best regards

On Mon, 14 Mar 2005 08:55 am, Gunter Winkler wrote:
> Hello,
>
> my results are a different than these of Paul.

My results are now approximately:
compressed_matrix<double> ms3(-ms1); // O(N)
ms1 = mt ; // O(N)
mt = prod(ms1,ms2); // O(N^3)

My hardware, results of `cat /proc/cpuinfo`:
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 4
model name : AMD Athlon(tm) 64 Processor 3200+
stepping : 8
cpu MHz : 2009.158
cache size : 1024 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 pni syscall nx mmxext lm 3dnowext
3dnow
bogomips : 3981.31
TLB size : 1088 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

My Linux, results of `uname -a`:
Linux linfinit 2.6.8-24.11-default #1 Fri Jan 14 13:01:26 UTC 2005 x86_64
x86_64 x86_64 GNU/Linux

My gcc, results of `g++ -v`:
Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada
--disable-checking --libdir=/usr/lib64 --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib64
--with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)

Compilation:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -Wall -ansi -DNDEBUG -g -O3
-finline-limit=4000 -D_GLUCAT_HAVE_UBLAS_LU_H -fno-check-new -fabi-version=0
-fexceptions -MT test_ublas.o -MD -MP -MF ".deps/test_ublas.Tpo" -c -o
test_ublas.o test_ublas.cpp; \
then mv -f ".deps/test_ublas.Tpo" ".deps/test_ublas.Po"; else rm -f
".deps/test_ublas.Tpo"; exit 1; fi
/bin/sh ../libtool --silent --mode=link g++ -Wall -ansi -DNDEBUG -g -O3
-finline-limit=4000 -D_GLUCAT_HAVE_UBLAS_LU_H -fno-check-new -fabi-version=0
-fexceptions -o test_ublas test_ublas.o

Typical output:
n: 1, neg time: 0, ass time: 0, sprod time: 0
n: 2, neg time: 0, ass time: 0, sprod time: 0
n: 4, neg time: 0.00976562, ass time: 0, sprod time: 0
n: 8, neg time: 0.00976562, ass time: 0.00976562, sprod time: 0
n: 16, neg time: 0, ass time: 0.0195312, sprod time: 0.3125
n: 32, neg time: 0.0195312, ass time: 0.0292969, sprod time: 0.3125
n: 64, neg time: 0.0292969, ass time: 0.078125, sprod time: 3.125
n: 128, neg time: 0.0585938, ass time: 0.136719, sprod time: 21.25
n: 256, neg time: 0.078125, ass time: 0.302734, sprod time: 160
n: 512, neg time: 0.15625, ass time: 0.595703, sprod time: 1239.06
n: 1024, neg time: 0.419922, ass time: 1.13281, sprod time: 9710.31
n: 2048, neg time: 0.908203, ass time: 2.2168, sprod time: 76985.3