Hello,

I am fairly new to GRASS and I am having issues getting GRASS BATCH JOB to work 
properly. I need to run 40 r.sun calculations in less than 4 hours for my 
universities campus cluster that runs the linux version of grass. To do this I 
need to run 40  jobs that each perform the r.sun calculation since a single job 
alone could use most of the 4 hour time limit to calculate r.sun.

The basic idea of the project is that I have elevation data covering the entire 
extent of Alaska at about 14GB total.  R.sun is memory limited, so I have 
created windows for smaller regions of the elevation data that need to be run. 
I have created 40 shell files with the necessary commands/tools I need to alter 
the mapset region and use r.sun in only that region. An example of one of the 
files looks like this (all look similar except the bounding box extents change 
and the name of the output files:

(filename  = tile_1_1.sh)

g.region --overwrite --verbose n=56.5522222216437 s=50.996666666 
e=-174.444444444375 w=-180
r.sun -p -m --overwrite --verbose elevation=mosaic_60m@PERMANENT 
aspect=aspect@bdmorri2 slope=slope@bdmorri2 beam=beam_tile_1_1 
diff_rad=diffuse_tile_1_1 glob_rad=to$
exit

To run these through the campus cluster externally, I created an additional 40 
shell files that create a new mapset , sets the GRASS BATCH JOB as a variable 
and exports it, and starts grass up externally to run the file listed above and 
run the grass commands.

(filename=batch_tile_1_1.sh)

#!/bin/bash
chmod u+x  /projects/oa/akpaleo/radiation/qsub_files/tile_1_1.sh
export GRASS_BATCH_JOB=/project/oa/akpaleo/radiation/qsub_files/tile_1_1.sh
grass70 -c  /projects/oa/akpaleo/gis/grass/alaska/tile_1_1
unset GRASS_BATCH_JOB

The big problem I am having with this step is that I always receive the error 
below, even though my shell files specifically use "unset GRASS_BATCH_JOB". I 
have also tried manually entering this in the terminal with no success. I am 
obviously doing something wrong to get this to work correctly.
ERROR: Job file '/project/oa/akpaleo/radiation/qsub_files/tile_1_1.sh' has been 
defined in the 'GRASS_BATCH_JOB' variable but not found. Exiting.
Use 'unset GRASS_BATCH_JOB' to disable batch job processing.

For now I am not submitting the job to the cluster using qsub, but rather 
testing it in an interactive job on the cluster and b just using the command sh 
command to test the files.

Thank you

Bailey Morrison
PhD student
University of Illinois at Urbana-Champaign
Program in Ecology, Evolution, and Conservation Biology
Global Environmental Analysis and Remote Sensing Lab (GEARS)
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to