MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: remote kernel trouble

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104673] Re: [mg104637] remote kernel trouble
  • From: Zach Bjornson <bjornson at mit.edu>
  • Date: Fri, 6 Nov 2009 05:18:26 -0500 (EST)
  • References: <200911050852.DAA21646@smc.vnet.net>

I've never used the WolframSSH.jar utility, but I have used plink to do 
this. Instructions are below (it sounds like you've done some of these 
steps).
-Zach

1. Enable sshd on the slave. At a terminal, type
     # sudo apt-get install openssh-server openssh-client

On your host, in this order...
1. Install Plink. Download it from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
and save them to e.g. the Program Files directory. You might want PuTTY 
as well, but probably won't need it.

2. Open Mathematica and go to Evaluation>Parallel Kernel Configuration. 
Click on the Remote Kernels tab. Click "Add Host."

3. Type the hostname or IP address of the slave (both will work) in the 
Hostname box.

4. Select "Use custom launch command" and change it to this:
C:\Progra~2\plink.exe username at 192.168.0.1 -pw 123456 -x "math -mathlink 
-linkmode Connect `4` -linkname `2` -subkernel -noinit >& /dev/null &"

where C:\Progra~2\plink.exe is the location of plink.exe (it might be 
Progra~1 if you're not on a 64-bit machine), username is your username 
on the slave, 192.168.0.1 is the hostname or IP address of the slave and 
123456 is the password for your login on the slave.

5. Restart Mathematica. (This is not really necessary, you can just 
evaluate LaunchKernels[] but sometimes Mathematica bawks at your 
already-open kernels.) All of your kernels should launch. Test it with 
e.g. ParallelEvaluate[2^2048;//Timing] to see how your kernel speeds 
roughly compare.

If you get an error about your remote kernel(s) not launching, try 
running the command from step 4 from a command shell. (Open cmd.exe and 
type C:\Progra~2\plink.exe username at 192.168.0.1 -pw 123456 "math" with 
the replacements described above. You should get In[1]:= in a shell.) If 
that doens't work, either PuTTY or your slave isn't configured properly.


On 11/5/2009 3:52 AM, Ian wrote:
> I'm unable to start a remote kernel, and have not found a solution to
> my problem the archives. I'm running Mathematica 7.0 on Windows Vista,
> trying to start a remote kernel on a Linux server also running 7.0.
>
> I'm relying on WolframSSH.jar to make the connection, so I haven't
> fiddled with the advanced settings under kernel configuration
> options.  (Well, I've tried without success to use putty to make the
> connection). When I evaluate the first command in a notebook using the
> remote kernel, I get the authentication key question and then enter a
> password, and then nothing happens. The notebook claims to be running
> but never evaluates, there's no error message, and Mathematica locks
> up.
>
> I can see that a MathKernel does start on the remote machine, so the
> login at least is successful. And force closing Mathematica locally
> kills the remote kernel.
>
> The only clue I can discover is that Mathematica wants to put the RSA
> key in the wrong place. My username on both machines is
> "carroll" (which I can confirm Mathematica knows with $UserName), but
> it creates the known_hosts file in "C:\Users\Ian\.ssh\" which wouldn't
> otherwise exist. I also don't see any key created on the remote
> machine. Could this cause the problem? What else should I try doing?
>
> Thanks
> -Ian
> (* apologies if this is a double post, the first vanished *)
>
>    


  • Prev by Date: Re: Re: Re: Finding Clusters
  • Next by Date: Re: Characteristic Function of Pareto distribution
  • Previous by thread: remote kernel trouble
  • Next by thread: Re: remote kernel trouble