Cleaning memory failure on Cran pretests submission
Hi,
While submitting package CSTools (V2.0.0) to CRAN, the following error was reported:
> #Example 2: using CST_RainFARM for a CSTools object with parallel processing,
> #dropping the "realization" dimension to be able to save results using
> #\code{CST_SaveExp}.
> #Load dataset included in CSTools pacakge
> data <- lonlat_prec
> nf <- 8
> # Create a test array of weights
> ww <- array(1., dim = c(dim(data$lon) * nf, dim(data$lat) * nf))
> res <- CST_RainFARM(data, nf, weights=ww, nprocs=2, drop_realization_dim = TRUE)
Warning in RainFARM(data$data, data$lon, data$lat, nf, weights, nens, slope, :
Selected time dim: ftime
Warning: <anonymous>: ... may be used in an incorrect context: '.fun(piece, ...)'
Warning: <anonymous>: ... may be used in an incorrect context: '.fun(piece, ...)'
> dim(res$data)
dataset member sdate ftime lat lon
1 6 3 31 32 32
> # dataset member sdate ftime lat lon
> # 1 6 3 31 32 32
> rm(res)
>
>
>
> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
> base::cat("CST_RainFARM", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
> cleanEx()
Error: connections left open:
<-CRANwin.fb05.statistik.uni-dortmund.de:11694 (sockconn)
<-CRANwin.fb05.statistik.uni-dortmund.de:11694 (sockconn)
Execution halted
The difference between Example 1 and Example 2 is just that Example 2 uses 'ncores' parameter from Apply.
Could it be related to the clean of memory in the chunking process? (see original issue in CSTools 28
Núria