The makePSOCKcluster function is part of the parallel package, which
doParallel makes use of in providing its foreach parallel backend. The
command it is shipping off to the workers is generated by paste(), and I
don't know of a way to get paste to hand back singly-quoted character
strings. One thing you could try is to use the snow package and its
makeSOCKcluster function; this uses a slightly different mechanism for
launching processes in heterogeneous environments, and could be just what
you're looking for. (If you choose to go the snow route, you would of
course need doSNOW as your parallel backend.)

And of course you have already found the manual=TRUE workaround--part of
the reason that exists is for problems like yours.

Cheers,
Rich Calaway


On Sat, Apr 19, 2014 at 9:12 AM, Jim Thompson <jimthompson5802@aol.com>wrote:

> When I try to execute a makePSOCKcluster()  it hangs.  I use the following
> command,
>
>
>
> cl <- makePSOCKcluster("<linux_remote_hosts>",
>
>                         rshcmd="plink.exe -ssh -v -i
> C:/<directory_paths>/snow-key.ppk -l <remote_userid>",
>
>                        master="<windows_ip_address>",
>
>                        rscript="/usr/bin/Rscript",
>
>                         port=11123,
>
>                        homogenous=FALSE,
>
>                        #timeout=30,
>
>                        #manual=TRUE,
>
>                        outfile="./logtest.txt")
>
>
>
>
>
> I know the ssh session starts on the linux host using the plink.exe
> command.
> I can see that when I look at started processes on the linux host.
>
>
>
> >From what I can tell the reason the command hangs is because the generated
> command sent to the linux host looks like this
>
>
>
> "/usr/bin/Rscript" -e "parallel:::.slaveRSOCK()"
> MASTER=<windows_ip_address>
> PORT=11123 OUT=./logtest.txt TIMEOUT=2592000 METHODS=TRUE XDR=TRUE
>
>
>
> The above command fails on the linux host due to a syntax error that says
> the "(" is unexpected.
>
>
>
> >From what I can tell the double quotes(") is causing the problem.  The
> Linux
> command interpreter is not parsing it correctly.  I've found information
> that says the above string should look something like this
> 'parallel:::.solveRSOCK()', using single quote(') character.
>
>
>
> Instead of double quotes(") , the command string should be generated with
> single quote(') character.  When I use manual=TRUE and hand modify the
> command to use single quote(') the worker on the linux hosts starts
> correctly and I am able to run remotely.
>
>
>
> I've looked around and cannot find a way, through some configuration
> parameter, to have the ssh command generated on a Window master to use a
> single quote(') instead of a double quote(") character in the command sent
> to the linux slave host.
>
>
>
> Is there a way to have the Windows master generate the Rscript command with
> single quote(') character?
>
>
>
> Any guidance will be appreciated.
>
>
>
> Jim Thompson
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>



-- 
Rich Calaway
Documentation Manager
Revolution Analytics, Inc.
1505 Westlake Ave North Suite 520
Seattle, WA 98109
richcalaway@revolutionanalytics.com
ph: 206-456-6086 (direct line)
855-GET-REVO

	[[alternative HTML version deleted]]

