Displaying 20 results from an estimated 9000 matches similar to: "foreach() package for parallel computing"
2011 Feb 11
1
foreach with registerDoMC on R 2.12.0 OSX 10.6 --- errors and warnings
some hints for the search engines.
I just did
install.packages("foreach")
install.packages("doMC")
library(doMC)
registerDoMC()
library(foreach)
> foreach(i = 1:3) %dopar% sqrt(i)
The process has forked and you cannot use this CoreFoundation
functionality safely. You MUST exec().
Break on
2011 Jul 02
5
%dopar% parallel processing experiment
dear R experts---
I am experimenting with multicore processing, so far with pretty
disappointing results. Here is my simple example:
A <- 100000
randvalues <- abs(rnorm(A))
minfn <- function( x, i ) { log(abs(x))+x^3+i/A+randvalues[i] } ?## an
arbitrary function
ARGV <- commandArgs(trailingOnly=TRUE)
if (ARGV[1] == "do-onecore") {
?library(foreach)
?discard <-
2010 Nov 11
0
logging interim results using foreach/doMC
Dear all,
I am converting a large process to a parallel backhend using doMC and
foreach. Basically, I havea long list of input graph files and each of
them calls soem basic igraph package functions. I am parallelizing the
run, in order to save time. All works fine, and each %dopar% call ends
with a vector of results that at the end got fed into a data frame and
saved as a csv table.
When I
2011 Oct 17
2
Foreach (doMC)
Hello,
I am trying to run a small example with foreach, but I am having some
problems. Here is the code:
*library(doMC)
registerDoMC()
zappa = list()
frank = list()
foreach (i = 1:4) %dopar% {
zappa[[i]] = kmeans (iris[-5],4)
frank[[i]] = warnings()
}*
The code runs without error. However the zappa and frank will be empty
lists.
If I use regular *for *instead, the list will be filled up
2012 Jul 24
1
untaring files in parallel with foreach and doSNOW?
Hello,
I'm running some code that requires untaring many files in the first step.
This takes a lot of time and I'd like to do this in parallel, if possible.
If it's the disk reading speed that is the bottleneck I guess I should not
expect an improvement, but perhaps it's the processor. So I want to try this
out.
I'm working on windows 7 with R 2.15.1 and the latest foreach
2011 Jun 29
0
[R-sig-hpc] doMC - compiler - concatenate an expression vector into a single expression?
Thank you very much Steve.
Your suggestion works perfectly -- at least with doSEQ, doMC and doMPI.
Bests,
Renaud
On 28/06/2011 15:35, Stephen Weston wrote:
> I think that the result of the concatenation should be a call object,
> rather than an expression object. How about something along the
> lines of:
>
> '%dopar2%'<- function(obj, ex) {
> ex<-
2011 Jun 28
1
doMC - compiler - concatenate an expression vector into a single expression?
Hi,
this post is about foreach operators, the compiler package and the last
update of doMC that includes support for the compiler functionality.
I am using a home-made %dopar%-like operator that adds some custom
expression to be executed before the foreach loop expression itself (see
sample code below).
It used to work perfectly with doMC 1.2.1, but with the introduction of
the compiler
2017 Dec 07
0
parallel computing with foreach()
Your code generates an error that has nothing to do with dopar. I have
no idea what your function stack is supposed to do; you may be
inadvertently calling utils::stack which would produce this kind of
error:
> stack(1:25, RAT = FALSE)
Error in data.frame(values = unlist(unname(x)), ind, stringsAsFactors = FALSE) :
arguments imply differing number of rows: 25, 0
HTH,
Peter
On Wed, Dec 6,
2013 Apr 24
0
help with execution of 'embarrassingly parallel' problem using foreach, doParallel on a windows system
Dear R helpers,
I have what another member on this forum described as
an embarrassingly parallel problem. I am trying to fit models on subsets of
some data based on unique combinations of two id factors in the dataset.
Total number of combinations is 30^5, and this takes a long time. So, I
would like fit models for each of the datasets produced by subsetting on
the unique combinations, splitting
2009 Jul 01
0
Parallel programming packages iterators, foreach and doMC released
REvolution Computing has just released three new packages for R to
CRAN (under the open-source Apache 2.0 license): foreach, iterators,
and doMC. Together, they provide a simple, scalable parallel computing
framework for R that lets you take advantage of your multicore or
multiprocessor workstation to program loops that run faster than
traditional loops in R.
The three packages build on each
2009 Jul 01
0
Parallel programming packages iterators, foreach and doMC released
REvolution Computing has just released three new packages for R to
CRAN (under the open-source Apache 2.0 license): foreach, iterators,
and doMC. Together, they provide a simple, scalable parallel computing
framework for R that lets you take advantage of your multicore or
multiprocessor workstation to program loops that run faster than
traditional loops in R.
The three packages build on each
2011 Jul 04
1
writeLines + foreach/doMC
Hi
I'm processing sequencing data trying to collapsing the locations of each
unique sequence and write the results to a file (as storing that in a table
will require 10GB mem at least)
so I wrote a function that, given a sequence id, provide the needed line to
be stored
library(doMC) # load library
registerDoMC(12) # assign the Number of CPU
2010 Jun 16
2
Parallel computing on Windows (foreach) (Sergey Goriatchev)
foreach (or virtually anything you might use for concurrent programming)
only really makes sense if the work the "clients" are doing is substantial
enough to overwhelm the communication overhead. And there are many ways to
accomplish the same task more or less efficiently (for example, doing blocks
of tasks in chunks rather than passing each one as an individual job).
But more to the
2011 Jun 28
1
parallel computing with 'foreach'
Hi all,
I would like to parallelize some R code and would like to use the 'foreach'
package with a foreach loop. However, whenever I call a function from an
enabled package outside of MASS, I get an error message that a number of the
functions aren't recognized (even though the functions should be defined).
For example:
library(foreach)
library(doSMP)
library(survival)
# Create the
2012 Jan 19
1
converting a for loop into a foreach loop
Dear all,
Just wondering if someone could help me out converting my code from a for()
loop into a foreach() loop or using one of the apply() function. I have a
very large dataset and so I'm hoping to make use of a parallel backend to
speed up the processing time. I'm having trouble getting selecting three
variables in the dataset to use in the foreach() loops. My for() loop code
is:
2012 Feb 23
1
segfault when using data.table package in conjunction with foreach
Hi all,
I'm trying to use the package read.table within a foreach loop. I'm
grabbing 500M rows of data at a time from two different files and then
doing an aggregate/tapply like function in read.table after that. I
had planned on doing a foreach loop 39 times at once for the 39 files
I have, but obviously that won't work until I figure out why the
segfault is occurring. The
2011 Aug 17
1
R cmd check and multicore foreach loop
Hi,
in R 2.12.1, R CMD check hangs when building a vignette that uses a
foreach loop with the doMC parallel backend.
This does not happen in R 2.13.1, nor if I use doSEQ instead of doMC.
All versions of multicore, doMC and foreach are the same on both my R
installations.
Has anybody encountered a similar issue?
Thank you.
Renaud
###
UNIVERSITY OF CAPE TOWN
This e-mail is subject to the
2017 Dec 07
2
parallel computing with foreach()
I have used foreach() for parallel computing but in the current problem, it
is not working. Given the volume and type of the data involved in the
analysis, I will try to give below the complete code without reproducible
example.
In short, each R environment will draw a set of separate files, perform the
analysis and dump in separate folders.
splist <- c("juoc", "juos",
2012 Feb 18
3
foreach %do% and %dopar%
Hi everyone,
I'm working on a script trying to use foreach %dopar% but without success,
so I manage to run the code with foreach %do% and looks like this:
The code is part of a MCMC model for projects valuation, returning the most
important results (VPN, TIR, EVA, etc.) of the simulation.
foreach (simx = NsimT, .combine=cbind, .inorder=FALSE, .verbose=TRUE) %do% {
MCPVMPA = MCVAMPA[simx]
2012 Oct 25
1
parallel processing with foreach
Hi,
I am trying to parallel computing with foreach function, but not able to
get the result. I know that in parallel processing, all result is collected
in list format, but I am not able to get input there.
Any help is really appreciated.
esf.m <-foreach (i = 1:n.s, .combine=rbind) %dopar% {
EV <- as.data.frame(eig$vectors[,1:n.candid[i]])
colnames(EV) <- paste("EV",