MathGroup Archive 1997

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

Search the Archive

Re: Problem trying to link to a remote kernel. *sigh*

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9883] Re: Problem trying to link to a remote kernel. *sigh*
  • From: "Hunter Ware" <haw4t at virginia.edu>
  • Date: Sun, 30 Nov 1997 00:39:32 -0500
  • Organization: ESInet - Charlottesville, VA
  • References: <65nj7c$52g$10@dragonfly.wolfram.com> <65o9im$gk7@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Here is the full form of the answer, posted at the request of the
author. thanks again...

----snip----
The fact that you're using an assigned (dynamic) IP address makes life a
little more difficult, but not impossible.

When you perform a remote kernel connection, two things happen. 1) The
front end opens a listening link on a free IP socket on your machine.
2) The front end launches a Mathematica-installed program called winrsh
   that executes a command on the remote host to start up the kernel.

    In step (2), a number of command line switches are being passed
along with "math" that tell the kernel to connect to a front end using
a the grabbed socket on your machine.  The shell command looks
something like "math -mathlink ... -linkname socket# at yourmachinename". 
socket# is a 16-bit integer, and yourmachinename is the machine name
listed in your Windows 95 network control panel.  I bet ya that the dns
name of your assigned IP address does not resolve back to your the name
in the control panel.  This is where things get gummed up.

    The way to fix this problem (aside from getting a fixed IP address
:)) is to do the following before launching the kernel. 1) Start up an
MS-DOS Prompt window and enter the command arp -a.  The first
    IP address that you see listed [xxx.xxx.xxx.xxx] should be the
address
    assigned to you at login.
2) Open up the kernel configuration dialog box for your remote kernel
and
    click on the Advanced Options radio button.  You should see a blank
that
    reads Arguments to MLOpen, and it should read something like
        -LinkMode Listen -LinkProtocol TCP -LinkOptions MLDontInteract
    Change this to read:
        -LinkMode Listen -LinkProtocol TCP -LinkName "XXXXX"
-LinkOptions
        MLDontInteract
    where "XXXXX" is a 16-bit integer surrounded by quotes.  Pick a
number
    that's fairly large since the low number sockets are grabbed by
system
    services.  I use "4935" as mine. 3) Futher on down, you'll see the
remote command to launch the kernel.  It
    should look like:
        winrsh -m -q -h `host` -l `username` '`executable` -mathlink
-LinkMode
        Connect -LinkName "`linkname`"'

    Change this to read:
        winrshi -e -m -q -h hostname -l username shellcommand -mathlink
-
        LinkMode Connect -LinkName "XXXXX at XXX.XXX.XXX.XXX"

    Where XXXXX is the socket number in (2), and XXX.XXX.XXX.XXX is the
IP
    address that you looked up in (1).  The values of hostname,
username, and
    shellcommand should be replaced with the values of the remote Unix
host,
    your login name on the Unix host, and the shell command used to
start the
    kernel on that machine respectively.

    Here is an example.  Let's say I want a remote kernel connection to
use socket 4935 on my machine, and my machine's IP address is
140.177.65.2.  The link name in (2) would be "4935", and the link name
in (3) would be "4935 at 140.177.65.2".  I want to run the kernel on a
host named "mosquito", and the shell command to start the kernel is
"math".  My username on the remote host is "paulh".  My configuration
entries would look like:
    MLOpen arguments: -LinkMode Listen -LinkProtocol TCP -LinkName
"4935" -
    LinkOptions MLDontInteract

Command to Launch Kernel:
    winrsh -e -m -q -h mosquito -l paulh math -mathlink -LinkMode
Connect -
    LinkProtocol TCP -LinkName "4935 at 140.177.65.2"

    Whenever you need to do a remote kernel connection on a different
dialup session, just change the IP address in the command to launch
kernel line to refect the value returned by arp -a.  Hope this helps. 
I'll pass a note to the support folks to put this info up as an FAQ. --
P.J. Hinton
Mathematica Programming Group           paulh at wolfram.com Wolfram
Research, Inc.                  http://www.wolfram.com/~paulh/
----snip----

\||//          Hunter Ware <ware at bainet.com>
  oO       Research Associate - Barron Associates Inc. ()^()     1160
Pepsi Place, Charlottesville, Va, 22901
  U       Phone (804) 973-1215      FAX (804) 973-4686




  • Prev by Date: Re: How do I create a cell or "Dialog Box" that simply states a control loop status?
  • Next by Date: Bessel Function Bug
  • Previous by thread: Re: Problem trying to link to a remote kernel. *sigh*
  • Next by thread: Computer Modern labels for plot ticks