MathGroup Archive 2004

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

Search the Archive

Re: JLink to remote kernel not possible?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52623] Re: [mg52571] JLink to remote kernel not possible?
  • From: Zeno Crivelli <zenonez at gmail.com>
  • Date: Sat, 4 Dec 2004 04:08:03 -0500 (EST)
  • References: <200412020721.CAA05850@smc.vnet.net> <5.2.1.1.0.20041203074525.04da8d18@pop3.mail.wideopenwest.com> <2e89512804120308306be534d7@mail.gmail.com> <5.2.1.1.0.20041203104049.04d96eb8@pop3.mail.wideopenwest.com>
  • Reply-to: Zeno Crivelli <zenonez at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Ah! Ok! Now it's muuuuuch mooooooore clear!

Thanks Todd!

(just for info, I have Mathematica 5.0, that's why I didn't have those
instructions in my documentation. With that new "Using a Remote
Kernel" part it's all more clear now! It's exactly the "lacking
crucial info" I was mentioning in my last email ;-))


> Zeno,
> 
> Sorry if I made you look like someone who hasn't bothered to RTM. I really
> had no memory of when I added that part, but I see now that it was quite
> recently, so only if you have Mathematica 5.0.1 or later would you see it.
> 
> Here is the relevant section from the manual. Please let me know if you
> have any further problems getting this working.
> 
> --Todd
> 
> Using a Remote Kernel
> 
> To attach a remote Mathematica kernel to a J/Link program, open the link \
> using the listen/connect style. On the remote Unix machine, launch \
> Mathematica and have it listen on a link by executing the following on a \
> command line.
> 
> math -mathlink -linkmode listen -linkname 1234 -linkprotocol tcpip
> 
> Note the use of the TCPIP MathLink protocol above. The TCPIP protocol is an \
> improved version of the TCP protocol that is only supported in Mathematica \
> 5.0 and later. If you are launching Mathematica 4.x, use tcp as the protocol \
> name instead of tcpip (also in the line below).
> 
> Then in your Java program:
> 
> KernelLink ml = MathLinkFactory.createKernelLink("-linkmode connect \
> -linkprotocol tcpip -linkname 1234@remotemachinename");
> 
> The drawback to the listen/connect technique is that you must manually log \
> into the remote machine and launch Mathematica. You can have the Java program \
> automatically launch Mathematica on the remote machine by using an rsh or ssh \
> client program. Unix machines have rsh and ssh built in, and Mathematica \
> ships with the winrsh client program for Windows. Here is an example of using \
> winrsh to launch and connect to Mathematica on a remote Unix machine.
> 
> KernelLink ml = MathLinkFactory.createKernelLink("-linkmode listen \
> -linkprotocol tcpip -linkname 1234");
> Runtime.exec("c:\\program files\\wolfram \
> research\\mathematica\\5.1\\systemfiles\\frontend\\binaries\\windows\\winrsh \
> -m -q -h -l YourUsername -'math -mathlink -linkmode connect -linkprotocol \
> tcpip -linkname 1234@localmachinename'");
> 
>


  • Prev by Date: Re: JLink to remote kernel not possible?
  • Next by Date: Re: Re: Re: How to solve nonlinear equations?
  • Previous by thread: Re: JLink to remote kernel not possible?
  • Next by thread: Re: JLink to remote kernel not possible?