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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Memory Control

Efried
7-Bedrock

Memory Control

Hello,

before crippling my programm allow me to ask whether there is a way to determine how close mathcad comes to the internal memory limit.

many thanks

7 REPLIES 7
Efried
7-Bedrock
(To:Efried)

I just see that some duplication of variables is done in the first part of the programm, where dimensionless variables are handed over to the programm, because of mathcad restritions. The new variables ist identical but has units. May be there is a better way to do that?

Since mathcad uses also external variables in programms, does it help to use external variables? My problem is then that they vary in size.

Fred_Kohlhepp
23-Emerald I
(To:Efried)

You will get a better response if you post an example of what you're doing. (Select "Use advanced editor" in the upper right corner of the reply box to be allowed to attach a file.)

ok here is the symbolic problem - the real one has some MB.

thanks in advance

Fred_Kohlhepp
23-Emerald I
(To:Efried)

Programs can deal with units, Symbolic solutions cannot.

You don't need to strip units to pass variables to al program.

Dear Fred,

thank you very much. So you mean that you can hand over variables without units and the programm then uses them anyhow, because you remove them before handing back the results?

Seems to be magic 😉

thanks

Gerfried

PS: I did not get the second part - What do you propose calling the function n-times avoiding that ugly not enough memory error with Mathcad?

Efried
7-Bedrock
(To:Efried)

The issue got more urgent- What is causing this "system memory exception"?

  1. plots having lots of things to draw - memory consumption is depending on the style of the plot not too?
  2. large arrays/vectors - what is the best method to pack variable using minimum memory having a vector of mixed matrices?
  3. calls to programms having local variables - May local variables pre-defined outside the programm save on memory?

thanks for your hints

Gerfried

Fred_Kohlhepp
23-Emerald I
(To:Efried)

Gerfried;

I try to avoid programming when I can; it's messy, and hard to read. If you're using units then trying to pass two variables with different units out of a program becomes difficult, as you saw.

It's not clear from your example what you're doing, I don't understand why you have two indices (i and j), the example doesn't need them.

Your example doesn't show what causes the memory issue (except for the nested arrays?)

I don't know how to help further without more information; maybe a full program with fewer than ten thousand numbers?

Announcements

Top Tags