[R-SIG-Mac] Re : Re : Snow package on bi-proc G5

Simon Urbanek simon.urbanek at r-project.org
Mon Jun 20 08:07:35 CEST 2005


Hi Naji,

On Jun 19, 2005, at 9:41 PM, Naji wrote:

> I'm encountering 2 problems
> - a silly one (how to fix env. var on my machine OS Tiger)
>     in order to run PVM (and snow) I need to declare the following

You don't need all those - pvm sets them up automatically. The only  
one you really need is PVM_ROOT. You can set it in many places -  
depending how you start R and pvm.  For the shell you can use  
~/.profile - that's sourced by bash and friends (the site version is  
in /etc/profile btw). For R you can use .Renviron (see ?Startup). I'm  
not sure how exactly you setup your PVM, but for a cluster I use  
~/.ssh/environment (see sshd docs for details) - that works on any  
platform and allows inhomogenous clusters.

> - the second is adapting a loop for a Cluster (a replication eiher  
> a loop or a job for one proc)
>     The loop code (working fine) & the cluster code giving the  
> following
> errors

You have to keep in mind that the master node (the one you're running  
interactively) is separate from the working nodes. If you want  
variables to be assigned in other nodes as well, you have to use  
clusterExport (or use assignments in clusterCall and friends). In  
your case all the variables you define on top have to be exported (as  
well as any data you need) - if you don't have too much junk in your  
workspace you could even use something like clusterExport(cl, ls())

Cheers,
Simon



More information about the R-SIG-Mac mailing list