[GRASS-user] Multithreading in GRASS 6.4

Markus Neteler neteler at osgeo.org
Wed Jan 5 02:42:46 EST 2011


Hi Daniel,

On Thu, Dec 30, 2010 at 1:03 AM, LeeDaniel <Lee.Daniel.1986 at gmail.com> wrote:
>
> Hello,
>
> I'm trying to use multithreading in GRASS 6.4 in OpenSUSE 64-bit installed

Note that there is almost no  multithreading in GRASS 6 itself.

> from the community repository and am wondering what the best way would be to
> set my script. What I'm wanting to do is several r.sun analyses parallel to
> one another using a Python script.

This is best done in parallel GRASS batch jobs runs, running each job
in a different mapset, then copying over the result into an integrated
mapset.

> I've read the wiki page about OpenMP at
> http://grass.osgeo.org/wiki/OpenMP#Multithreaded_jobs_in_GRASS but don't
> quite understand it - it seems that I can activate multithreading
> capabilities in GRASS by modifying /lib/gpde/Makefile but I don't have that
> file.

No, in the /lib/gpde/Makefile you would activate it only for GPDE.
OpenMP is not really there in GRASS 6.

> I also wasn't able to find a whole lot of information about it that I
> could understand - I meet the requirement listed at
> http://grass.osgeo.org/programming6/gpdelib.html of having a compiler that
> supports OpenMP (I've got gcc 4.5), but am unsure of how I should proceed.
> Does anyone have any tips?

Yes, you can rather easily use this approach:
http://grass.osgeo.org/wiki/GRASS_and_Shell#GRASS_Batch_jobs
or
http://grass.osgeo.org/wiki/Parallel_GRASS_jobs

hope this helps,
Markus


More information about the grass-user mailing list