calculating the time, larger matrices! help pls.

Status
Not open for further replies.

legolas

Padawan
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
 

sakumar79

Technomancer
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
 
OP
L

legolas

Padawan
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
 
Status
Not open for further replies.
Top Bottom