telm8
2010-Aug-25 15:02 UTC
[R] Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "
Hi all, I am trying to use snow package to do a parallel MCMC. I have read a few guides and articles, the following is that I came up with. When I run it I got the error message: Error in checkForRemoteErrors(lapply(cl, recvResult)) : 4 nodes produced errors; first error: could not find function "ui.Next" The data is a longitudinal data with few repeated readings on a number of individuals. However, the response is organised in a vector rather than a matrix. E.g. (y_11 , y_12 , y_13 , y_14 , y_21 , y_22 , ... , y_n1 , ... , y_nTn )^T X , Z are covariates. beta is a matrix of coefficients associated with X C is the latent class membership indicator sigma.sq is the diagonal elements of the covariance matrix of u, which is a random effect parameter and the one I am trying to sample with the function. sd is the diagonal elements of the covariance matrix of the proposal distribution. The following is the particular function: ui.Full.Sample.Cluster = function( levels , Y , X , beta , Z , C , sigma.sq , sd , burnin , iteration ) { cluster = makeCluster( 4 , type = "MPI"); clusterSetupRNG( cluster ); patients = unique( levels ); q = length( X[1,] ); u = ui.Ini( q , length( patients ) ); n = levels[ length(patients) ]; marker = levels == patients[1]; y = Y[ marker ]; x = X[ marker, ]; z = Z[ marker, ]; u[1,] = ui.1.Sample( u[1,] , y , x , beta , z , C[1] , sigma.sq , sd , burnin , iteration )$uFinal; for( i in 2:n) { marker = levels == patients[i]; y = Y[ marker ]; x = X[ marker, ]; z = Z[ marker, ]; print( i ); u[i, ] = clusterCall( cluster , ui.1.Sample, u[i,] , y , x , beta , z , C[i] , sigma.sq , sd , burnin , iteration )$uFinal; print( i ); } stopCluster( cluster ); u; } If anyone could help that would be much appreciated! But big thanks for taking your time to read the post! TelM8 -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-clusterCall-Error-in-checkForRemoteErrors-lapply-cl-recvResult-tp2338375p2338375.html Sent from the R help mailing list archive at Nabble.com.
telm8
2010-Aug-25 15:03 UTC
[R] Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "
Oh, I forgot to say, ui.Next() is a function I defined to sample from the proposal distribution given the current state. -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-clusterCall-Error-in-checkForRemoteErrors-lapply-cl-recvResult-tp2338375p2338378.html Sent from the R help mailing list archive at Nabble.com.
telm8
2010-Aug-26 17:05 UTC
[R] Problem with clusterCall, "Error in checkForRemoteErrors(lapply(cl, recvResult)) : "
Did anyone manage to have a look at this? I have now tried foreach with doMC backen and multicore, but still no luck. If someone can help that would be much appreciated! -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-clusterCall-Error-in-checkForRemoteErrors-lapply-cl-recvResult-tp2338375p2340076.html Sent from the R help mailing list archive at Nabble.com.
Apparently Analagous Threads
- prblems changing directory in mpi snow clusters
- parallel bootstrap linear model on multicore mac (re-post)
- parallel bootstrap linear model on multicore mac
- Snowfall - Error in checkForRemoteErrors(val) with sfClusterApplyLB()
- clusterCall with replicate function