search for: mcparallel

Displaying 20 results from an estimated 64 matches for "mcparallel".

2019 Nov 27
2
error in parallel:::sendMaster
...X times, for values of i for which it was already printed. This output is intermingled with X-1 times the following error message: Error in sendMaster(try(eval(expr, env), silent = TRUE)) : write error, closing pipe to the master Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element being TRUE and all other elements being NULL. X and Y vary from run to run. Now to the main problem: I tried very hard to create a reproducible ex...
2019 Nov 27
0
error in parallel:::sendMaster
...of i for which it was already printed. This output is intermingled with X-1 times the following error message: > > Error in sendMaster(try(eval(expr, env), silent = TRUE)) : > write error, closing pipe to the master > Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster > > and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element being TRUE and all other elements being NULL. X and Y vary from run to run. > > > Now to the main problem: I tried very hard to...
2019 Nov 27
2
error in parallel:::sendMaster
...it was already printed. This output is intermingled with X-1 times the following error message: >> >> Error in sendMaster(try(eval(expr, env), silent = TRUE)) : >> write error, closing pipe to the master >> Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster >> >> and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element being TRUE and all other elements being NULL. X and Y vary from run to run. >> >> >> Now to the main problem: I t...
2018 Jun 21
1
DOCUMENTATION(?): parallel::mcparallel() gives various types of "Error in unserialize(r) : ..." errors if value is of type raw
I stumbled upon the following: f <- parallel::mcparallel(raw(0L)) parallel::mccollect(f) # $`77083` # NULL but f <- parallel::mcparallel(raw(1L)) parallel::mccollect(f) # Error in unserialize(r) : read error traceback() # 2: unserialize(r) # 1: parallel::mccollect(f) (restarting because the above appears to corrupt the R session) f <- parallel:...
2019 Nov 28
0
error in parallel:::sendMaster
...rinted. This output is intermingled with X-1 times the following error message: >>> >>> Error in sendMaster(try(eval(expr, env), silent = TRUE)) : >>> write error, closing pipe to the master >>> Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster >>> >>> and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element being TRUE and all other elements being NULL. X and Y vary from run to run. >>> >>> >>> Now to t...
2019 Nov 28
1
error in parallel:::sendMaster
...ut is intermingled with X-1 times the following error message: >>>> >>>> Error in sendMaster(try(eval(expr, env), silent = TRUE)) : >>>> write error, closing pipe to the master >>>> Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMaster >>>> >>>> and Y times the message "Execution halted". mc_ret is printed again, now being a list of length 85, with the first element being TRUE and all other elements being NULL. X and Y vary from run to run. >>>> >>>> >&...
2015 Jun 20
2
Listing all spawned jobs/processed after parallel::mcparallel()?
QUESTION: Is it possible to query number of active jobs running after launching them with parallel::mcparallel()? For example, if I launch 3 jobs using: > library(parallel) > f <- lapply(1:3, FUN=mcparallel) then I can inspect them as: > str(f) List of 3 $ :List of 2 ..$ pid: int 142225 ..$ fd : int [1:2] 8 13 ..- attr(*, "class")= chr [1:3] "parallelJob" "chi...
2019 Dec 04
0
error in parallel:::sendMaster
...the following error message: >>>>>> >>>>>> Error in sendMaster(try(eval(expr, env), silent =3D TRUE)) : >>>>>> write error, closing pipe to the master >>>>>> Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMa= >> ster >>>>>> >>>>>> and Y times the message "Execution halted". mc_ret is printed again,= >> now being a list of length 85, with the first element being TRUE and all= >> other elements being NULL. X and Y vary from run...
2019 Dec 04
0
error in parallel:::sendMaster
...the following error message: >>>>>> >>>>>> Error in sendMaster(try(eval(expr, env), silent =3D TRUE)) : >>>>>> write error, closing pipe to the master >>>>>> Calls: lapply ... <Anonymous> -> <Anonymous> -> mcparallel -> sendMa= >> ster >>>>>> >>>>>> and Y times the message "Execution halted". mc_ret is printed again,= >> now being a list of length 85, with the first element being TRUE and all= >> other elements being NULL. X and Y vary from run...
2015 Jun 21
0
Listing all spawned jobs/processed after parallel::mcparallel()?
On 20/06/2015 22:21, Henrik Bengtsson wrote: > QUESTION: > Is it possible to query number of active jobs running after launching > them with parallel::mcparallel()? > > For example, if I launch 3 jobs using: > >> library(parallel) >> f <- lapply(1:3, FUN=mcparallel) > > then I can inspect them as: > >> str(f) > List of 3 > $ :List of 2 > ..$ pid: int 142225 > ..$ fd : int [1:2] 8 13 > ..- attr...
2016 Aug 30
1
mcparallel / mccollect
Hi there, I've tried to implement an asynchronous job scheduler using parallel::mcparallel() and parallel::mccollect(..., wait=FALSE). My goal was to send processes to the background, leaving the R session open for interactive use while all jobs store their results on the file system. To keep track of the running jobs I've stored the process ids and written a little helper to not spa...
2012 Apr 10
1
multicore/mcparallel error
...se the multicore package, because I've had some previous success with that. The function I'm trying to parallelize is illumqc. I'd like to create a separate process for each of 8 files, contained in the vector "files". Below is my code: for(i in 1:length(files)){ mcparallel(illumqc(files[i]))} I get the following error: Error in sendMaster(serialize(try(eval(expr, env), silent = TRUE), NULL, : ignoring SIGPIPE signal Calls: mcparallel -> sendMaster -> .Call In addition: Warning message: In min(which(alf != 0)) : no non-missing arguments to min; ret...
2019 May 03
1
Strange error messages from parallel::mcparallel family under 3.6.0
Dear All, Since upgrading to 3.6.0, I've been getting a strange error messages from the child process when using mcparallel/mccollect. Before filing a report in the Bugzilla, I want to figure out whether I had been doing something wrong all this time and R 3.6.0 has exposed it, or whether something else is going on. # Background # Ultimately, what I want to do is to be able to set a time limit for an expression to be...
2018 Aug 31
2
Detecting whether a process exists or not by its PID?
...ir as a unique id. With this you can check if the process is still running, by checking that the pid exists, and that its startup time matches. This is all very simple with the ps package, on Linux, macOS and Windows. Gabor > In base R, one can do this correctly for forked processes via > mcparallel/mccollect, not for PSOCK cluster workers which are based on > system() (and I understand it would be a useful feature) > > > j <- mcparallel(Sys.sleep(1000)) > > mccollect(j, wait=FALSE) > NULL > > # kill the child process > > > mccollect(j, wait=FALSE) &gt...
2012 Oct 03
0
optimize and mcparallel problem
...} This works well so far: vals <- NULL out1 <- optimize(foo, interval = seq(0, 4, 0.2)) vals However, the second problem arises if I want to use the "parallel" function in the "multicore" package: library(multicore) vals <- NULL out2_tmp <- mcparallel(optimize(foo, interval = seq(0, 4, 0.2))) out2 <- collect(out2_tmp, wait = TRUE) vals Predictably, the child process does not return the "vals" object when I use the "collect" function. To summarize, my first question is whether or not there is a better way to return...
2013 Feb 07
1
How to NAMESPACE OS-specific importFrom?
I'd like to importFrom(parallel, mccollect, mcparallel) but on Windows these are not exported because this if(tools:::.OStype() == "unix") { export(mccollect, mcparallel, mc.reset.stream, mcaffinity) } appears at src/library/parallel/NAMESPACE:6 of svn r61857. So should I be doing if (tools:::.OStype() == "unix") { imp...
2020 Jan 10
2
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
...options(fork.allowed = FALSE) > unlist(parallel::mclapply(1:2, FUN = function(x) Sys.getpid())) [1] 14058 14058 > parallel::mcmapply(1:2, FUN = function(x) Sys.getpid()) [1] 14058 14058 > parallel::pvec(1:2, FUN = function(x) Sys.getpid() + x/10) [1] 14058.1 14058.2 > f <- parallel::mcparallel(Sys.getpid()) Error in allowFork(assert = TRUE) : Forked processing is not allowed per option ?fork.allowed? or environment variable ?R_FORK_ALLOWED? > cl <- parallel::makeForkCluster(1L) Error in allowFork(assert = TRUE) : Forked processing is not allowed per option ?fork.allowed? or env...
2018 Aug 31
0
Detecting whether a process exists or not by its PID?
...ue to PID-reuse. In principle, detecting that a worker >> process is still alive cannot be done correctly outside base R. > I am not sure why you think so. To avoid the race with PID re-use one needs access to signal handling, to blocking signals, to handling sigchld. system/system2 and mcparallel/mccollect in base R use these features and the interaction is still safe given the specific use in system/system2 and mcparallel/mccollect, yet would have to be re-visited if either of the two uses change. These features cannot be safely used outside of base R in contributed packages. Tomas &...
2020 Jan 10
2
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
...::mclapply(1:2, FUN = function(x) Sys.getpid())) >> [1] 14058 14058 >>> parallel::mcmapply(1:2, FUN = function(x) Sys.getpid()) >> [1] 14058 14058 >>> parallel::pvec(1:2, FUN = function(x) Sys.getpid() + x/10) >> [1] 14058.1 14058.2 >>> f <- parallel::mcparallel(Sys.getpid()) >> Error in allowFork(assert = TRUE) : >> Forked processing is not allowed per option ?fork.allowed? or >> environment variable ?R_FORK_ALLOWED? >>> cl <- parallel::makeForkCluster(1L) >> Error in allowFork(assert = TRUE) : >> Forked process...
2018 Mar 18
1
BUG: tools::pskill() returns incorrect values or non-initated garbage values [PATCH]
...f C's kill(). # Example 1: returns garbage due to non-initiated allocation > as.integer(tools::pskill(0)) [1] 44764824 > as.integer(tools::pskill(0)) [1] 41609736 > as.integer(tools::pskill(0)) [1] 45003984 # Example 2: returns 0 in success and -1 on failure > p <- parallel::mcparallel({ Sys.sleep(3600); 42L }) > res <- tools::pskill(pid = p$pid, signal = tools::SIGKILL) > as.integer(res) [1] 0 > p <- parallel::mcparallel({ Sys.sleep(3600); 42L }) > res <- tools::pskill(pid = p$pid, signal = -1) ## invalid signal > as.integer(res) [1] -1 /Henrik