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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Out of memory

ebelmonte
8-Gravel

Out of memory

Dear all,

 

I'm using Mathcad 15 M030 for analysing data. I got the "out of memory" error message if I paste the file I have attached in a mathcad table.

I know that the topic has been already discussed in this forum but I didn't find any workaround.

Is there in the meantime a new solution?

Thank-you very much for your support.

 

Regards

15 REPLIES 15
-MFra-
21-Topaz II
(To:ebelmonte)

Hi,

All data must be on the right. Something is wrong with the central column (B).

total sum.jpg

Hello,

 

Thank-you for your reply.

It is better now but I still have out of memory error message if the table is bigger (73000 x 3).

Is there any way to work with "big" data without this problem?

Please provide your Mathcad worksheet in archive.

One method would be to read in the data using one of Mathcads READ.... functions.

But as you are using real Mathcad and not crappy Prime,  you can copy the data from your text file (Ctrl-C), go to Menu - Insert - Data - Table, highlight the first three columns in the first row of the data table which was just created and insert the copied data (Ctrl-V).

It should work without highlighting the top three cells but it doesn't for me.

I attach a worksheet with the inserted data.

 

> I still have out of memory error message if the table is bigger (73000 x 3).

> Is there any way to work with "big" data without this problem?

Thats not really "big" data for Mathcad and sure should work OK. You may consider not to copy the data but rather read it in from your text file in case the data changes now and there.

 

Unbenannt.PNG

@Francesco:

> All data must be on the right. Something is wrong with the central column (B).

No, nothing wrong with the data. Its just your European installation of Excel which expects a comma as decimal separator rather than the decimal point provided in the text file. So the data 0.17 is interpreted as text by your Excel and not as a number and so it not right-, but left-justified.

 

In case you are unsure as to how to read in the data - with the data format you provided you can simply use READPRN to do so:

 

Bild2.PNG

Dear Werner,

 

It works, thanks a lot.

Mathcad is still consuming much memory 1.5Gb but I get no error message anymore.


@ebelmonte wrote:

Dear Werner,

 

It works, thanks a lot.

Mathcad is still consuming much memory 1.5Gb but I get no error message anymore.


Can't imagine why Mathcad should take up that much memory for a matrix that small !?? Hard to believe!

Do you have any chance to update your MC15 M030 version?

Link: http://download.ptc.com/products/mathcad/trial/mc15/Mathcad15_EN.zip

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
FDS
12-Amethyst
12-Amethyst
(To:VladimirN)

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

Thanks!

RichardJ
19-Tanzanite
(To:FDS)


@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

FDS
12-Amethyst
12-Amethyst
(To:RichardJ)

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

VladimirN
24-Ruby II
(To:FDS)

There is not yet this release in open access.

-MFra-
21-Topaz II
(To:Werner_E)

Thanks Werner, I hadn't noticed it.

RichardJ
19-Tanzanite
(To:ebelmonte)

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.

Top Tags