[GRASS-dev] multiprocessing problem

Luca Delucchi lucadeluge at gmail.com
Sun Apr 10 23:09:02 PDT 2022


On Fri, 8 Apr 2022 at 16:33, Anna Petrášová <kratochanna at gmail.com> wrote:
>
> Hi Luca,
>

Hi Anna,

> I would say the biggest problem is the memory, I tried to run it and it consumes way too much memory. Maybe you could process the differences from each pixel (compute the sum) as they are computed, not collect it and do it in the end. Otherwise you can significantly speed it up simply with one core by using numpy in a better way:
>
> vals = np.array([np.abs(y - array.flat) for y in array.flat])
> ...
> out = np.sum(vals) / number2
>

yes, this work better then my solution, but increasing the number of
pixels I get the process killed. I have 16GB RAM and I was not able to
process 80000 cells....
I tried a few different solutions but the result is always the same.

-- 
ciao
Luca

www.lucadelu.org


More information about the grass-dev mailing list