cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Mathcad Prime multithreading

HayleyW87
1-Newbie

Mathcad Prime multithreading

My company has recently gone over to Mathcad Prime due to most of our employees only needing to do basic calculations but I tend to need to use it for a wider range of uses but I still need to be using the same version as everyone else

At present I am working on a wave loading worksheet and need to integrate between two points to obtain the force on an object but I keep getting a message saying that it can not converge (even though it can solve the parts of the integration individually)

Naturally I tried to see what options I had and I noticed that I had the multithreading enabled so I thought I'd turn that off and now it can solve the worksheet. Then tried turning it on again and it couldnt solve the equation, then on and again it solved it

My question is what is going on with the multithreading and how it affects what it does when it integrates an expression?

I know multithreading allows use of more of the computers cores and lets multiple equations be solved at once but it also seems to prevent the mathcad from solving some integrations. (as it was able to solve some, but not others)

What other functions can't be used when you have multithreading enabled and what kind of mathcad sheets was multithreading designed for?

11 REPLIES 11
MikeArmstrong
5-Regular Member
(To:HayleyW87)

Very strange. With multi-threading turned on, Mathcad is able to calculate equations in parallel. However, it must respect the logical order, i.e. it must calculate definitions of variables before they are used so I would have expected Mathcad to converge to a solution in both cases.

Can you upload a worksheet?

Unfortunately I wont be able to upload the sheet itself because of the content but it is basically the stokes wave theory (obtained from Fenton) to obtain velocities and accelerations of particles and using the Morrisons equations to integrate between the seabed and crest elevation to obtain a wave loading

Below is a screen shot of what happens though:

With multithreading on:

Defining+the+function+-+multithreading.PNG

With multithreading disabled:

Defining+the+function+working.PNG

Oddly enough, it gave a new error saying units werent compatible... not had that one before, usually it just says the converging error, but whatever the error says, it still is an error when I have multithreading enabled

and a new error using the multithreading enabled:

Result2.PNG

Guess what the error message keeps changing (Moment is also an integrating equation but it is also multiplied by the distance).

hence why I asked my original questions, why can't it seem to solve a sheet when multithreading is enabled even though it can solve it when it is disabled

MikeArmstrong
5-Regular Member
(To:HayleyW87)

Without a worksheet it will be difficult to determine what the problem is. Maybe you are best reporting it to PTC and get their take on the issue?

hence why I asked my original questions, why can't it seem to solve a sheet when multithreading is enabled even though it can solve it when it is disabled

This may be due to numerical instabilities which can not be told without seeing the sheet (and maybe not even if the sheet is exposed).

You may consider open a case and report the issue to PTC.

MikeArmstrong
5-Regular Member
(To:HayleyW87)

Hayley Wear wrote:

Unfortunately I wont be able to upload the sheet itself because of the content but it is basically the stokes wave theory (obtained from Fenton) to obtain velocities and accelerations of particles and using the Morrisons equations to integrate between the seabed and crest elevation to obtain a wave loading

That's understandable.

That is actually my line of work - subsea engineering. However, we have recently written spreadsheets inline with DNV-F109 using Spectral Analysis.

Looks like you found a bug you should report to PTC support!

I understand that people may not be able to help without seeing the sheet, I was just wondering whether there was a known issue with multithreading or if people knew exactly how the multithreading option works that would cause an issue with functions such as integration

Thanks for everyones help, I guess PTC it is then

YOu could be able to reproduce the issue creating a dummy function but chances are the effect will not show then as is may have to do with the exact way your functions are defined.

I also don't think the message will show as I believe it is also affected by the number of variables that essentially go into the equation. The Mathcad sheet is only 9 pages long and depending on where I ask it to be solved, it may solve or not, but there is always some stuff it can't do somewhere when I have multithreading enabled

I find that Mathcad Prime is also very slow at solving compared to the old versions. so I just feel it struggles a lot. I see a lot about Mathcad Prime being faster but I think it tends to refer to when you're dealing with large data sets as my experience is it's always been a lot slower. I don't usually deal with large data sets, usually I just have many calculation steps.

MikeArmstrong
5-Regular Member
(To:HayleyW87)

Multi-threading does introduce some overhead, so it is possible to come up with the case where the overhead is bigger than the gain.

For most worksheets, the calculations are serial and enabling multi-threading can slow the calculation speed down.

Top Tags