G.cloud - GRASS GIS Manual

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Table of contents

NAME
g.cloud - Connects a local GRASS GIS session to another one in a cluster system.

KEYWORDS
general, cloud computing

SYNOPSIS
g.cloud
g.cloud --help
g.cloud [-cka] config=string server=name [grass_script=name] [qsub_script=name] [variables=name]
[raster=name[,name,...]] [vector=name[,name,...]] [mail=name] [reconnect=name] [path=name] [--help] [--verbose] [--quiet] [-
-ui]

Flags:
-c
Cycle through all variables
-k
Keep temporal files and mapsets
-a
Use ssh-add for faster access (requires to launch ssh-agent beforehand)
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

config=string [required]
Path to ASCII file containing authentication parameters
"-" to pass the parameters interactively
server=name [required]
Name or IP of server to be connected
grass_script=name
Path to the input GRASS script
qsub_script=name
Path to the input qsub script
variables=name
Python dictionary with the variables to pass to the GRASS script via qsub
Example: "{'year':[2010,2011]}" will call 'qsub -v year=2010 ...' and 'qsub -v year=2011 ...'
raster=name[,name,...]
Name of input raster map(s) used by GRASS script
vector=name[,name,...]
Name of input vector map(s) used by GRASS script
mail=name
Mail address to send emails at the end of jobs
reconnect=name
Reconnect with old job to see if it is finished
path=name
Path for temporal for g.cloud operations
The directory must be visible on the network to the blades
Default: $HOME

DESCRIPTION
g.cloud is a module to connect a personal GRASS GIS session to a remote GRASS GIS installation on a much faster cluster
facility (high performance computing system). It currently only supports the Grid Engine system. The general aim is to offer the
possibility to a user to perform high speed calculations, which are hard to compute on a personal computer by connecting to an
external, powerful server or cloud computing system.

The g.cloud environment consists of a Python module. It checks if all program requirements are fullfilled on both the client and
the server side. If everything is ok, it connects the current session to the cloud server; it transfers the user and other required
scripts as well as the GRASS data to the server and eventually executes the remote GRASS GIS job. Subsequently, it transfers
back the resulting maps and data and cleans up the server session.

For a job execution, the script requirements are two: on the client-side the user prepared GRASS GIS script which performs the
calculations and on the server-side the qsub control script for Grid Engine to launch the GRASS GIS script job. /
NOTES Table of contents

It is highly recommended to use "ssh-add" in order to avoid the authentication to the cluster via password file.

EXAMPLE
North Carolina example, calculation of texture maps:
g.cloud config=$HOME/.gc_loginfile.txt server=giscluster \
grass_script=$HOME/g.cloud/test/test_onevariable_raster.sh \
qsub_script=$HOME/g.cloud/test/launch_SGE_grassjob.sh \
variables="{'TEXTURE' : ['asm','corr','entr','se','var']}" \
raster=lsat7_2002_40

North Carolina example, calculation of daily sun radiation:


g.cloud config=$HOME/.gc_loginfile.txt server=giscluster \
grass_script=$HOME/g.cloud/test/test_onevariable_sun.sh \
qsub_script=$HOME/test/launch_SGE_grassjob.sh \
variables="{'DOY' : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
raster=elevation

REQUIREMENTS
The software requirements are GRASS GIS 7 and ssh/scp on the client side; while on the server side the Grid Engine software
or compatible software needs to be present to launch the GRASS jobs. Furthermore, python-pexpect is required to be installed
on the client system.

REFERENCES
FOSS4G 2011 presentation

SEE ALSO
Parallel GRASS jobs from GRASS User Wiki

AUTHORS
Luca Delucchi, Markus Neteler, Fondazione Edmund Mach, Research and Innovation Centre, Department of Biodiversity and
Molecular Ecology, GIS and Remote Sensing Unit

SOURCE CODE
Available at: g.cloud source code (history)

Main index | General index | Topics index | Keywords index | Graphical index | Full index

© 2003-2020 GRASS Development Team, GRASS GIS 7.8.4dev Reference Manual

You might also like