How do I connect a remote Windows kernel to a Windows Frontend?
 In the Windows 2000 Resource Kit there is a Microsoft utility called rcmd, which will allow you to access the command line on a remote machine without using a graphical interface. It also uses NT authentication which will enable you to access the remote machine without a password. This will allow you to use a remote kernel on a Windows machine from a Windows server. In order to install rcmd, you will need to have the following: | | NT authentication needs to be set up between all the machines that will be used. |
| | You will need to have Administrative access to all the machines you are running Mathematica on, as rcmd will not work without administrator privileges. |
Rcmd Installation The rcmd utility uses the following two files: is the actual utility. is the service that allows you to connect to the client machine command line. In order to set up your remote machines, please install the file, which is the service, via the following instructions. | 1. | Go to My Computer, and go to Local Disk (). |
| 2. | Create a folder called , and place the file in that folder. |
| 3. | Please open a command line window by going to the . In the dialog that comes up, type cmd and hit OK, this will bring up a DOS prompt. Type the following: |
| | This will take you to the directory that was created. Please type the following, Which will install the rcmd service on the machine: |
| 4. | Now you will need to start the Remote Command Service from the computer management console. Do this by going to the . You should now see a window like the following. |
| |  | ImageCaption |
|
| | Find the remote command service, right click and hit start. The client machine should now be ready to accept incomming connections. |
Once you have done this, you will need to install the rcmd service on the server machine. The following instructions will explain how to do this. | 5. | Go to My Computer, and go to Local Disk (). |
| 6. | Create a folder called , and place the file in that folder. |
| 7. | Please open a command line window by going to the . In the dialog that comes up, type cmd and hit OK, this will bring up a DOS prompt. Type the following: |
| 8. | This will take you to the directory that was created. Please type the following, substituting the client machinename: |
| | Rcmd \\testmachine.domain |
If your account is authorized you will immediately be taken to the remote machine's command line. If this doesn't work or access is denied, please contact your network administrator for help setting up your NT account authorization. Setting Up Mathematica Once you have command line access to your remote machine, you will need to set up the remote kernels. On the client machine, you will need to add your Mathematica install directory to the system path. | 1. | Right click on my computer and go to Properties. |
| 2. | Click the Advanced Tab. |
| 3. | Click the Environment Variables button. |
| 4. | In system variables find the variable called Path, and click the Edit button. |
| 5. | In the variable value field, go to the end and add a semicolin (;). |
| 6. | Now add your install path. It should look like |
| | C:\Program Files\Wolfram Research\Mathematica\5.1 |
| |  | ImageCaption |
|
You're now done configuring the remote machine. Now time to work on the machine that will access the remote kernel. There is a 200 character limit for launching the kernel via the shell command. In order to work around this, you will need to create a batch file, on the server machine, as follows: | 7. | Create a new text document in the following directory: |
| 8. | Open the text document and type the following |
| | @echo off
c:\rcmd\rcmd \\clientmachine.domain math -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName %1 -LinkHost %2 |
| | Please note that you will have to change clientmachine.domain to your remote machine's name. |
| 9. | Save the file under the following name. |
| 10. | We will test the file by double clicking on it, this should open the kernel on the remote machine. An error will occur, which is expected, please be sure that the remote kernel is launched. You should see a screen similar to one of these. |
| |  | ImageCaption |
|
| |  | ImageCaption |
|
| 11. | Open Mathematica, and go to the menu and click . This will bring up the following dialog box. |
| |  | ImageCaption |
|
| 12. | Click the Add button. First change the radio button for Basic Options Launch On: to Remote Machine. |
| |  | ImageCaption |
|
| | Now click the Radio Button for Advanced Options. Leave the “Arguments to MLOpen” as default. It should look like the screen shot above. Copy the following into “Shell command to launch Kernel”. |
| | cmd.exe /k "c:\rcmd\rmath.bat \"`linkname`\" `ipaddress`" |
| | The /k will cause to launch a new process. This way Mathematica will start a new command process and is able to launch the .bat file. Click OK. |
| 13. | Now click and select the Kernel which was just created. Open a notebook and evaluate $MachineName. It should return the name of your remote machine. |
For gridMathematica and Parallel Computing Toolkit Users If you want to use rcmd with gridMathematica or Parallel Computing Toolkit, you will not need to write a batch file. Please follow the above instructions to install and the files. Once you have tested rcmd and you can connect to the remote machine, open Mathematica and execute the following. A slave should now be running. Download this FAQ as a Mathematica 6.0 Notebook
Questions or comments? Send email to support@wolfram.com.
| |