Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Calculation performance

PL_11061936
8-Gravel

Calculation performance

Hi,

I have a Mathcad sheet that calculates a 13X3 matrice and then returns a 13X(3^13) matrice. It is a lot of calculations. I have a HP computer with Intel I7 processor and 64Mb RAM. Task manager say it uses about 10-12% of processor and 3-5MB of memory. So far it´s been working on this for about four hours, and it´s not finnished. 

 

What is missing to make the calculation go faster? Are there any parameters that I can change in Mathcad so it uses more power?

ACCEPTED SOLUTION

Accepted Solutions

Hi,

Filled out all the ones and with the two changes defining large matrices to full size get 25 seconds

Capture.JPG

Capture2.JPG

Capture3.JPG

Trick is to calculate the size of Combos before hand

View solution in original post

11 REPLIES 11
LucMeekes
23-Emerald III
(To:PL_11061936)

Your resulting matrix will contain

LucMeekes_0-1738101081054.png

elements, assuming they are reals, no complex values that will take up

LucMeekes_1-1738101136230.png

bytes, or

LucMeekes_2-1738101161074.png

MB of RAM, With 64 MB, your PC doesn't even have half of that amount (although I doubt that a PC with an I7 processor only has 64 MB of RAM, Prime 10 alone takes up a good 140 MB, so you couldn't even run it.).

The speed of your calculation will depend on how the result array is created. Without further information on the algorithm, there's little to say about what you could do to speed it up.

 

Success!
Luc

 

My bad, offcourse it shall be 64GB. And yes they are reals. 

Hi,

Could you enclose the worksheet then more guidance can be given to speed it up.

Cheers

Terry

 

Thank you Terry, 

It´s mainly your design 🙂 

... also, I let it run over night and it wasn´t finnished. So I terminated it after approx 16 hours. 

 

Hi

Added a timer at start and finish and it calculates in about 40 seconds?  I have a very fast machine with bags of memory but it should not make this much of a difference.

Processor AMD Ryzen 9 5950X 16-Core Processor, 3401 MHz, 16 Core(s), 32 Logical Processor(s)
Installed Physical Memory (RAM) 128 GB

Capture2.JPG

Capture.JPG

I can see some opportunity for change leave it with me.

Did you fill the right part of the matric with "1"? If not you only calculated 34992 columns. "Antal_Rader=34992"? If so, it sounds pretty much the same as I have

Hi,

Do you have a sheet with the 1's to calculate the 13x3^13 matrix.  Or can you show me where the 1's go with screenshots.

 

Speeding it up:

 

Putting sign[133 = 0 at the top preassigning this whole matrix speeds it up to 25 seconds.

Capture5.JPG

Capture.JPG

Putting a predefinition of Combos size drops performance to 1.7 seconds

Capture4.jpg

 

Capture3.JPG

Since It take so long for the calculation I can´t save a copy where it´s filled.

 

Open up the Excel component 

PL_11061936_0-1738151341880.png

 

Hi,

Filled out all the ones and with the two changes defining large matrices to full size get 25 seconds

Capture.JPG

Capture2.JPG

Capture3.JPG

Trick is to calculate the size of Combos before hand

Cool, that predefiniton made the difference.

Time got down to 34 sec.!

Announcements

Top Tags