search for: preschedul

Displaying 20 results from an estimated 30 matches for "preschedul".

Did you mean: preschedule
2012 Dec 11
1
Bug in mclapply?
I've been using mclapply and have encountered situations where it gives errors or returns incorrect results. Here's a minimal example, which gives the error on R 2.15.2 on Mac and Linux: library(parallel) f <- function(x) NULL mclapply(1, f, mc.preschedule = FALSE, mc.cores = 1) # Error in sum(sapply(res, inherits, "try-error")) : # invalid 'type' (list) of argument I believe it happens when the following are true: - The function returns NULL - mc.preschedule = FALSE - mc.cores >= length of the input data Here are some exam...
2013 Apr 11
1
parallel::mclapply does not return try-error objects with mc.preschedule=TRUE
Hello, Consider this: 1) library(parallel) res <- mclapply(1:2, stop) #Warning message: #In mclapply(1:2, stop) : # all scheduled cores encountered errors in user code is(res[[1]], 'try-error') #[1] FALSE 2) library(parallel) res <- mclapply(1:2, stop, mc.preschedule=FALSE) #Warning message: #In mclapply(1:2, stop, mc.preschedule = FALSE) : # 2 function calls resulted in an error is(res[[1]], 'try-error') #[1] TRUE The documentation states that: 'Each forked process runs its job inside try(..., silent = TRUE) so if errors occur they will be stor...
2012 Nov 16
0
Bug in parallel / mclapply
Hi, there seem to be some (small) bugs in the mclapply function in parallel. I discovered this in the current R release version, and I checked that it is still present in R-devel. I think it only occurs in the part of the code corresponding to argument option mc.preschedule = FALSE. Here are two examples: a) library(parallel) mclapply(list(), identity, mc.preschedule=FALSE) Error in sum(sapply(res, inherits, "try-error")) : invalid 'type' (list) of argument Possible reason / fixes: The relevant portion of the code is this: if (!mc.preschedul...
2023 Jun 09
2
inconsistency in mclapply.....
Dear members, I am using pbmcapply to parellise my code. But the following code doesn't work: > LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = 2,mc.preschedule = FALSE) | | 0%, ETA NA^ It just hangs. But the following works: > LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = 2) |================...
2010 Apr 13
0
Multicore mapply
...which basically sets up a series of calls and then uses mclapply. It's clearly sub-optimal, as setting up the series of calls is done with a 'for' which can have a non-negligible cost. Could this be useful for the multicore package? Any suggestions? mcmapply <- function(FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE, mc.silent = FALSE, mc.cores=1) { FUN <- match.fun(FUN) dots <- list(...) if (length(dots)==1) { ans <- mclapply(dots[[1]], FUN, mc.preschedule=mc.preschedule, mc.set.seed=mc.set.seed, mc.silent=mc.silent, mc.cores=mc.cores) } else { l <- leng...
2023 Jun 09
1
inconsistency in mclapply.....
On Fri, 9 Jun 2023 18:01:44 +0000 akshay kulkarni <akshay_e4 at hotmail.com> wrote: > > LYG <- pbmclapply(LYGH,FUN = arfima,mc.cores = 2,mc.preschedule = > > FALSE) > | > | > 0%, ETA NA^ > > It just hangs. My questions from the last time still stand: 0) What is your sessionInfo()? Maybe you're running a parallel BLAS which doesn'...
2013 Aug 21
1
[LLVMdev] PrescheduleNodesWithMultipleUses() probable mistake.
...Unit. Robert diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index f5fe168..6e888da --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -2850,7 +2850,7 @@ void RegReductionPQBase::PrescheduleNodesWithMultipleUses() { continue; // Avoid prescheduling to copies from virtual registers, which don't behave // like other nodes from the perspective of scheduling heuristics. - if (SDNode *N = SU->getNode()) + if (SDNode *N = PredSU->getNode()) if (N->...
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
...tderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error"))}) 18: try(lapply(S, FUN, ...), silent = TRUE) 19: sendMaster(try(lapply(S, FUN, ...), silent = TRUE)) 20: FUN(1:2[[1L]], ...) 21: lapply(1:cores, inner.do) 22: mclapply(argsList, FUN, mc.preschedule = preschedule, mc.set.seed = set.seed, mc.silent = silent, mc.cores = cores) 23: e$fun(obj, substitute(ex), parent.frame(), e$data) 24: foreach(IT = 1:2) %dopar% { require(data.table) if (IT == 1) { x <- system.time({ computeAllPairSums(paste(GERMLINE, "bc.chr22.q.20.file&...
2013 Aug 21
0
[LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
Here is a bit more data. After PrescheduleNodesWithMultipleUses has been run, the following Predecessor/Successor links are 'dumpAll'ed. (I attach the full dumpAll before & after "Prescheduling SU #7 next to PredSU #4 to guide scheduling in the presence of multiple uses") SU(3) Predecessors: val SU(5): Latency=1...
2004 Jan 11
3
newbie question on contrasts and aov
I try to move from SPSS to R/S and am trying to reproduce the results of SPSS in R. I calculated a one-way anova with "spk" as experimental factor and erp as depended variable. The result of the Anova are the same concearning the mean square, F and p values. But I also wanted to caculate the contr.sdif(4) contrast on spk. The results are completely different now. I hope anybody can
2013 Aug 20
2
[LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
...::TargetRegisterClass* llvm::TargetRegisterInfo::getMinimalPhysRegClass(unsigned int, llvm::EVT) const: Assertion `BestRC && "Couldn't find the register class"' failed. The interesting thing about this failure is that the Predecessor/Successor of two nodes was changed by PrescheduleNodesWithMultipleUses(). If they were not, the AvailableQueue would have had nodes, and all would have been fine. I am quite uneasy over how PrescheduleNodesWithMultipleUses() has changed the Predecessor/Successor. It seems to have changed the DAG into something impossible to schedule - I need to l...
2013 Aug 21
2
[LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
Hi, I have reasoned through and believe the problem is with the PrescheduleNodesWithMultipleUses. Take the following DAG (arrow to predecessor): Destroy Destroy ^ ^ | | | | SetUp----->PredSU <-----SU ^ ^ ^ | | | | |...
2020 Oct 08
2
exiting mclapply early on error
Hey folks, Is there any way to exit an mclapply early on error? For example, in the following mclapply loop, I have to wait for all the processes to finish before the error is returned. ``` mclapply(X = 1:12, FUN = function(x) {Sys.sleep(0.1); if(x == 4) stop()}, mc.cores = 4, mc.preschedule = F) ``` When there are many calculations in FUN, it takes a long time before the error is returned. It would be nice if there were an option to exit (all child processes) early on error. Is there any way to do this? Thanks, Giovanni Righi
2020 Jun 06
0
R 4.0.1 is released
...uffa. * Fix a dozen places (code, examples) as Sys.setlocale() returns the new rather than the previous setting. * Fix for adding two complex grid units via sum(). Thanks to Gu Zuguang for the report and Thomas Lin Pedersen for the patch. * Fix parallel::mclapply(..., mc.preschedule=FALSE) to handle raw vector results correctly. PR#17779 * Computing the base value, i.e., 2, "everywhere", now uses FLT_RADIX, as the original machar code looped indefinitely on the ppc64 architecture for the longdouble case. * In R 4.0.0, sort.list(x) when is...
2020 Jun 06
0
R 4.0.1 is released
...uffa. * Fix a dozen places (code, examples) as Sys.setlocale() returns the new rather than the previous setting. * Fix for adding two complex grid units via sum(). Thanks to Gu Zuguang for the report and Thomas Lin Pedersen for the patch. * Fix parallel::mclapply(..., mc.preschedule=FALSE) to handle raw vector results correctly. PR#17779 * Computing the base value, i.e., 2, "everywhere", now uses FLT_RADIX, as the original machar code looped indefinitely on the ppc64 architecture for the longdouble case. * In R 4.0.0, sort.list(x) when is...
2020 Jun 06
0
R 4.0.1 is released
...uffa. * Fix a dozen places (code, examples) as Sys.setlocale() returns the new rather than the previous setting. * Fix for adding two complex grid units via sum(). Thanks to Gu Zuguang for the report and Thomas Lin Pedersen for the patch. * Fix parallel::mclapply(..., mc.preschedule=FALSE) to handle raw vector results correctly. PR#17779 * Computing the base value, i.e., 2, "everywhere", now uses FLT_RADIX, as the original machar code looped indefinitely on the ppc64 architecture for the longdouble case. * In R 4.0.0, sort.list(x) when is...
2011 Jul 12
2
MC-Simulation with foreach: Some cores finish early
Dear R-Users, I run a MC-Simulation using the the packages "foreach" and "doMC" on a PowerMac with 24 cores. There are roughly a hundred parametersets and I parallelized the program in a way, that each core computes one of these parametersets completely. The problem ist, that some parametersets take a lot longer to compute than others. After a while there are only a quarter
2019 Nov 27
2
error in parallel:::sendMaster
...>> mc_ret <- parallel::mclapply(sample.int(nrow(parts)), function(i) { >> # do some data wrangling and write the result to a file >> # ... >> >> print(paste0("part ", i, " written successfully.")) >> return(TRUE) >> }, mc.preschedule = FALSE, mc.cores = 2L) >> >> str(mc_ret) >> >> >> Expected output: "part i written successfully." is printed 88 times, once for each value of i. mc_ret is a list of length 88, each element being TRUE. Its structure is printed once. All outputs are created s...
2013 Sep 24
0
[LLVMdev] MI Scheduler Update (was Experimental Evaluation of the Schedulers in LLVM 3.3)
...o give a thourough update of the MI scheduler. Hopefully that will answer many of your questions. Some important things changed between the time I introduced the MI scheduler a year ago, and the release of 3.3. The biggest change was loop vectorization, which reduces register pressure and somewhat preschedules loops. Since 3.3 was released, the generic MI scheduler's heuristics were reevaluated in preparation for making it the default for targets without a custom scheduling strategy--more on that later. The source order scheduler was also fixed so that it actually preserves IR order, which is at le...
2019 Nov 27
2
error in parallel:::sendMaster
...matic section of the script: # parts is a data.table with 88 rows mc_ret <- parallel::mclapply(sample.int(nrow(parts)), function(i) { # do some data wrangling and write the result to a file # ... print(paste0("part ", i, " written successfully.")) return(TRUE) }, mc.preschedule = FALSE, mc.cores = 2L) str(mc_ret) Expected output: "part i written successfully." is printed 88 times, once for each value of i. mc_ret is a list of length 88, each element being TRUE. Its structure is printed once. All outputs are created successfully. Actual output (see end of th...