<div dir="auto"><div>I just ported <a href="http://r.sun.mp">r.sun.mp</a> from addons to r.sun, so you are welcome to test that as well.</div><div dir="auto"><br></div><div dir="auto">Anna<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Oct 30, 2017 5:28 AM, "Stefan Blumentrath" <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Anna,<br>
<br>
Yes, now I can confirm that it works. The problem was that I did not adjust the region to where the points are which influenced computation so OpenMP did not kick-in.<br>
<br>
So now:<br>
g.region -p vector=elev_lidrural_mrpts res=1 -a<br>
time v.surf.rst --overwrite input=elev_lidrural_mrpts@<wbr>PERMANENT elevation=test nprocs=10<br>
<div class="quoted-text">Reading features from vector map ...<br>
</div>WARNING: Strip exists with insufficient data<br>
Ignoring 701 points (too dense)<br>
<div class="quoted-text">Processing segments in parallel...<br>
Starting parallel work<br>
WARNING: Overshoot - increase in tension suggested. Overshoot occurs at<br>
</div>         (85,878) cell. Z-value 158.741920, zmin 102.227686, zmax<br>
         153.065828.<br>
 100%<br>
v.surf.rst complete.<br>
<br>
real    0m19.670s<br>
user    2m19.833s<br>
sys     0m0.446s<br>
<br>
Compared to:<br>
time v.surf.rst --overwrite input=elev_lidrural_mrpts@<wbr>PERMANENT elevation=test nprocs=1<br>
(...)<br>
real    2m0.889s<br>
user    2m0.332s<br>
sys     0m0.251s<br>
<br>
Cool!<br>
<br>
Cheers<br>
<font color="#888888">Stefan<br>
</font><br>
P.S.: using /usr/bin/time -v it seems that RAM usage increased by a factor of ~2.25 between 1 and 10 cores...<br>
<div class="quoted-text"><br>
-----Original Message-----<br>
From: Anna Petrášová [mailto:<a href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>]<br>
</div><div class="quoted-text">Sent: søndag 29. oktober 2017 23.00<br>
To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>
Cc: GRASS-dev <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>
</div><div class="elided-text">Subject: Re: [GRASS-dev] Compilation options<br>
<br>
On Sun, Oct 29, 2017 at 4:30 PM, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>
> Thanks for the hint.<br>
><br>
><br>
><br>
> I just tried:<br>
><br>
> time v.surf.rst elevrand zcol=value elevation=elev_full --o nprocs=10<br>
><br>
> Reading features from vector map ...<br>
><br>
> Processing segments in parallel...<br>
><br>
> Starting parallel work<br>
><br>
> v.surf.rst complete.<br>
><br>
><br>
><br>
> real    0m33.814s<br>
><br>
> user    0m35.786s<br>
><br>
> sys     0m0.126s<br>
><br>
><br>
><br>
> Seems, that also with nprocs=10 and OMP_NUM_THREADS=10 v.surf.rst only<br>
> uses one CPU in GRASS 7.3.svn (despite the message about parallel<br>
> work)…<br>
><br>
<br>
For me it works, try different dataset, you might see more difference for larger datasets maybe:<br>
<br>
GRASS 7.3.svn (nc_spm_08_coastal):~/dev/<wbr>grass/trunk2 > time v.surf.rst --overwrite input=elev_lidrural_mrpts@<wbr>PERMANENT elevation=test<br>
nprocs=4<br>
Reading features from vector map ...<br>
WARNING: Some points outside of region (ignored)<br>
WARNING: There are points outside specified 2D/3D region - 9663 points<br>
         ignored<br>
Ignoring 511 points (too dense)<br>
Processing segments in parallel...<br>
Starting parallel work<br>
WARNING: Overshoot - increase in tension suggested. Overshoot occurs at<br>
         (662,749) cell. Z-value 98.513438, zmin 103.513005, zmax<br>
         153.065828.<br>
