This forum is shutting down! Please post new discussions at

memoryError - Habitat quality

Hello everybody. after 2 days of running habitat quality, at "the end" i had this error: MemoryError encountered. I don't understand why, because i still have too much memory on my disk where i saved the folder of this specific workspace. Thanks all for the answers that you will give me. I attach the log file.


  • swolnyswolny Member, NatCap Staff
    Hi @lisut -

    If it ran for 2 days, that's a very long time! How large is your land use raster? It looks like the model is spending a very long time processing each threat - how large are your threat rasters? If your inputs are large, or very complex, I wouldn't be surprised if your computer did run out of memory. And I think that the error is specifically about memory, not disk space, so look at your computer's task manager to see what your memory usage is while the model runs.

    ~ Stacie
  • All rasters are large almost 7 GB. And i have done these rasters with every pixel 1x1 metres. So if the problem are the rasters complex, the only solution is to elaborate on another computer more powerfull?
  • swolnyswolny Member, NatCap Staff
    Those are much larger rasters than we usually put into the models. Our software team is always working to make InVEST better at processing large datasets, but you still can't do more than the physical memory (and disk space) of your computer allows. So if you want to use 7GB inputs, then yes, you'll need to find a computer that has enough memory to process it. Otherwise, you could reduce the resolution of your inputs, and see if something like 10m pixels works.

    ~ Stacie
  • RichRich Administrator, NatCap Staff
    Hi @lisut, Stacie has it right. Another way of looking at it is the science behind the habitat quality model was derived at a much coarser resolution. There's no chance of you getting a more "accurate" scientific result by using very fine scale data. For habitat quality 30m or even coarser is not only fine, but recommended.
Sign In or Register to comment.