|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#46
|
||||
|
||||
|
Re: OPR-computation-related linear algebra problem
I can check after work in the lab this evening if no one gets to it first, Ether!
|
|
#47
|
|||
|
|||
|
Re: OPR-computation-related linear algebra problem
Quote:
Walking the matrix in col order caused two memory accesses per read, one for the pointer (and the time to do the reference fetch) and the read of the data elements. You could see a -10x reduction in speed doing column order vs row order. -- Thanks for the "back when" reminder. Ether: Just for grins, I tried RLab on our 16 way cluster. For some reason I'm not getting responses to tic()/toc(); What Windows OS are you running RLab under? |
|
#48
|
||||
|
||||
|
Re: OPR-computation-related linear algebra problem
Quote:
Don't forget to leave the semi-colon off the toc() if you want it to display. Here's the code: Code:
diary("output.txt");
tic();
d=readm("d.dat");
toc()
tic();
N=readm("N.dat");
toc()
tic();
x = solve(N,d,"S");
toc()
Here's the output.txt file: Code:
// RLaB diary file: output.txt. Opened Fri May 31 10:53:02 2013
tic();
d=readm("d.dat");
toc()
0
tic();
N=readm("N.dat");
toc()
3.8
tic();
x = solve(N,d,"S");
toc()
14.5
Code:
Welcome to RLaB. New users type `help INTRO'
RLaB version 2.1.05 Copyright (C) 1992-97 Ian Searle
RLaB comes with ABSOLUTELY NO WARRANTY; for details type `help warranty'
This is free software, and you are welcome to redistribute it under
certain conditions; type `help conditions' for details
>
> tic();
> d=readm("d.dat");
> toc()
0
>
>
> tic();
> N=readm("N.dat");
> toc()
3.67
>
>
> tic();
> x = solve(N,d,"S");
> toc()
14.4
>
|
|
#49
|
||||
|
||||
|
Re: OPR-computation-related linear algebra problem
Quote:
|
|
#50
|
|||
|
|||
|
Re: OPR-computation-related linear algebra problem
Code:
Welcome to RLaB. New users type `help INTRO'
RLaB version 2.1.05 Copyright (C) 1992-97 Ian Searle
RLaB comes with ABSOLUTELY NO WARRANTY; for details type `help warranty'
This is free software, and you are welcome to redistribute it under
certain conditions; type `help conditions' for details
> tic();
> d=readm("d.dat");
> toc()
21.9
> tic();
> N=readm("N.dat");
> toc()
28.8
> tic();
> x = solve(N,d,"S");
> toc()
34.8
>
Xeon 2.93 Ghz cluster. But this code may not be doing any multithreading. |
|
#51
|
||||||
|
||||||
|
Re: OPR-computation-related linear algebra problem
I just got a new computer at work with a Xeon E5-1620 and a Quadro 4000 GPU (256 CUDA cores). Using Matlab 2012b:
CPU Invert and Multiply: 1.4292s CPU Linear Solver: 0.22521s CPU Sparse Linear Solver: 0.034423s GPU Invert and Multiply: 0.537926s GPU Linear Solver: 0.218403s Loading the N matrix into the GPU was 1.890602s. Creating the Sparse Matrix for N was 0.032979s. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|