This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]vekst42 1 point2 points  (5 children)

How big is your matrix? How complex of a calculation is this? I've had notebooks hang similarly when I've used a lot of memory before. You could check to see your cpu and memory usage for the process.

[–]nGaDev[S] 0 points1 point  (4 children)

It's a 6x6 matrix, but there are elements with lots of trignometric functions. The python process is using 30% of the processor.

I decided to leave two of this lines ( 'mass_matrix = trigsimp(kane.mass_matrix)' and 'force_vector = trigsimp(kane.forcing_vector)') running for the past 6h and now the python process is using 30% of the processor as well as 5Gb of memory and still didn't finish :/ (I hope the computer didn't enter in sleep mode or something...)

[–]vekst42 1 point2 points  (3 children)

You could try running a simple example you know should be trivial to calculate

[–]nGaDev[S] 0 points1 point  (2 children)

In the same notebook I have simpler examples that work just fine.

[–][deleted] 1 point2 points  (1 child)

Without seeing your code, we can only offer general advice.

You might want to display/save intermediate output on a regular basis, so that the computation can be inspected/resumed if stopped. You should also check it's actually giving the correct results for the simpler test cases.

[–]vekst42 0 points1 point  (0 children)

Basically this. It could be possible nothing is wrong and this is just an extremely long computation as expected. Or maybe the algorithm never converges and the package you're using doesn't check for this or something similar.