[GRASS-user] Disabling some safety checks in grass 6.3?

Hamish hamish_nospam at yahoo.com
Sun Sep 17 04:56:05 EDT 2006


Jonathan Greenberg wrote:
> Along these lines, if I'm careful to only be READING from (possibly)
> the same files (e.g. I'm not writing to the same file), should I be
> more or less "safe"?  The reason I want to do this is I've been
> working on dual or greater processor machines with highly CPU
> intensive processes (e.g. r.sun), and short of figuring out parallel
> processing with grass, I'd like to run a process once per CPU to
> maximize the processor usage.  Thoughts?


just run from the command line and finish with the background "&" symbol.

fancy, but untested:

DAY=0
while [ $DAY -le 365 ] ; do
  DAY=`expr $DAY + 1`
  DAY_NUM=`echo $DAY | awk '{printf("%03d", $1)}'`

  # wait for an open processor
  NUM_PROC=4
  while [ `pgrep r.sun | wc -l` -ge $NUM_PROC ] ; do
    sleep 10
  done

  echo "Starting day $DAY calculations.."
  r.sun day=$DAY beam_rad=direct.${DAY_NUM} &

done


Hamish




More information about the grass-user mailing list