Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import binary file to Mathcad 14 - size limit?

Status
Not open for further replies.

jhardy1

Structural
Jan 26, 2004
930
I have created a Mathcad 14 worksheet which reads and processes a large binary data file - specifically, a tile of NASA SRTM terrain elevation data. The worksheet works fine using the generally available 3 arc-second resolution files, which are typically about 1 - 2 MB each, with over 1,000,000 records in each file. (Each file has one integer entry for the elevation data of each point on a 1,201 x 1,201 grid, for 1,442,401 integers in total.)

I would like to use the same worksheet to process some 1 arc-second data files, which have approximately 9 times the number of records, and 9 times the file size (approx. 25 MB each).

When I try to point the "Import Data Wizard" at one of the larger files, it first seems to work fine, but then it loses the data from the imported data file, and the worksheet stops working, as it has no data in the main data array.

I suspect this is an issue with the file size exceeding some limit of Mathcad for handling large binary files, and / or exceeding memory limits.

Does anyone know what are the effective limits for handling large binary files in Mathcad 14? I couldn't find anything in the documentation.

Thanks for any help!
 
Replies continue below

Recommended for you

I received an answer to my question on the PlanetPTC Mathcad Community site but I thought I would post the answer here as well, in case it helps anyone else with a similar problem:

Doing a bit of experimentation, I find that the biggest vector I can create from scratch has 8,388,608 elements (from 0 to 8,388,607); that is, 2^24 elements in total.

Mathcad 14 on-line help doesn't mention any absolute hard-wired maximum element limit:

The array size limit depends on the memory available on your system. Approximately 8 bytes of memory are needed per array element. For most systems, the array limit is at least 1 million elements. Note that the maximum allocatable memory in a 32 bit system is 4 Gb, which has to hold all open applications, your operating system, and whatever memory is consumed by your calculations.

but on my system (Mathcad 14 M020, Windows XP SP3, 2 GB RAM) it seems to be a hard upper limit of 8,388,608 elements.

Also, it seems that Mathcad is not handling dynamic reallocation of memory very well - if I try to create two such vectors, it throws an error of "not enough memory" for the second vector; but when I delete the offending statement which attempted to create the second vector, the first vector is also corrupted due to "not enough memory".

At least I now know where my problem lies - I'll have to see if I can manually parse the terrain file into smaller chunks of less than 8,000,000 elements.
 
So, you could get more memory. 4GB should get you to 16 million elements.

TTFN

FAQ731-376
 
IRstuff,

Trouble is, it's a standard configuration company computer, and you can probably guess how easy it is to get these sort of "special" deals through the IT department!

My problem is - 4 GB RAM _MIGHT_ get me to 16 million elements, but I don't actually understand why 2 GB _WON'T_ get me there. Task Manager indicates I still have quite a bit of free RAM, and after all, 8 million, 16 million - we are only talking about about a few MB of required RAM, out of 2 GB total RAM.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor