similar to: parLapply within a function

Displaying 20 results from an estimated 8000 matches similar to: "parLapply within a function"

2005 Nov 11
1
Snow parLapply
Dear R-user, I am trying to use the function 'parLapply' from the 'snow' package which is supposed to work the same wys as 'lapply' but for a parallelized cluster of computers. The function I am trying to call in parallel is 'dudi.pca' (from the 'ade4' package) which performs principal component analyses. When I call this function on a list of
2013 Dec 24
2
Parallel computing: how to transmit multiple parameters to a function in parLapply?
Hi R-developers In the package Parallel, the function parLapply(cl, x, f) seems to allow transmission of only one parameter (x) to the function f. Hence in order to compute f(x, y) parallelly, I had to define f(x, y) as f(x) and tried to access y within the function, whereas y was defined outside of f(x). Script: library(parallel) f <- function(x) { z <- 2 * x + .GlobalEnv$y # Try to
2012 Aug 21
1
parLapply fails to detect default cluster?
invoking parLapply without a cluster fails to find a previously registered cluster > library(parallel) > setDefaultCluster(makePSOCKcluster(2)) > parLapply(X=1:2, fun=function(...) {}) Error in cut.default(i, breaks) : invalid number of intervals This is because in parLapply length(cl) is determined before defaultCluster(cl) is called. By inspection, this appears to be true of
2010 Dec 02
1
parLapply - Error in do.call("fun", lapply(args, enquote)) : could not find function "fun"
Hello everybody, I've got a bit of a problem with parLapply that's left me scratching my head today. I've tried this in R 2.11 and the 23 bit Revolution R Enterprise and gotten the same result, OS in question is Windows XP, the package involved is the snow package. I've got a list of 20 rain/no rain (1/0) situations for these two stations i and j, all the items in this list look
2007 Mar 27
2
snow parLapply standard output
I am slightly confused by the way the standard output is redirected in a R snow cluster environment. I am using parLapply from the snow package to execute a function on my MPI/LAM cluster. How can I redirect standard output (produced using "cat") from this function back to the terminal where I invoked it? I intend to transmit some status information in advance to the final result of the
2011 Feb 03
1
problem with parLapply from snow
Hi, The following function use to work, but now it doesn't giving the error "> CallSnow(, 100) Using snow package, asking for 2 nodes 2 slaves are spawned successfully. 0 failed. Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: no applicable method for 'lapply' applied to an object of class "list" ". Where this is the
2012 Dec 21
1
Parallel code using parLapply
Dear R-users I was running into problems with my R code trying to run clh sampling (clhs package) in parallel mode (=on various data sets simultaneously). Here is the code (which I developed with some help:)): ****************************************** library("clhs") library("snow") a <- as.data.frame(replicate(1000, rnorm(20))) b <- as.data.frame(replicate(1000,
2017 Dec 11
0
document environment passing in parallel::parLapply
The runtime of parallel::parLapply depends on variables unrelated to the parLapply call. However, this is not clearly documented. Therefore I would like to suggest expanding the relevant documentation to explain this behaviour. Consider this example: parallel_demo <- function(random_values_count) { some_data <- runif(random_values_count) dummy_function <- function(x) { x }
2018 Mar 15
2
clusterApply arguments
Thank you for your answer! I agree with you except for the 3 (Error) example and I realize now I should have started with that in the explanation. >From my point of view parLapply(cl = clu, X = 1:2, fun = fun, c = 1) shouldn't give an error. This could be easily avoided by using all the argument names in the custerApply call of parLapply which means changing, parLapply <-
2018 Mar 15
1
clusterApply arguments
On 03/15/2018 05:25 PM, Henrik Bengtsson wrote: > On Thu, Mar 15, 2018 at 3:39 AM, <FlorianSchwendinger at gmx.at> wrote: >> Thank you for your answer! >> I agree with you except for the 3 (Error) example and >> I realize now I should have started with that in the explanation. >> >> From my point of view >> parLapply(cl = clu, X = 1:2, fun = fun, c =
2010 Apr 09
1
Rsge: recursive parallelization
In principle, I'd like to be able to do something like this: sge.parLapply(seq(10), function(x) parLapply(seq(x), function(x) x^2)) In practice, however, I have to resort to acrobatics like this: sge.options(sge.remove.files=FALSE) sge.options(sge.qsub.options='-cwd -V') sge.parLapply(seq(10), function(x) { sge.options(sge.save.global=TRUE)
2004 Jun 15
2
factor analysis package
Hello everyone, is there a package/packages for factor analysis, particularly PCA? thanks, Katja Katja L??ytynoja Taitoniekantie 9 A 218 40 740 Jyv??skyl?? Finland tel.+35814 608058 cell.+35850 336 0174 kaloytyn at jyu.fi
2018 Mar 14
2
clusterApply arguments
Hi! I recognized that the argument matching of clusterApply (and therefore parLapply) goes wrong when one of the arguments of the function is called "c". In this case, the argument "c" is used as cluster and the functions give the following error message "Error in checkCluster(cl) : not a valid cluster". Of course, "c" is for many reasons an unfortunate
2014 Jun 05
1
IMAP copy fails because the mailbox size of user1 is exceeding the quota limit of user2??
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 4 Jun 2014, Katja Wegner wrote: > Date: Wed, 4 Jun 2014 16:21:04 +0200 > From: Katja Wegner <katja.wegner92 at web.de> > To: dovecot at dovecot.org > Subject: [Dovecot] IMAP copy fails because the mailbox size of user1 is > exceeding the quota limit of user2?? > > Hi all, > I do have a mailbox-quota problem
2018 Sep 12
2
Environments and parallel processing
While using parallelization R seems to clone all environments (that are normally passed by reference) that are returned from a child process. In particular, consider the following example: library(parallel) env1 <- new.env() envs2 <- lapply(1:4, function(x) env1) cl<-makeCluster(2, type="FORK") envs3 <- parLapply(cl, 1:4, function(x) env1) envs4 <- parLapply(cl, 1:4,
2010 Mar 05
1
Error in inherits(x, "data.frame") : subscript out of bounds
Hi, I have a list p with different size dataframes and length of over 8000. I'm trying to calculate correlations between the rows of dataframes of this list and columns of another dataset (type data.frame also) so that first column is correlated with all the rows in the list dataframe. Some information from another dataset is also included to the final output (all.corrs). This worked a
2018 Aug 09
2
Boosted fields search in Python
Hi, I'm using Xapian in Python2. I'm trying to replicate an analysis that somebody else performed in Lucene. To do that I need to do a search for a multi-word query in which particular fields are boosted - preferably at query time. That is, given a query like "the cat is lying on the mat" (with an OR operator, ignoring word positions but with stemming and stop words removed),
2024 Mar 25
1
Wish: a way to track progress of parallel operations
Hello R-devel, A function to be run inside lapply() or one of its friends is trivial to augment with side effects to show a progress bar. When the code is intended to be run on a 'parallel' cluster, it generally cannot rely on its own side effects to report progress. I've found three approaches to progress bars for parallel processes on CRAN: - Importing 'snow' (not
2008 Nov 30
2
Snow and multi-processing
Dear R gurus, I have a very embarrassingly parallelizable job that I am trying to speed up with snow on our local cluster. Basically, I am doing ~50,000 t.test for a series of micro-array experiments, one gene at a time. Thus, I can easily spread the load across multiple processors and nodes. So, I have a master list object that tells me what rows to pick up for each genes to do the t.test from
2024 Mar 25
3
Wish: a way to track progress of parallel operations
Hello, thanks for bringing this topic up, and it would be excellent if we could come of with a generic solution for this in base R. It is one of the top frequently asked questions and requested features in parallel processing, but also in sequential processing. We have also seen lots of variants on how to attack the problem of reporting on progress when running in parallel. As the author