Go to Post Oh geez your using math. I never touched the stuff myself.:o - Koko Ed [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 31-05-2013, 09:22
Nikhil Bajaj Nikhil Bajaj is offline
MATLAB Fan
FRC #0461 (Westside Boiler Invasion)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2002
Location: West Lafayette, Indiana
Posts: 101
Nikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond reputeNikhil Bajaj has a reputation beyond repute
Send a message via AIM to Nikhil Bajaj
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!
Reply With Quote
  #47   Spotlight this post!  
Unread 31-05-2013, 10:30
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: OPR-computation-related linear algebra problem

Quote:
Originally Posted by RyanCahoon View Post
I tried reversing the indices and it took 59.1 (vs 11.9) seconds. A couple other websites say Pascal is row-major.
Long, long ago I was the support for a Pascal compiler that ran on the Unisys A-Series. That compiler did Row major, since that was the underlying architecture of a stack machine. A 2D array consisted of an array of pointers, each pointer referencing a row. Once you got the row, it was fast to "walk the row" since the elements were contiguous in memory.

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?
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
Reply With Quote
  #48   Spotlight this post!  
Unread 31-05-2013, 10:57
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: OPR-computation-related linear algebra problem

Quote:
Originally Posted by Foster View Post
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?
32-bit XP Pro SP3 on a Pentium D 3.4GHz

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
If you run it interactively, by cutting-and-pasting the code directly into the RLaB window (or by typing the commands at the RLaB prompt one at a time), here's the output that will display on the screen:

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
>

Reply With Quote
  #49   Spotlight this post!  
Unread 31-05-2013, 10:59
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,102
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: OPR-computation-related linear algebra problem

Quote:
Originally Posted by Nikhil Bajaj View Post
I can check after work in the lab this evening if no one gets to it first, Ether!
Thank you.


Reply With Quote
  #50   Spotlight this post!  
Unread 31-05-2013, 14:46
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
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
>
And right, if you do toc(); you don't get the output. Which isn't wasn't what I expected.

Xeon 2.93 Ghz cluster. But this code may not be doing any multithreading.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
Reply With Quote
  #51   Spotlight this post!  
Unread 21-06-2013, 15:10
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi