4

I am submitting two jobs as below on Linux (R 3.6.0). See below sample code.

library("future")
plan(multicore)

job1 <- future({
    print("job1")
})

job2 <- future({
    print("job2")    
})

while (!resolved(job1)) {
 Sys.sleep(0.2)
}

while (!resolved(job2)) {
 Sys.sleep(0.2)
}

If a job takes more than 3 min due to the size of data then I am getting below error. If data is small then I am not getting error. Am I missing anything?

Error in sendMaster(try(eval(expr, env), silent = TRUE)) : ignoring SIGPIPE signal Calls: source ... run.MulticoreFuture -> do.call -> -> sendMaster

Additional References:

I found that similar issues have been discussed on different blogs. It sounds like bug was fixed in R 3.6.0 but I am still getting it even using R 3.6.0

https://r.789695.n4.nabble.com/error-in-parallel-sendMaster-td4760382.html

https://github.com/wch/r-source/commit/e08cffac1c5b9015a1625938d568b648eb1d8aee

My job1 and job2 are independent and writes output to file so I don't need to send anything back to main job. Is there any way I can define in job to say that there is no need to send anything back to main job?

Update

I don't get an error if I use plan(multisession)

Session and Core Info

sessionInfo()

R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Amazon Linux AMI 2018.03

Matrix products: default
BLAS:   /usr/local/R/R-3.6.0/lib/libRblas.so
LAPACK: /usr/local/R/R-3.6.0/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] future_1.17.0

loaded via a namespace (and not attached):
[1] compiler_3.6.0   tools_3.6.0      parallel_3.6.0   listenv_0.8.0
[5] codetools_0.2-16 digest_0.6.24    globals_0.12.5

future::availableCores(constraint = 'multicore')

system
     2
R007
  • 101
  • 1
  • 13
  • Certain things that might be useful: Output of `sessionInfo()`. Possibly the output of `future::availableCore(constraint = 'multicore')`. Could allow for creating of more exact replications. – Oliver Jun 09 '20 at 18:22
  • 1
    added info to original question – R007 Jun 09 '20 at 21:29
  • See https://stackoverflow.com/questions/28915838/piping-rscript-gives-error-after-output – dkreeft Jun 12 '20 at 06:35
  • Thanks, I reviewed your link. I am using future package and assume that it might have taken care to avoid this kind of error ( instead expecting user need to manually handle). I believe error is In parallel package which is used by future. – R007 Jun 12 '20 at 12:42

0 Answers0