MathGroup Archive 2012

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

Search the Archive

Why does the Front End freeze when using a TCPIP-mode connection with the kernel?

Note: I already asked this question here, but I'm hoping to reach a
larger audience:

The question:

When I try to connect to a remote kernel, the front end always freezes
sooner or later.  I managed to reproduce the problem on the *local*
machine.  Can you please take a look at what I am doing wrong, and how I
can prevent the problem?

Here's how to reproduce the problem on a single machine (no remote
connection needed):

    1. Create a new kernel configuration (Evaluation menu -> Kernel
Configuration Options...)

     Select Advanced Options.

     Arguments to MLOpen:

     -LinkName "8000@YOUR-IP-HERE" -LinkMode Listen
     -LinkProtocol TCPIP -LinkHost "YOUR-IP-HERE"
     -LinkOptions MLDontInteract

     (Replace YOUR-IP-HERE with your computers IP address. On Windows
you can get this by typing ipconfig in a command window.)

     Shell command to launch kernel: leave empty (we will do it manually)

    2. Open a new notebook, set the notebook's kernel to the one you
just set up, and evaluate something (1+1).

    3. Now we need to launch the kernel manually, before the connection
times out (do it quickly). So start a new kernel (math) in command line
mode, and evaluate the following:

     link==LinkConnect["8000",LinkProtocol->"TCPIP"] (* connect to front
end link *)

     $ParentLink == link (* set the front end link as parent link *)

     Now the connection is established, and everything appears to work
correctly (save for the one message in the front end's pink message window)

    4. Evaluate Manipulate[n, {n, 0, 100, 1}]. This appears to work too.
Now play with the slider. Sooner or later the front end will freeze and
needs to be killed. For me, dragging the slider up and down for ~10
seconds without releasing it always suffices.

Why does the Front End freeze? How can I create a TCPIP-mode connection
between the front end and the kernel in a way that everything will be
working correctly?

Note: I am on Windows XP.  I should also link to this presentation and
package here:
When I use this package, I get the same freeze.

Szabolcs Horv=E1t
Mma QA site proposal:

  • Prev by Date: Re: Mathematica on tablet computer
  • Next by Date: Re: Mathematica on tablet computer
  • Previous by thread: Re: Frameticks and ListLogLinearPlot
  • Next by thread: Re: Why does the Front End freeze when using a TCPIP-mode connection with the kernel?