[GRASS-user] Question concerning r.to.vect and out of memory error

Hi

my system: SuSE 10.2, Dual core processor, 1GP physical memory, 16GB swap (one swap partition of 1GB and one swap file of 15GB)

I have a huge DEM from which I calculated the slopes and categorised them in 10% classes. Now I want to use r.to.vect to convert them into a vector layer of type area. My problem is that I get an out of memory error, even though there is enough memory available. It seems that GRASS 6.2.1 only uses the swap partition and not the swap file (which would be really strange).

by using "free -m" , I got the following memory information (in megabytes) when r.to.vect quit with an out of memory error:

              total used free shared buffers cached
Mem: 1011 998 12 0 1 103
-/+ buffers/cache: 894 117
Swap: 17299 1043 16255

Any ideas on how I can avoid this?

By the way: before I started grass, I created the swapfile with

dd ...
mkswap ...
swapon ...

Any help welcome,

Rainer

--
NEW EMAIL ADDRESS AND ADDRESS:

Rainer.Krug@uct.ac.za

RKrug@sun.ac.za WILL BE DISCONTINUED END OF MARCH

Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Leslie Hill Institute for Plant Conservation
University of Cape Town
Rondebosch 7701
South Africa

Fax: +27 - (0)86 516 2782
Fax: +27 - (0)21 650 2440 (w)
Cell: +27 - (0)83 9479 042

Skype: RMkrug

email: Rainer.Krug@uct.ac.za
         Rainer@krugs.de

One additional information: huge means:
Rows: 25960
Columns: 23211
     Total Cells: 602557560

Rainer

Rainer M. Krug wrote:

Hi

my system: SuSE 10.2, Dual core processor, 1GP physical memory, 16GB swap (one swap partition of 1GB and one swap file of 15GB)

I have a huge DEM from which I calculated the slopes and categorised them in 10% classes. Now I want to use r.to.vect to convert them into a vector layer of type area. My problem is that I get an out of memory error, even though there is enough memory available. It seems that GRASS 6.2.1 only uses the swap partition and not the swap file (which would be really strange).

by using "free -m" , I got the following memory information (in megabytes) when r.to.vect quit with an out of memory error:

             total used free shared buffers cached
Mem: 1011 998 12 0 1 103
-/+ buffers/cache: 894 117
Swap: 17299 1043 16255

Any ideas on how I can avoid this?

By the way: before I started grass, I created the swapfile with

dd ...
mkswap ...
swapon ...

Any help welcome,

Rainer

--
NEW EMAIL ADDRESS AND ADDRESS:

Rainer.Krug@uct.ac.za

RKrug@sun.ac.za WILL BE DISCONTINUED END OF MARCH

Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Leslie Hill Institute for Plant Conservation
University of Cape Town
Rondebosch 7701
South Africa

Fax: +27 - (0)86 516 2782
Fax: +27 - (0)21 650 2440 (w)
Cell: +27 - (0)83 9479 042

Skype: RMkrug

email: Rainer.Krug@uct.ac.za
         Rainer@krugs.de

Rainer M. Krug wrote:

> my system: SuSE 10.2, Dual core processor, 1GP physical memory, 16GB
>
> swap (one swap partition of 1GB and one swap file of 15GB)
>
> I have a huge DEM from which I calculated the slopes and categorised
>
> them in 10% classes. Now I want to use r.to.vect to convert them
> into a vector layer of type area. My problem is that I get an out
> of memory error, even though there is enough memory available. It
> seems that GRASS 6.2.1 only uses the swap partition and not the
> swap file (which would be really strange).
>
> by using "free -m" , I got the following memory information (in
> megabytes) when r.to.vect quit with an out of memory error:
>
> total used free shared buffers
> cached
> Mem: 1011 998 12 0 1
> 103
> -/+ buffers/cache: 894 117
> Swap: 17299 1043 16255
>
> Any ideas on how I can avoid this?
>
> By the way: before I started grass, I created the swapfile with
>
> dd ...
> mkswap ...
> swapon ...

