Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-10-2005, 02:11 PM   #1 (permalink)
Alpha Geek
 
Join Date: Feb 2005
Posts: 959
Default calculating the time, larger matrices! help pls.


hi,

i have managed to write a C code for finding the inverse of a matrix, using a partitioned approach, which helps in running the code relatively parallely. I hav planned to compare the results by running it on a single PC and then on 2 or 3 computers, LAN connected, Linux MPI environment. now i have these difficulties, I came to know the way of calculating the time required for running the program, using <time.h> and the syntaxes, clock_t declaration and stuffs.. but, when i tried the inverse of a 64*64 even matrix, it shows the time taken to execute is "0" seconds.... So, i tried a 256*256 matrix, it says " stack overflow, exception"!!!! then how do i find the time required for running the program? for a relatively larger size matrix... obviousl its also one of the results of my simulation!!! pls help me... it only shows the time required to print things on screen... i mean, when i print all the results like, A matrix, Ainverse matrix etc... it takes long time to print them and so, it tellls.. time taken is "6 seconds" or so.... if i amnt clear enough, i wud explain it further... thk u.

/legolas
__________________
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
legolas is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 04-10-2005, 03:46 PM   #2 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default

hi,
is it possible the stack overflow error is because of some problem with the matrix inversion algorithm and not the time counting? Try to comment out the time count portion of the code and rerun. If u dont get the stack error, the problem is in the timing code.
if possible, can u post the code so that I (and other users) can check it out? (if u dont want to post the code in public u may pm me... though i must warn u that its been a while since i worked with c/c++, so i may be a bit rusty)

Arun
sakumar79 is offline  
Old 13-10-2005, 09:14 AM   #3 (permalink)
Alpha Geek
 
Join Date: Feb 2005
Posts: 959
Default

hi,

i hav resolved the problem, i guess ! its coz of the size of the matrices intialized only, they overflow my stack memory! and i hav reduced the size relatively and am using the matrices and destroyin as efficient as possible. but even if it overflows, what cud we do? only resort to a system with higher RAM ? or stil we can do with modification of the code? if so how shud be the modification?

/legolas
__________________
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
legolas is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by clinton
- by Who
- by bhaskar
- by soumya

Advertisement




All times are GMT +5.5. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2