2
$\begingroup$

I am trying to launch remote kernels on a Windows 10 PC (remote) from a Raspberry Pi 4 (Master or local). Both machines have V12 installed.

On the Windows machine, I have installed OpenSSH per these instructions and can SSH into the Windows machine using passwordless (key) SSH.

From the Raspberry Pi terminal:

ssh username@IP_Address

opens a Administrator C:\Windows\system32\cmd CMD in the Raspberry Pi terminal with the prompt:

user@WindowsMachineName C:\Users\USER> 

So I know passwordless SSH works. This is generally a prerequisite for launching remote kernels.

I then use code from this example. This code has worked for me launching remote kernels from a Raspberry Pi (local) to another Raspberry Pi (remote) as well as from a Raspberry Pi (local) to a Mac (remote). I am running into trouble launching remote kernels on the Windows 10 machine.

Needs["SubKernels`RemoteKernels`"]
Parallel`Settings`$MathLinkTimeout = 100
user = "myuser";
password = "mypassword";
ssh =  "export LD_LIBRARY_PATH=;ssh"; 
math = "C:\\Program Files\\Wolfram Research\\Wolfram \
Desktop\\12.0\\MathKernel" <> 
       " -wstp -linkmode Connect `4` -linkname `2` -subkernel -noinit >&  \
/dev/null &";
number = 4; (*number of parallel kernels to launch*)
machine = "WindowsMachineIP";
remote = SubKernels`RemoteKernels`RemoteMachine[machine, 
  ssh <> " " <> user <> "@" <> machine <> " " <> "-pw " <> password <>
    " \"" <> math <> "\"", number]

kerns = LaunchKernels[remote]

gives error

LaunchRemote::rsh: Command export LD_LIBRARY_PATH=;ssh USER@WindowsMachineIP "C:\Program Files\Wolfram Research\Wolfram Desktop\12.0\MathKernel -wstp -linkmode Connect -linkprotocol TCPIP -linkname 38417@192.168.1.9,39313@192.168.1.9 -subkernel -noinit >&  /dev/null &" may have failed (exit code 256).

Should I even be trying to launch Kernels over SSH or is there a better method to start remote kernels on a Windows machine (remote) from Linux (local, raspberry pi)?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.