[GRASS-user] r.neighbors velocity

Sören Gebbert soerengebbert at googlemail.com
Fri Jun 28 16:59:11 PDT 2013


Hi Ivan,
this sounds very interesting.

Your map has a size of 4312*5576 pixel? That's about 100MB in case of a
type integer or type float map or about 200MB in case of a type double map.
You must have a very fast HD or SSD to read and write such a map in under
2/3 seconds?

In case your moving window has a size of 501 pixel (not 501x501 pixel!),
the amount of operations that must be performed is at least 4312*5576*501.
That's about 12 billion ops. Amazing to do this in 2/3 seconds.
I have written a little program to see how my Intel core i5 performs
processing this amount of operations. Well it needs about 100 seconds.

Here the code, compiled with optimization:

#include <stdio.h>

int main()
{
        unsigned int i, j, k;
        register double v = 0.0;

        for(i = 0; i < 4321; i++) {
                for(j = 0; j < 5576; j++) {
                        for(k = 0; k < 501; k++) {
                                v = v + (double)(i + j + k)/3.0;
                        }
                }
        }
        printf("v is %g\n", v);
}

soeren at vostro:~/src$ gcc -O3 numtest.c -o numtest
soeren at vostro:~/src$ time ./numtest
v is 2.09131e+13

real 1m49.292s
user 1m49.223s
sys 0m0.000s


Your proprietary software must run highly parallel using a fast GPU or an
ASIC to keep the processing time under 2/3 seconds?

Unfortunately r.neighbors is not able to compete with such a powerful
software, since it is not reading the entire map into RAM and does not run
on GPU's or ASIC's. But r.neighbors is able to process maps that are to
large to fit into the RAM. :)

Can you please tell us what software is so incredible fast?

Best regards
Soeren


2013/6/28 Ivan Marchesini <ivan.marchesini at gmail.com>

> Hi Markus
> you are perfectly right
>
> the region is 4312*5576
> the moving window 501
> GRASS is the stable version on a machine with 8 core and 32 gb RAM.
> Ubuntu 12.04
>
> it seems that the proprietary software is able to perform the analysis
> in 2/3 seconds
>
> :-|
>
> ciao
>
>
> On Fri, 2013-06-28 at 00:02 +0200, Markus Neteler wrote:
> > On Thu, Jun 27, 2013 at 9:01 AM, Ivan Marchesini
> > <ivan.marchesini at gmail.com> wrote:
> > > Hi all,
> > > A friend of mine (having skill also in some proprietary remote sensing
> > > softwares) is testing GRASS for some task.
> > > He is quite happy about the results but he was really surprised by the
> > > time interval that r.neighbor take for doing the analysis. The time is
> > > really large in his opinion
> >
> > Please post some indications: computational region size and
> > moving window size, also which hardware/operating system.
> > Otherwise it is hard to say anything...
> >
> > Markus
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- n�chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130629/18252848/attachment.html>


More information about the grass-user mailing list