MathGroup Archive 1998

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

Search the Archive

Re: MathLink portnumbers and internal types

  • To:
  • Subject: [mg11012] Re: MathLink portnumbers and internal types
  • From: (Chikara MIYAJI)
  • Date: Mon, 16 Feb 1998 18:15:19 -0500
  • Organization: University of Tsukuba
  • References: <6c8pvc$>

Hi Jens,

In article <6c8pvc$>, wrote:

>I had verrry bad experiences with the MLName() function. I have a
> - I tryed it on two Ultra SPARC computers. You can not call
>   MLName() before the connection is established from both sides!
>   If dirkml (as P1) calls dirkml (as P2) MLName() yields somthing
>   like "/export/home/DIRK/dirkml" (no port number or any usefull

Thank you for info about MLName(). If that function doesn't work well,
my program, which use MLName() will be in trouble. Also, I guess that
Front end uses MLName() to connect with kernel, it will be in trouble

I wrote small MathLink template which open a link and return its link
name, link is created but no connection established.

I check this on Mac and Sparc5(Solaris 2), and it returns link name.
Doesn't this work on your machine?

-----this is template------
:Function:       testopen
:Pattern:        testOpen[]
:Arguments:      {  }
:ArgumentTypes:  {  }
:ReturnType:     Manual

:Function:       testclose
:Pattern:        testClose[]
:Arguments:      {  }
:ArgumentTypes:  {  }
:ReturnType:     Integer

------this is C program-------
MLINK tlink;
void testopen()
   long err;
   tlink = MLOpenString(stdenv, "-linkmode listen -linkprotocol 
      TCP -linkoptions MLDontInteract", &err);
   MLPutString(stdlink, MLName(tlink)); }

int testclose()

-------this is the result on my machine-------- In[1]:=
z=Install["naddtwo",LinkMode->Launch] Out[1]= LinkObject[./naddtwo, 1,

In[2]:= testOpen[]
Out[2]= 34508@master

In[11]:= testClose[]
Out[11]= 0

On my site, I can't find  John Fultz's repley.


  • Prev by Date: Re: MathLink portnumbers and internal types
  • Prev by thread: Re: MathLink portnumbers and internal types
  • Next by thread: Wish list for next version