..

One additional information: huge means:
Rows: 25960
Columns: 23211
     Total Cells: 602557560

does the map contain integers or floats?
(CELL map, FCELL map, or DCELL? [from r.info])

Even with 16GB ram, Linux can only allocate so much per process.
see http://kerneltrap.org/node/2450

Was GRASS built by hand with large file support?

Was your linux kernel built with CONFIG_HIGHMEM or similar?
32 or 64bit machine? 64bit linux kernel?

Hamish

Rainer M. Krug wrote:

my system: SuSE 10.2, Dual core processor, 1GP physical memory, 16GB
swap (one swap partition of 1GB and one swap file of 15GB)

32 or 64-bit CPU/OS?

I have a huge DEM from which I calculated the slopes and categorised
them in 10% classes. Now I want to use r.to.vect to convert them into a
vector layer of type area. My problem is that I get an out of memory
error, even though there is enough memory available. It seems that GRASS
6.2.1 only uses the swap partition and not the swap file (which would be
really strange).

If you're on a 32-bit system, you may be running into the upper limit
on the amount of memory which can be used by a single process. The
exact figure can vary between systems, but anything over 2GB is
pushing it. Adding more swap (or RAM) won't help if the issue is with
a single process.

--
Glynn Clements <glynn@gclements.plus.com>

Hamish wrote:

Rainer M. Krug wrote:

my system: SuSE 10.2, Dual core processor, 1GP physical memory, 16GB

swap (one swap partition of 1GB and one swap file of 15GB)

I have a huge DEM from which I calculated the slopes and categorised

them in 10% classes. Now I want to use r.to.vect to convert them
into a vector layer of type area. My problem is that I get an out
of memory error, even though there is enough memory available. It
seems that GRASS 6.2.1 only uses the swap partition and not the
swap file (which would be really strange).

by using "free -m" , I got the following memory information (in megabytes) when r.to.vect quit with an out of memory error:

             total used free shared buffers cached
Mem: 1011 998 12 0 1 103
-/+ buffers/cache: 894 117
Swap: 17299 1043 16255

Any ideas on how I can avoid this?

By the way: before I started grass, I created the swapfile with

dd ...
mkswap ...
swapon ...

..

One additional information: huge means:
Rows: 25960
Columns: 23211
     Total Cells: 602557560

does the map contain integers or floats?
(CELL map, FCELL map, or DCELL? [from r.info])

Data Type: CELL

Even with 16GB ram, Linux can only allocate so much per process.
see http://kerneltrap.org/node/2450

Was GRASS built by hand with large file support?

No - I installed it from the rpm for SuSE 10.2

Was your linux kernel built with CONFIG_HIGHMEM or similar?

I don't think so - I use the standard kernel from SuSE 10.2
(2.6.18.8-0.1 on the one machine - as all updates are done on both
machines, I think that the second one has the same kernel.)

32 or 64bit machine? 64bit linux kernel?

32 bit machine

As I think that the problem is not that easy to solve (according to your
  - thanks for the link - and Glynns info) without recompiling the
kernel - I will have to go the other route to solve the problem and to
split the raster into smaller ones. As this is a different topic, please
see my other email.

Thanks you to for your help,

Rainer

Hamish

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
NEW EMAIL ADDRESS AND ADDRESS:

Rainer.Krug@uct.ac.za

RKrug@sun.ac.za WILL BE DISCONTINUED END OF MARCH

Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Leslie Hill Institute for Plant Conservation
University of Cape Town
Rondebosch 7701
South Africa

Fax: +27 - (0)86 516 2782
Fax: +27 - (0)21 650 2440 (w)
Cell: +27 - (0)83 9479 042

Skype: RMkrug

email: Rainer.Krug@uct.ac.za
         Rainer@krugs.de