[GRASS5] GRASS on OpenMOSIX cluster
Markus Neteler
neteler at itc.it
Mon Jan 13 09:56:50 EST 2003
Hi developers,
at time I am trying to run GRASS on a 20 node OpenMOSIX cluster.
The task to perform is to 'i.smap' 230 aerial images with 3 bands
each (later I'll try an improved method).
The main problem is that the various jobs seem to influence
each other (especially the current region). The result is
- probably correct CELL files
- damaged cell_hd files (zero size with a few exceptions)
- damaged color files (zero size with a few exceptions)
(after i.smap I use r.colors)
The cluster job launcher script starts GRASS like this:
$1 contains the name of the aerial image
==================================================================
#!/bin/sh
#startup of GRASS (it wants the vars exported - why??):
export GISBASE=$HOME/grass500bin/grass5
export LOCATION_NAME=minipat
MAPSET=$USER
export GISDBASE=$HOME
#use unique GISRC file:
export GISRC=$HOME/.grassrc5.$$.$1
echo "LOCATION_NAME: $LOCATION_NAME" > $GISRC
echo "MAPSET: $MAPSET" >> $GISRC
echo "DIGITIZER: none" >> $GISRC
echo "GISDBASE: $GISDBASE" >> $GISRC
PATH=$PATH:$GISBASE/bin:$GISBASE/scripts
#for convenience:
LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
ERR="./errlog.$1"
LOG="./log.$1"
g.mapsets map="PERMANENT,OFDC_PAT1999,OFDC_PAT1999_2,grass"
g.region rast=$1.b res=20 > $LOG 2> $ERR
i.group in=$1.b,$1.g,$1.r group=$1 subgroup=$1 >> $LOG 2>> $ERR
#cp known statistics from other group:
cp -r $LOCATION/group/spinale99/subgroup/spinale99/sigset $LOCATION/group/$1/subgroup/$1 >> $LOG 2>> $ERR
i.smap group=$1 subgroup=$1 sig=trainmap2.smap out=$1.smap >> $LOG 2>> $ERR
#write colors:
echo "1 green
2 blue
3 white
4 brown
5 yellow
6 red" | r.colors $1.smap col=rules >> $LOG 2>> $ERR
mkdir -p $LOCATION/cats/
#write cats:
echo "# 6 categories
0.00 0.00 0.00 0.00
1:bosco - forest
2:mugo - mugo pine
3:neve_roc - snow, bare rocks and roads
4:ombra - shadow
5:pasc_campi - agricultural patches and pastures
6:rodoreto - shrubs
" > $LOCATION/cats/$1.smap
==================================================================
I am a bit in the dark where to search for the problem/solution.
I remember that it was discussed once if two/multiple sessions of GRASS
are possible, but I cannot find that thread.
Thanks in advance
Markus
More information about the grass-dev
mailing list