MathGroup Archive 1995

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

Search the Archive

Re: Remote kernel connection via MathLink

  • To: mathgroup at
  • Subject: [mg1503] Re: [mg1483] Remote kernel connection via MathLink
  • From: John Fultz <jfultz>
  • Date: Tue, 20 Jun 1995 01:47:43 -0400

> 	I need call Mathematica from an external C program. I run the C program
> in a Sun SPARC station called "venus" and the Mathematica kernel is in a other 
> Sun SPARC station called "fobos". I use MathLink and the connection parameters
> are:
> 		-linkname "math -mathlink"
> 		-linkmode "launch"
> 		-linkhost "fobos"
> 	When I run my program in "fobos" there isn't any problem, but if I run
> it from "venus" machine I obtain this error message:
> "Error detected by MathLink: the other side closed th link, you may still get
> undelivered data."
> I use Mathematica version 2.2
> Thanks for any help.
> Regards
> 	Idoia
> *************************************************
> 						*
> Idoia Aguirre Esparz				*
> Dpto. Automatica, Electrsnica e Ing. Sistemas	*
> Universidad Pzblica de Navarra			*
> e-mail:  iaguirre at			*
> www:			*
> 						*
> *************************************************

The string you pass to -linkname when you specify "launch" mode has
to actually launch the kernel when that string is run from the local
machine.  The only way to do this when you're on separate machines is
(I'm using the sample front end MathLink program, addinteger, as an
example here):

venus> addinteger -linkname "rsh fobos math -mathlink" -linkmode launch

Of course, this would require that fobos allow rsh to be run from
venus.  If this is not the case, then you must make the link by hand.
To do it by hand, on fobos, run:

fobos> math -mathlink -linkmode listen

Listening on: 12345@fobos

(the 12345 could be any number)

Now, on venus, run:

venus> addinteger -linkmode connect -linkname "12345@fobos"

(the 12345 should be the same number returned by fobos in the earlier step)

John Fultz
Wolfram Research, Inc.

  • Prev by Date: Re: Complex variables
  • Next by Date: Download from Mathsource
  • Previous by thread: Re: 1/f noise
  • Next by thread: Download from Mathsource