Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: MathLink portnumbers and internal types


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11012] Re: MathLink portnumbers and internal types
  • From: miyaji@taiiku.tsukuba.ac.jp (Chikara MIYAJI)
  • Date: Mon, 16 Feb 1998 18:15:19 -0500
  • Organization: University of Tsukuba
  • References: <6c8pvc$atc@smc.vnet.net>

Hi Jens,

In article <6c8pvc$atc@smc.vnet.net>, jpk@max.mpae.gwdg.de 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
>information)

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
too.

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------
:Begin:
:Function:       testopen
:Pattern:        testOpen[]
:Arguments:      {  }
:ArgumentTypes:  {  }
:ReturnType:     Manual
:End:

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

------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()
{
   MLClose(tlink);
   return(0);
}

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

bye.

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