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

Out of memory

Re: Out of memory

I have looked at the release notes of the current  Mathcad 15 M050 (see attached) and could not find any note that a memory leak would have been fixed, but there are some other bug fixes after M030 which may be of interest:

  • Mathcad 15.0 M050
    2974950 Fixes issue with exporting matrix with large number of rows to Excel using WRITEEXCEL function
    6381616 Fixes Win 10 issue with Mathcad hang when editing excel component
    7015927 Fixes hang when editing the excel component in a worksheet having web control submit button in Windows 10

 

  • Mathcad 15.0 M045
    2879283 Fixes issue with Mathcad 15.0 M040 in handling matrices with 256 or more elements

Re: Out of memory

Without seeing your Mathcad worksheet I have to guess. But, as you say, this has come up before, many times, so it's an educated guess.

 

How can such a small amount of data lead to such huge memory requirements? The answer is probably that you are creating many copies of the data in the worksheet. Take this simple example, where A is your data:

 

B:=A*2

C:=sin(B)

D:=log(C)

 

B, C, and D are all copies of your data, and all are stored internally, because Mathcad has to be able to display them at any time. You might think that overwriting A is a solution:

 

A:=A*2

A:=sin(A)

A:=log(A)

 

It's not. Each new A is still held internally in memory. The second A can't overwrite the first A because Mathcad has to be able to display both, depending on where in the worksheet you put an evaluation.

 

Creating a long series of static calculations is a bad way of doing things in Mathcad. There are many reasons why that is true, and this is one of them (especially when it comes to data analysis).

 

Instead, define a function:

f(A):=log(sin(A*2)

 

This takes negligible memory, and has the advantage of being reusable throughout the worksheet.

 

Then you can do

 

B:=F(A).

 

All the intermediate results, which you likely didn't need to look at anyway, are gone, along with the memory required to store them.

Re: Out of memory

Vladimir, do you also know where you can download mathcad 15M050? The link goes to matcad 15M045.

Thanks!

Re: Out of memory


@FDS wrote:

Vladimir, do you also know where you can download mathcad 15M050? The link goes to matcad 15M045.

Thanks!


I don't think there is any public place where you can download M050. That was the first bugfix after PTC switched to subscription only, so I think is it available only on a subscription license. I am working under the assumption that MC15 045 is the last version of Mathcad I will ever have (not including some versions of Prime that I never use) Smiley Sad

Re: Out of memory

Thanks Richard, another disappointment in a long list...

Re: Out of memory

There is not yet this release in open access.