[GRASS-user] Issue with r.sun.daily in combination with multiprocessing

Anna Petrášová kratochanna at gmail.com
Mon May 15 20:38:09 PDT 2017


On Mon, May 15, 2017 at 7:17 AM, Tinsley Wolfs <twolfs15 at student.aau.dk> wrote:
> Hi list,
>
> I am trying to build a script to run r.sun.daily so it only runs for the
> center day of each month of a year. However, when the code starts
> r.sun.daily script, it creates 4 processes for the first day but only 2
> processes for any following day. Even though I set ' nprocs=4' when calling
> the script.
>
> I am trying to use a similar setup as the r.horizon parallel script found
> here. This script uses the multiprocessing module to have the script wait
> until the process is finished before feeding new parameters to a worker. I
> edited this so it changes the 'start_day' and 'end_day' parameters, but only
> creates one worker that launches the r.sun.daily script with 'nprocs=4',
> then waits until this run is done using '.join', before providing the worker
> with a different start and end day and starting r.sun.daily again with '
> nprocs=4'.
>
> What could be the issue that it switches to two processes after the 1st day?


You have:

dayEnd = dayStart + 1

so it will use only 2 cores, one for dayStart and one for dayEnd.
Maybe you want to use day_step parameter instead of specifying the
individual days?

Anna

>
> Regards,
> Tinsley
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list