Wolfram Computation Meets Knowledge

How do I manually create a remote Wolfram Language kernel connection?

Manually creating a remote kernel connection is a useful debugging tool. You should try this if you are having trouble connecting to a remote kernel.

  1. Start Mathematica on your local machine. On the toolbar, navigate to Evaluation ► Kernel Configuration Options….
  2. Add a new kernel and configure it. In the dialog, click Add, and a Kernel Configuration dialog appears.
  3. Enter an appropriate name for your remote kernel, such as RemoteMachine1.
  4. Under Basic Options, verify that “Launch on” is set to “Local machine”. Additionally, clear the field “Kernel Program.”
  5. Click the Advanced Options switch. In the text field called “Arguments to MLOpen,” enter:
    -LinkMode Listen -LinkProtocol TCPIP

  6. Click OK and open a new notebook.
  7. On the toolbar, navigate to Evaluation Notebook’s Kernel and click the name of the kernel that you just created.
  8. Inside the notebook, evaluate the command:
    $Version

    Instead of printing Mathematica’s version number, a message box appears:

    MathLink Alert
    Link created on:

    After this message is a name that is called the linkname. Record this linkname so that you can use it later and click OK to close the dialog.

    The title bar of the notebook should still say Running… at the top.

  9. Connect to the remote machine and launch the Wolfram Language kernel there. Inside that kernel, run the command:
    $ParentLink = LinkConnect["linkname", LinkProtocol->"TCPIP"]

    Here, “linkname” is the linkname that you recorded earlier, wrapped in quotation marks. For example, if the linkname is:

     port1@machine.domain.com,port2@machine.domain.com

    Please run:

    $ParentLink = LinkConnect[ "port1@machine.domain.com,port2@machine.domain.com",
     LinkProtocol->"TCPIP" ]
  10. The notebook that is open on the local machine now prints out the version of Mathematica that you remotely connected to. This indicates that the local machine is successfully using the remote kernel.
Is this article helpful?
Yes
No

Any comments?

Thank you for your feedback.

Submit

Contact Support

Whether you have a question about billing, activation or something more technical, we are ready to help you.

1-800-WOLFRAM (+1-217-398-0700 for international callers)

Customer Support

Monday–Friday
8am–5pm US Central Time

  • Product registration or activation
  • Pre-sales information and ordering
  • Help with installation and first launch

Advanced Technical Support (for eligible customers)

Monday–Thursday
8am–7pm US Central Time

Friday
8:30–10am & 11am–5pm US Central Time

  • Priority technical support
  • Product assistance from Wolfram experts
  • Help with Wolfram Language programming
  • Advanced installation support