Message Boards Message Boards

GROUPS:

Setup Remote Kernels on Windows Machines

Posted 9 years ago
16987 Views
|
6 Replies
|
7 Total Likes
|
I am having trouble setting up a remote kernel to work on Windows 7, 64. I have successfully connected to a remote kernel running on Linux but have not been able to make it work for a remote kernel on Windows.

The client and remote host are both Windows 7 Pro, 64bit running Mathematica 9. The documentation, here is straightforward and this is pretty much my experience when the remote machine is linux. When the remote is windows the setup appears to all go as described except when you try to initiate the remote kernel I get the error:
"SSH encountered an error with the local network setup while launching kernel 'm6600'. Error code = 104."

I've searched for info on the error code but haven't found any.
I note that there are references in some older documents for gridComputing that you need to install your own copy of rsh on all of the windows machines but I haven't found a similar discussion in current documentation.

Can anyone point me to current documentation or a tutorial for setting up and connecting to a remote kernel on Windows 7?
Can anyone share their experience getting this up and running?

I used the "Basic Options" of the Kernel properties dialog to setup the kernel but I have posted the details from the "Advanced Options" section below if that is helpful.

Many thanks, Peter
--------------------
-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract
"`java`" -jar "`mathssh`" pjc@m6600 C:\Program Files\Wolfram Research\Mathematica\9.0\math.exe -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" -LinkHost `ipaddress`
6 Replies
Hello Peter:

Do you happen to have access to the Lightweight Grid Manager?  You can access it for free if you currently have Premier Service:
 
http://www.wolfram.com/lightweight-grid-manager/download

While a direct remote kernel connection should be possible to a Windows machine, it is always more involved than the same 
connection to a Unix based machine.  On Unix it is a matter of settings and I have done this often.  I do not recall successfully
connecting to Windows in this way.  It is my understanding that installation of additional software is involved.  If you have to 
install additional software anyway, perhaps you could consider making it the Lightweight Grid.

Wolfram Research put a fair amount of effort into the Lightweight Grid product and I think it was in the hope of answering this 
sort of question (or not answering it by providing an alternative, if you want to look at it that way).
Posted 8 years ago
Here is how to do it on Windows without an SSH connection.  In the Kernel Configuration dialog, first set Basic Options to Launch on: Local Machine.  This is critical as otherwise the FrontEnd will try to make an SSH connection which will fail in Windows.  The other boxes in the basic section can contain anything.   Then click on Advanced Options:  the following code goes in the Arguments to MLOpen: box.
-LinkMode Connect -LinkProtocol TCPIP -LinkName "8000@192.168.0.2,8001@192.168.0.2"
The machine ip address and ports will be specific to the installation, but I will show how to set them up.  All the other boxes in this section are left blank.  You can close the dialog.  Before trying to log on to a kernel, first it must be launched. 

Go to the remote machine, in some versions of Windows this can be done with RemoteDeskTop.  Launch math.exe and type or paste the following code into it; it can also be loaded with a script:
$ParentLink=LinkCreate["8000,8001", LinkProtocol -> "TCPIP"]
If you don't know what machine address it is going to put out then first assign the link to a dummy variable and see the result.  Once you set $ParentLink to the port link, you will lose control of the window and the kernel.  Do not close the window as this keeps the remote kernel running.  Now go back to the local machine and from the Evaluation menu start the kernel you set up.  You should get a message in the Message window with the LinkObject and you should be connected.  If you checked the box to append the kernel name to the in and out, you will be able to see which kernel you are using.  Once you close the kernel or quit Mathematica the remote kernel will go down and have to be restarted. 

The remote kernel can also be launched with the following code in a .bat file
"c:\program files\wolfram research\mathematica\9.0\math" -mathlink -linkcreate -linkprotocol TCPIP -linkname "8000,8001"
where the first address is the location of the file math.exe on the remote computer.  The example shows this on a LAN behind a firewall, it would not be secure over the internet.

There is more information here on connecting via SSH, but I haven't yet made it work:
http://reference.wolfram.com/legacy/applications/parallel/Configuration/Windows.html
Posted 5 months ago

Thanks Robert, your instructions still work in 2021 on Windows 10 and Mathematica 12.3.1

Attachment

Attachments:
POSTED BY: Y Y
Answer

I am interested in this, has anyone found a solution for this?

Posted 5 months ago

Robert's solution works. You can create a bat file with the following content instead of running the script mannually on the remote (host) machine:

ipconfig | find "IPv4" 
"C:\Program Files\Wolfram Research\Mathematica\12.3\math.exe" -mathlink -linkcreate -linkprotocol TCPIP -linkname "8000,8001"

it will also show you the IP address you need to enter in the local (client) machine kernel configuration ;)

POSTED BY: Y Y
Answer
Posted 5 months ago
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract