[R-sig-hpc] snow job
Whit Broach
whitneybroach at gmail.com
Sun May 15 05:33:37 CEST 2011
Problem successfully addressed!
To summarize what happened off-list, I used Stephen's suggestions to isolate
the problem. The space in the folder name "Program Files" prevented snow
from working correctly.
Removing R, then installing under C:/R solved the problem.
Useful in problem isolation was this script code from Stephen:
> snowlib <- file.path(R.home(), "library")
> cl <- makeSOCKcluster(2, snowlib=snowlib, outfile="")
If makeSOCKcluster returns, try:
> clusterApply(cl, 1:4, sqrt)
And this code was also helpful:
> library(snow)
> .path.package('snow')
> .libPaths()
> cl <- makeSOCKcluster(2, outfile="", manual=TRUE)
Thanks to everyone who responded.
Best regards,
Whit
-----Original Message-----
From: Stephen Weston [mailto:stephen.b.weston at gmail.com]
Sent: Friday, May 13, 2011 9:38 AM
To: whitneybroach at gmail.com
Cc: r-sig-hpc at r-project.org
Subject: Re: [R-sig-hpc] snow job
On Thu, May 12, 2011 at 5:03 PM, Whit Broach <whitneybroach at gmail.com>
wrote:
> 4. Steve's suggestion below, using manual = TRUE and typing the command
> indicated.
>
> 4 Result. Log file is created and not accessible until the R Gui is
closed.
> Then the log file opens and is empty.
So you attempted to create a two-worker cluster, manually started two
workers, and then what happened? Did everyone hang without displaying
any error message?
Since you're running everything on one machine, I would set outfile to
"" (the empty string). That causes all messages to go to the console,
which is convenient in manual mode, and prevents the two workers from
opening and writing to the same file, which could cause problems.
Create the cluster like this:
cl <- makeSOCKcluster(2, outfile="", manual=TRUE)
Then, start the two workers in two separate command windows as before.
In many cases, makeSOCKcluster will never display the command to start
the second worker, because it hangs trying to connect to the first
worker. So it's very important to describe exactly what happens. In
this case, it should display one command, wait for you to execute it,
display a second command, wait again, and then return to the prompt. If
makeSOCKcluster returns to the Rgui prompt without an error, you're
probably good to go. But if it hangs, then knowing precisely when it
hangs is important for guessing what went wrong.
Note that only the call to makeSOCKcluster in Rgui should return. The
workers should not return until you shutdown the cluster using
stopCluster in Rgui. The workers need to keep running so they can
execute tasks for the master. It is a failure for one of the workers
that you started to return to the command prompt before the cluster is
shutdown.
- Steve
More information about the R-sig-hpc
mailing list