Skip to main content
1-Visitor
April 22, 2013
Solved

MathCAD 13 multithread - multicore

  • April 22, 2013
  • 1 reply
  • 2666 views

Hey everyone,

I am performing some numerical integrations in MathCAD 13 and I was wondering, since it takes some time to compute, is it possible to split up the integration and assign seperate cores to evaluate each part in MathCAD 13?

In other words, is multithreading possible in MathCAD 13 and how is this done?

thx,

rubseveni

Best answer by AlanStevens

I notice a couple of things about your aMatrix.

1. Your integrals seem to be of the form:

Tool1.PNG

which could be written as:

Tool2.PNG

But since X is independent of x, this just becomes 2aX.

2. You repeat the calculation of many terms like NyMatrix, NxMatrix etc at the innermost level of three loops, only to pick off a single value each time. You could speed things up by precalculating them outside of the loops and assigning them to fixed vectors, then just picking off the appropriate component of the vectors inside the loops.

aMatrix is too large and my patience is too limited for me to test if these changes would make any difference myself.

Alan

1 reply

19-Tanzanite
April 22, 2013

Ruben Sevenois wrote:

Hey everyone,

...

In other words, is multithreading possible in MathCAD 13 and how is this done?

thx,

rubseveni

Unfortunately, not in M13. You need Mathcad Prime if you want to multithread. However, there might (or might not) be other ways to speed up your program. If you upload it someone might be able to suggest something.

Alan

1-Visitor
April 22, 2013

Since you requested, in attachment the worksheet.

My main problem is the calculation of "aMatrix". I must warn you though, since this sheet is already quite extensive, trying to improve it might take quite some time. With the current settings, it takes about 2h on my machine solely due to this integration (2.2GHz CPU speed) and my goal is to reduce this to a max of 2 minutes.

Why the two minutes? Well, I have a Mathematica notebook which does the same calculation in 2 minutes. However, due to software limitations at the university I need the program to be written in MathCAD.

Good luck,

rubseveni

19-Tanzanite
April 22, 2013

I notice a couple of things about your aMatrix.

1. Your integrals seem to be of the form:

Tool1.PNG

which could be written as:

Tool2.PNG

But since X is independent of x, this just becomes 2aX.

2. You repeat the calculation of many terms like NyMatrix, NxMatrix etc at the innermost level of three loops, only to pick off a single value each time. You could speed things up by precalculating them outside of the loops and assigning them to fixed vectors, then just picking off the appropriate component of the vectors inside the loops.

aMatrix is too large and my patience is too limited for me to test if these changes would make any difference myself.

Alan