[R-sig-Geo] slow computation progress for calc function

Sara Shaeri @@r@@h@er| @end|ng |rom y@hoo@com
Tue Jun 25 13:22:58 CEST 2019


Hi Barry,Yes all of them are running at near 100% usage.

Sara





 

    On Tuesday, June 25, 2019, 9:17:05 PM GMT+10, Barry Rowlingson <b.rowlingson using lancaster.ac.uk> wrote:  
 
 

On Tue, Jun 25, 2019 at 2:32 AM Sara Shaeri via R-sig-Geo <r-sig-geo using r-project.org> wrote:


interflood <- clusterR(all_predictions, calc, args=list(function(x){y <- rle(as.numeric(x));return(max( y$lengths[y$values == 0]))}))



If I understand this correctly you are trying to find the length of the longest run of zeroes in each pixel stack?
You need to find out where the bottleneck is - are all your beginCluster(30) CPU cores running at near 100% usage? If not then there's a memory or disk bottleneck which would need a different optimisation strategy than trying to find something to optimise the CPU usage.
Barry

 


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo using r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

  
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list