[GRASSLIST:5984] Concurrent use of GRASS

Hi!
I have a dual CPU machine, and I would like to run several GRASS
programs in parallel. I found that since I need to change regions, I
end up having race conditions, and endless grief. I would rather just
use two different GRASS sessions to do things (maybe with a different
location). However, GRASS complains that
${USER} is currently running GRASS 5.4.0. Concurrent use not allowed.

I can easily get over this by running GRASS on two different machines,
but I'd like to use my 2nd CPU for GRASS programs!

Choose as many as you like:
a. Did I do something stupid?
b. Did I misread the manual?
c. Did I err? (Groo the Wanderer)

thanks!
Jose
--
Jose L Gomez-Dans, Research Assistant
Bristol Glaciology Centre, Geographical Sciences/CPOM
University of Bristol, Bristol, UK

I'm curious about what work has/is been done with
parallelizing grass and gdal with clusters.

Thank you ..

-pete

Hello Jose,

This worked for me (although I did not process any data that way, the concurrent use works):
go in the directory parent directory of your GISbase, for example:
home/jose/grassdata/..

in this directory, if you type
$ ls -attr
you should see a .grassrc53 and a .gislock53 file

well, if you start grass in a first terminal, open a second one in witch you remove these two files
rm -f .grassrc53; rm -f .gislock53
then you should be able to start a second grass environment (when you run grass, specify the environment, such as $ grass53 /home/jose/grassdata2/location2/mapset2)

the job of .grassrc53 is to give the gis base, location and mapset location on the hard drive
the job of the .gislock53 file is .. well guess what!

As I said earlier, it worked for me but I did not try to process data that way; I would recommend to use different gisbases. As well, I am sure that the people that designed grass blocked concurrence use for a specific reason, which I do not know (I would be happy to find out, though!)

good luck !!!
eric pante

<html><div><DIV align=left>
<DIV align=left>Eric Pante</DIV>
<DIV align=left><FONT size=2>Graduate Student in Marine Biology</FONT></DIV>
<DIV align=left><FONT size=2>Grice Marine Laboratory</FONT></DIV>
<DIV align=left><FONT size=2>205 Fort Johnson, Charleston SC 29412</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV align=center><EM>On ne force pas la curiosité, on l'éveille.</EM></DIV>
<DIV align=center>Daniel Pennac</DIV>
<DIV>
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=left>
<P align=center><FONT face="Lucida Handwriting, Cursive" size=2><STRONG></P></STRONG></FONT>
<P align=center>&nbsp;</P></TD></TR></TBODY></TABLE></DIV>
<DIV>
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top align=right></TD></TR></TBODY></TABLE></DIV></DIV></div></html>

&gt;From: Jose Luis Gomez-Dans &lt;jgomezdans@yahoo.co.uk&gt;
&gt;To: GRASSLIST@baylor.edu
&gt;Subject: [GRASSLIST:5984] Concurrent use of GRASS
&gt;Date: Thu, 3 Mar 2005 16:04:25 +0000
&gt;
&gt;Hi!
&gt;I have a dual CPU machine, and I would like to run several GRASS
&gt;programs in parallel. I found that since I need to change regions, I
&gt;end up having race conditions, and endless grief. I would rather just
&gt;use two different GRASS sessions to do things (maybe with a different
&gt;location). However, GRASS complains that
&gt;${USER} is currently running GRASS 5.4.0. Concurrent use not allowed.
&gt;
&gt;I can easily get over this by running GRASS on two different machines,
&gt;but I'd like to use my 2nd CPU for GRASS programs!
&gt;
&gt;Choose as many as you like:
&gt;a. Did I do something stupid?
&gt;b. Did I misread the manual?
&gt;c. Did I err? (Groo the Wanderer)
&gt;
&gt;thanks!
&gt;Jose
&gt;--
&gt;Jose L Gomez-Dans, Research Assistant
&gt;Bristol Glaciology Centre, Geographical Sciences/CPOM
&gt;University of Bristol, Bristol, UK
&gt;

Jose:

I have a dual CPU machine, and I would like to run several GRASS
programs in parallel. I found that since I need to change regions, I
end up having race conditions, and endless grief. I would rather just
use two different GRASS sessions to do things (maybe with a different
location). However, GRASS complains that
${USER} is currently running GRASS 5.4.0. Concurrent use not allowed.

Concurrent use of GRASS is only supported in version 6.0.

Even then, each session must use a different location. (but of course
you can who two locations which are twins and copy over the processed
results)

Some modules can be safely backgrounded with "&", but as you may have
already found some can't be. You can get away with it sometimes but do
so at your own peril.

Pete:

I'm curious about what work has/is been done with
parallelizing grass and gdal with clusters.

see http://grass.ibiblio.org/grass50/#cluster
     http://grass.itc.it/pipermail/grassuser/2005-January/027642.html

Hamish

Hamish wrote:

> I have a dual CPU machine, and I would like to run several GRASS
> programs in parallel. I found that since I need to change regions, I
> end up having race conditions, and endless grief. I would rather just
> use two different GRASS sessions to do things (maybe with a different
> location). However, GRASS complains that
> ${USER} is currently running GRASS 5.4.0. Concurrent use not allowed.

Concurrent use of GRASS is only supported in version 6.0.

Even then, each session must use a different location. (but of course
you can who two locations which are twins and copy over the processed
results)

You should be able to use different mapsets within the same location.

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

Grass6

Where can I find a turorial/HOWTO/Examples ?

Data

v.info map=wind_ca layer=1 -c
Displaying column type for database connection of layer 1:
INTEGER|cat
INTEGER|ID
INTEGER|GRIDCODE

v.db.select wind_ca
cat|ID|GRIDCODE
1|1|2
2|2|2
3|3|2
4|4|4
5|5|5
6|6|2
7|7|3
8|8|4
9|9|3
10|10|2

The data is all polygons, with GRIDCODE ranging from 0 to 10.

What I want to do is display each polygon in a unique colour
dependent on GRIDCODE. For example

GRIDCODE COLOUR
0 white
1 blue
2 green
... ...
and so on

The other is just display the area that are only of a particular
GRIDCODE or range of GRIDCODE.

Thank you

-pete

Always seem to get the answer myself after sending to the list :slight_smile:

Is there a better way of doing something like

d.vect map= .... where='GRIDCODE=2' fcolor=red
d.vect map= .... where='GRIDCODE=3' fcolor=yellow
d.vect map= .... where='GRIDCODE=4' fcolor=orange
d.vect map= .... where='GRIDCODE=5' fcolor=green
...

-pete