v.surf.rst complete.<br>
<br>
real 0m58.009s<br>
user 3m41.476s<br>
sys 0m0.304s<br>
<br>
><br>
><br>
> Cheers<br>
><br>
> Stefan<br>
><br>
><br>
><br>
> From: Anna Petrášová [mailto:<a href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>]<br>
> Sent: søndag 29. oktober 2017 12.31<br>
> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>
> Cc: GRASS-dev <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>
> Subject: RE: [GRASS-dev] Compilation options<br>
><br>
><br>
><br>
> v.surf.rst in trunk has nproc parameter, have you tried to use it?<br>
><br>
><br>
><br>
> Anna<br>
><br>
><br>
><br>
> On Oct 29, 2017 6:51 AM, "Stefan Blumentrath"<br>
> <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>
> wrote:<br>
><br>
> Hei Anna,<br>
><br>
> Thanks for looking into this.<br>
><br>
> I did some tests with GRASS 7.2.1svn (r70188) and GRASS 7.3.svn<br>
> (r70829) both compiled with --with-openmp<br>
><br>
> It seems that r.proj does not use multiple threads in GRASS 7.2 (not<br>
> tested in 7.3. yet). v.surf.rst uses more cores in GRASS 7.2 with<br>
> OpenMP but that does not bring down execution time at all. OpenMP<br>
> seems to be disabled for v.surf.rst in GRASS 7.3. v.surf.bspline<br>
> however, is significantly faster in GRASS 7.3 with OpenMP...<br>
><br>
> I will do some more, systematic tests and update the wiki entry as far<br>
> as I can, if not someone with knowledge gets there first...<br>
><br>
> Cheers<br>
> Stefan<br>
><br>
> P.S.: Some preliminary test results:<br>
> # OpenMP support test<br>
> $ OMP_NUM_THREADS=10<br>
> $ export OMP_NUM_THREADS<br>
> $ time v.surf.rst input=points elevation=test  --o --qq<br>
><br>
> real    51m42.224s<br>
> user    398m2.766s<br>
> sys     0m18.874s<br>
><br>
> $ OMP_NUM_THREADS=1<br>
> $ export OMP_NUM_THREADS<br>
> $ time v.surf.rst input=points elevation=test  --o --qq<br>
><br>
> real    53m22.508s<br>
> user    53m10.607s<br>
> sys     0m4.793s<br>
><br>
> $ OMP_NUM_THREADS=10<br>
> $ export OMP_NUM_THREADS<br>
> $ time v.surf.bspline elevrand column=value output=elev_full --o<br>
> real    0m20.509s<br>
> user    3m11.412s<br>
> sys     0m1.963s<br>
><br>
> $ OMP_NUM_THREADS=1<br>
> $ export OMP_NUM_THREADS<br>
> $ time v.surf.bspline elevrand column=value output=elev_full --o<br>
> real    1m15.434s<br>
> user    1m14.738s<br>
> sys     0m0.447s<br>
><br>
><br>
> -----Original Message-----<br>
> From: Anna Petrášová [mailto:<a href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>]<br>
> Sent: fredag 27. oktober 2017 17.00<br>
> To: Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>><br>
> Cc: GRASS developers list (<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>)<br>
> <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>
> Subject: Re: [GRASS-dev] Compilation options<br>
><br>
> On Tue, Oct 24, 2017 at 10:27 AM, Stefan Blumentrath<br>
> <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> wrote:<br>
>> Hi again,<br>
>><br>
>><br>
>><br>
>> Seek and ye shall find…<br>
>><br>
>><br>
>><br>
>> So, there is:<br>
>><br>
>> <a href="https://grasswiki.osgeo.org/wiki/OpenMP#OpenMP_support_in_GRASS_7" rel="noreferrer" target="_blank">https://grasswiki.osgeo.org/<wbr>wiki/OpenMP#OpenMP_support_in_<wbr>GRASS_7</a> and<br>
>><br>
>> <a href="https://grasswiki.osgeo.org/wiki/GPU" rel="noreferrer" target="_blank">https://grasswiki.osgeo.org/<wbr>wiki/GPU</a><br>
>><br>
>> Which helped me a bit further.<br>
>><br>
>><br>
>><br>
>> However, my impression is that not all info there (esp. on OpenMP) is<br>
>> up to date (e.g. latest development like here:<br>
>> <a href="https://lists.osgeo.org/pipermail/grass-dev/2017-August/085711.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>pipermail/grass-dev/2017-<wbr>August/085711.html</a>).<br>
>> Neither did it became very clear to me which modules already have<br>
>> robust and working support and which are just candidates or where<br>
>> initial implementations are available (sometimes outside the code<br>
>> base)…<br>
>><br>
>><br>
><br>
> I updated it slightly to reflect the new modules, as always, more work<br>
> is needed on that page.<br>
> <a href="https://grasswiki.osgeo.org/wiki/OpenMP#OpenMP_support_in_GRASS_7" rel="noreferrer" target="_blank">https://grasswiki.osgeo.org/<wbr>wiki/OpenMP#OpenMP_support_in_<wbr>GRASS_7</a><br>
><br>
> Anna<br>
><br>
>><br>
>> Cheers<br>
>><br>
>> Stefan<br>
>><br>
>><br>
>><br>
>> From: grass-dev [mailto:<a href="mailto:grass-dev-bounces@lists.osgeo.org">grass-dev-bounces@<wbr>lists.osgeo.org</a>] On Behalf<br>
>> Of Stefan Blumentrath<br>
>> Sent: mandag 23. oktober 2017 09.24<br>
>> To: GRASS developers list (<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>)<br>
>> <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>
>> Subject: [GRASS-dev] Compilation options<br>
>><br>
>><br>
>><br>
>> Dear all,<br>
>><br>
>><br>
>><br>
>> Does someone of you know which modules benefit from --with-openmp and<br>
>> --with-opencl compilation options?<br>
>><br>
>><br>
>><br>
>> I found this explanation of compilation options:<br>
>> <a href="https://grass.osgeo.org/grass72/source/snapshot/REQUIREMENTS.html" rel="noreferrer" target="_blank">https://grass.osgeo.org/<wbr>grass72/source/snapshot/<wbr>REQUIREMENTS.html</a><br>
>><br>
>> But it does not cover OpenCL or OpenMP (as well as some few more<br>
>> other option).<br>
>><br>
>><br>
>><br>
>> If I wanted to find out myself, could I just search the code for<br>
>> modules that import the relevant headers of the respective libraries?<br>
>><br>
>> Or is that a bit more complex?<br>
>><br>
>><br>
>><br>
>> Another question is if it would be recommended to use the different<br>
>> options, as I understood e.g. using --with-pthread is not necessarily<br>
>> a good choice…<br>
>><br>
>><br>
>><br>
>> Thanks in advance.<br>
>><br>
>><br>
>><br>
>> Cheers<br>
>><br>
>> Stefan<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> grass-dev mailing list<br>
>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-dev</a><br>
><br>
><br>
</div></blockquote></div><br></div></div></div>