Go to Post So remember, we may be envious of teams who can do water jet cutting and has every possible monetary and engineering advantage, but there are many more people who are envious of every team who has a chance to compete. - Rombus [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
  #1   Spotlight this post!  
Unread 26-05-2013, 20:18
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
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 flameout View Post
Since no-one has done Octave yet, I'll go ahead and do it
Thanks flameout.

Quote:
I can't do SciLab or R because I don't know how to use those

Just installed SciLab 5.4.1 with Intel Math Kernel Library 10.3 on a 7-year-old desktop PC:
  • Intel Pentium D 3.4GHz (x86 Family 15 Model 6 Stepping 4)
  • 32-bit XP Pro SP3
  • 500GB Seagate Barracuda 7200

Code:
-->stacksize(70000000);
 
-->tic; N=read("N.dat",2509,2509); toc
 ans  = 1.672  
 
-->d=read("d.dat",2509,1);
 
-->tic; x=N\d; toc
 ans  = 1.672  
 
-->tic; Ns=sparse(N); toc
 ans  = 0.141  
 
-->tic(); xs = umfpack(Ns,'\',d); toc
 ans  = 0.14



Last edited by Ether : 26-05-2013 at 20:33.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-05-2013, 22:11
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: OPR-computation-related linear algebra problem

Quote:
Originally Posted by Ether View Post
Just installed SciLab 5.4.1 with Intel Math Kernel Library 10.3 on a 7-year-old desktop PC:
Now that I have working SciLab code, I'll go ahead and re-do the tests (with additional instrumentation on the reading). This is on the same computer as before (dual-core, hyperthreaded Intel i5, Linux 3.7.6).

MATLAB R2012b:
Code:
>> tic ; N = dlmread('N.dat'); toc
Elapsed time is 3.074810 seconds.
>> tic ; d = dlmread('d.dat'); toc
Elapsed time is 0.006744 seconds.
>> tic ; r = N \ d; toc
Elapsed time is 0.323021 seconds.
>> tic ; dlmwrite('out.dat', r); toc
Elapsed time is 0.124947 seconds.
I noticed that the solve time was very different from my previous run. This may be due to dynamic frequency scaling -- the results in this post (for all software) is with the frequency locked at the highest setting, 2.501 Ghz. It may also be due to a disk read -- I had not loaded MATLAB prior to running the previous test; now it's definitely in the disk cache. The solve is now consistently taking the time reported above, about a third of a second.

GNU Octave 3.6.2:
Code:
octave:1> tic ; N = dlmread('N.dat'); toc
Elapsed time is 1.87042 seconds.
octave:2> tic ; d = dlmread('d.dat'); toc
Elapsed time is 0.00241804 seconds.
octave:3> tic ; r = N \ d; toc
Elapsed time is 0.528489 seconds.
octave:4> tic ; dlmwrite('out.dat', r); toc
Elapsed time is 0.00820613 seconds.
Octave seems more consistent. The solve time is higher than for MATLAB, but the I/O times are consistently better.

Scilab 5.3.3:
Code:
-->stacksize(70000000);
 
-->tic; N=read("N.dat", 2509, 2509); toc
 ans  =
 
    1.21  
 
-->tic; d=read("d.dat", 2509, 1); toc
 ans  =
 
    0.003  
 
-->tic; x=N\d; toc
 ans  =
 
    1.052  
 
-->tic; Ns=sparse(N); toc
 ans  =
 
    0.081  
 
-->tic(); xs = umfpack(Ns,'\',d); toc
 ans  =
 
    0.081
Scilab failed to read the provided d.dat out of the box (reporting an EOF before it was done reading 2509 rows). I was able to correct this by adding a single newline to the end of d.dat.

FreeMat 4.0:
Code:
--> tic ; N = dlmread('N.dat'); toc
ans =
    2.8630
--> tic ; d = dlmread('d.dat'); toc
ans =
    0.0080
--> tic ; r = N \ d; toc
ans =
    3.4270
FreeMat did not have a dlmwrite function, so I haven't reported the write times for it. The time it took to solve the equations was significantly slower than any of the other programs. This did not improve with subsequent runs.
Reply With Quote
  #3   Spotlight this post!  
Unread 30-05-2013, 14:23
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
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


Just installed Octave3.6.4_gcc4.6.2_20130408 on this computer.

Results:

GNU Octave, version 3.6.4

Octave was configured for "i686-pc-mingw32".

octave:1> tic; d = load('k:/MyOctave/d.dat'); toc
Elapsed time is 0.0625 seconds

octave:2> tic; N = load('k:/MyOctave/N.dat'); toc
Elapsed time is 90.0469 seconds

octave:3> tic; r = N \ d; toc
Elapsed time is 1.03125 seconds

octave:4> tic; r = N \ d; toc
Elapsed time is 0.953125 seconds

octave:5> tic; Ns = sparse(N); toc
Elapsed time is 0.0625 seconds
octave:6> tic; rs = Ns \ d; toc
Elapsed time is 0.1875 seconds

octave:7> tic; Ns = sparse(N); toc
Elapsed time is 0.046875 seconds
octave:8> tic; rs = Ns \ d; toc
Elapsed time is 0.171875 seconds


Anybody know why Octave takes so long to load N ?

Load N times, all on the same computer:
Delphi....0.6 seconds

C.........1.3 seconds

SciLab....1.7 seconds

RLab......3.7 seconds

Python....6.5 seconds

Octave...90.0 seconds


Last edited by Ether : 30-05-2013 at 21:28.
Reply With Quote
  #4   Spotlight this post!  
Unread 30-05-2013, 15:13
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: OPR-computation-related linear algebra problem

LV times were on this computer

Win 7 Professional 64-bit
Xeon CPU E5-1620 3.6GHz
16G RAM

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 31-05-2013, 09:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
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


Is anybody else running Octave on a machine with 32-bit-XP Pro?

Are you having the same 30 second delay for Octave to load, and 90 seconds to load the 12MB N.dat file?


Reply With Quote
  #6   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
  #7   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,042
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
  #8   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,392
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
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 06:44.

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