Hi,
I am trying to resample a DEM using either r.resamp.rst or r.resamp bspline on a server where I share resources with my colleagues.
Both modules take almost 100% of the CPU (meaning all cores get busy). Can I somehow control/limit the number of cores GRASS modules are allowed to use?
Cheers
Stefan
On Tue, Jun 14, 2016 at 12:12 PM, Blumentrath, Stefan
<Stefan.Blumentrath@nina.no> wrote:
Hi,
I am trying to resample a DEM using either r.resamp.rst or r.resamp bspline
on a server where I share resources with my colleagues.
Both modules take almost 100% of the CPU (meaning all cores get busy).
When you use time, 100% of CPU means one core is fully used. Two fully
used cores would be reported by time as 200%. Both modules use only a
single core. lib/gmath used by r.resamp bspline might use more cores
if GRASS has been compiled with openmp, but for r.resamp.bspline you
would only see a marginal increase in CPU usage above 100%.
Can I
somehow control/limit the number of cores GRASS modules are allowed to use?
Only very few GRASS modules can use more than one core. For openmp,
you can control the number of cores with
setenv OMP_NUM_THREADS X
for pthread used with lib/gis
setenv WORKERS X
with X being the maximum number of allowed threads.
HTH,
Markus M
Cheers
Stefan
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Hi Markus,
Thanks for the reply.
When you use time, 100% of CPU means one core is fully used. Two fully used cores would be reported by time as 200%. Both modules use only a
single core.
I started r.reamp.bspline and r.resamp.rst once and saw equally many PIDs in htop than cores in the system and all cores got ~ 80% busy.
At the same time I got an email from a colleague asking me if I could spare some CPU for him as well, because his processes got significantly slowed down 
lib/gmath used by r.resamp bspline might use more cores if GRASS has been compiled with openmp, but for r.resamp.bspline you would
only see a marginal increase in CPU usage above 100%.
I compiled GRASS 7.0 with OpenMP option, yes.
Only very few GRASS modules can use more than one core. For openmp, you can control the number of cores with
setenv OMP_NUM_THREADS X
export OMP_NUM_THREADS=5 solved it for me on Ubuntu.
Thanks again!
Kind regards,
Stefan