[GRASS-dev] i.spectral limited to 400 files

Hi,

is there a way to modify i.spectral to remove the limit of 400 files:

i.spectral -c group=ta_group@PERMANENT coordinates=104.118832166,14.7585647484,103.525338069,13.0911289527,103.304897404,12.9328638602 output=/home/yann/dev/grass-promo/grassposter/2014_EGU_WD_Landscape/images/ta_spectral
ERROR: Can only do up to 400 raster maps (400 given)
ERROR: No data returned from query

I have about 1500 files in the group.

Yann Chemin wrote:

is there a way to modify i.spectral to remove the limit of 400 files:

The limit is from r.what. It probably wouldn't be that hard to fix.

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

On Thu, Apr 17, 2014 at 4:04 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Yann Chemin wrote:

is there a way to modify i.spectral to remove the limit of 400 files:

The limit is from r.what. It probably wouldn't be that hard to fix.

... "nice to have" for sure.

BTW:
The next limit would be the operating system. Default Linux allows
1024 files to be opened, which can be increased in
/etc/security/limits.conf

See also
http://grass.osgeo.org/grass70/manuals/r.series.html
http://grasswiki.osgeo.org/wiki/Large_raster_data_processing#Number_of_open_files_limitation

Markus

Yann Chemin wrote:

>> is there a way to modify i.spectral to remove the limit of 400 files:

Glynn:

> The limit is from r.what. It probably wouldn't be that hard to fix.

Markus N:

... "nice to have" for sure.

BTW:
The next limit would be the operating system. Default Linux allows
1024 files to be opened, which can be increased in
/etc/security/limits.conf

Aren't there, however, any important side-effects in altering this limit?
There must be a (security?) reason for the number 2^10.

Nikos

In Ubuntu, I could expand the number of opened files by:

#PCA will require the extension of ulimit for open files in Ubuntu
sudo vi /etc/security/limits.conf

#There you should enter:
#username hard nofile 65000
#username soft nofile 10000
#before # End of file

and reboot

On 18/04/2014, Nikos Alexandris <nik@nikosalexandris.net> wrote:

Yann Chemin wrote:

>> is there a way to modify i.spectral to remove the limit of 400 files:

Glynn:

> The limit is from r.what. It probably wouldn't be that hard to fix.

Markus N:

... "nice to have" for sure.

BTW:
The next limit would be the operating system. Default Linux allows
1024 files to be opened, which can be increased in
/etc/security/limits.conf

Aren't there, however, any important side-effects in altering this limit?
There must be a (security?) reason for the number 2^10.

Nikos

--
----

Markus Neteler wrote:

The next limit would be the operating system. Default Linux allows
1024 files to be opened, which can be increased in
/etc/security/limits.conf

Note that, in 7.0, each raster map requires two open files: one for
the cell/fcell file, one for the null bitmap.

FWIW, on my system (Gentoo, nothing in limits.conf), the default soft
limit is 1024 while the default hard limit is 4096, so the user can
increase the soft limit to 4096 with "ulimit -n 4096" in the shell.

Nikos Alexandris wrote:

Aren't there, however, any important side-effects in altering this limit?
There must be a (security?) reason for the number 2^10.

The limits are just to prevent a process from (accidentally or
deliberately) consuming too much memory. The descriptor table is in
kernel memory, and can't be swapped to disk.

Yann Chemin wrote:

In Ubuntu, I could expand the number of opened files by:

...

and reboot

A reboot shouldn't be necessary. Changes to limits.conf should take
effect for any subsequent logins.

A hard limit can't be increased for any existing non-root processes,
or those descended from them.

Increasing a hard limit requires root privilege (or at least the
CAP_SYS_RESOURCE capability), so the limits have to be set by the
program which manages the login (login, xdm, sshd, etc) after the user
has identified themself (so it knows which limits to set) but before
the process changes its ownership from root to the logged-in user.

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

On Sat, Apr 19, 2014 at 12:12 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

...

I have taken liberty to add your comments to

http://grasswiki.osgeo.org/wiki/Large_raster_data_processing#Number_of_open_files_limitation

Feel free to edit the Wiki.

Markus