Fragstats limited memory

3464
3
12-06-2012 11:09 PM
MichaelaEhmann
New Contributor
Hi all,
I have a problem calculating Patch indices from raster files (in Tiff format) because of the limited memory. I found this answer on the Umass homepage:
Q12. What does the following error mean: "Error: Unexpected error encountered: [bad allocation]. Model execution halted." or "Unexpected error encountered while loading ..."
In FRAGSTATS 4 this error is reported when the enough memory cannot be allocated to either load the grid or complete the processing. This happens when the grid is too large given other factors. The solution is either to increase your memory to >2GB or, if this fails, subdivide the landscape into sub-landscapes.

Becuse i am developing a process for calculating this indices in several areas I am trying to find the best and easiest method and to subdivide the landscapes is quite time consuming.

For this reason I´m looking for the way to increase the memory.
In another forum i found this hint:

FRAGSTATS 4.0 was written in Microsoft Visual C++ for use in the Windows operating environment and is a 32-bit process (even if running on a 64-bit machine). Since FRAGSTATS 4.0 was developed in a Microsoft environment, its portability to other platforms is not easily accomplished. FRAGSTATS 4.0 is a 32-bit software, meaning that normally it can only use a maximum of 2GB of memory. However, if adequately configured, Windows can allow a 32-bit process to use up to 3GB of memory. FRAGSTATS 4.0 loads the input grid (See input file formats) into memory and then computes all requested calculations. Thus, users must have sufficient memory to load the grid and then enough left over for processing and other operating system needs.

Now my question: Has anybody tried to increase the memory and what exactly do i need to do?

Grateful for all your hints!
0 Kudos
3 Replies
KevinBigsby
New Contributor
Hi,

I have encountered the exact same issue and have made it as far as realizing I also need to increase my computer's memory.  Did you have any luck figuring that out?  If so, can you please post to this forum?  I'm going to dig around and see if I figure it out.

Kevin
0 Kudos
JeffreyEvans
Occasional Contributor III
In a 32-bit system you can set up a physical address extension to enable 4GB of RAM. However, this does not mean that you have 4GB available to individual processes. It's a bit dated but there is some good information here (http://hardforum.com/showthread.php?t=1035670).

In my experience, you have a slim chance of solving your memory allocation problem in this way. It would be helpful if you explained your actual FRAGSTAT's problem in more detail. In this way somebody on the forum may be able to give you relevant ideas on how to divvy your problem into a manageable size.

Unless I really need a raster surface to make a prediction or understand configuration across the entire landscape, I use custom R code to calculate local metrics (explicit locations), at defined scales, for specifying statistical models.

If you are really interested in patch level configuration across the entire landscape you could coerce your raster into a vector polygon feature class and try V-LATE (https://sites.google.com/site/largvlate/gis-tools/v-late).
0 Kudos
MParrish
New Contributor
Sorry to resurrect this thread, but when running a large batch of landscapes, I've occasionally run into the error "Error: Unexpected error encountered: [bad allocation]. Model execution halted"  - - what makes it odd is that if I close FRAGSTATS 4.1 and re-open it, I can usually get it to run that landscape by itself.

I am running XP Home with a Pentium 4 3.00 GHz and 4 GB of RAM (3.25 GB available).

I got to thinking that perhaps what is going on is that with other programs running in the background, maybe what's happening is FRAGSTATS is completing a landscape, then memory is being allocated to an outside program, then when FRAGSTATS starts to load the next landscape, it runs out of memory.

Not sure if I'm off base there, but it sounds reasonable to me.
0 Kudos