Ana səhifə

Running a Mathematica Kernel Remotely from Windows, MacOS, Linux Clients Step 1: Download, copy remote kernel software


Yüklə 34 Kb.
tarix26.06.2016
ölçüsü34 Kb.
Sept 2014
Running a Mathematica Kernel Remotely

from Windows, MacOS, Linux Clients

Step 1: Download, copy remote kernel software

Go to http://www.physics.rutgers.edu/~rvaughn/Mathematica_Remote.

Download the following files:


  • tunnel.bat

  • tunnel.sh

Copy both tunnel.bat and tunnel.sh as follows:


On a Windows Vista or Windows 7/8 PC:

Copy into C:\Users\{username}\AppData\Local\Mathematica\FrontEnd


NOTE: On Windows clients, the software “PuTTY” must be installed.

(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html;

download/install “Windows installer for everything except PuTTYtel”)
On a Mac OSX PC:

Copy into ~/Library/Mathematica/FrontEnd

(where “~” represents the user’s home directory; ie, /Users/{username})

Make files executable via “chmod 755 tunnel.bat”, “chmod 755 tunnel.sh”.


On a Linux PC:

Copy into ~/.Mathematica/FrontEnd

(where “~” represents the user’s home directory; ie, /home/{username})

Make files executable via “chmod 755 tunnel.bat”, “chmod 755 tunnel.sh”.



Step 2: Create, configure remote kernel

Start Mathematica.


Go to Evaluation > Kernel Configuration Options….

Click Add


In Kernel Properties Window, enter Kernel Name. Example: “RemoteKernel”.
Under “Basic Options”, for Launch On, select “Remote Machine”.

  • For Machine Name, enter “het-math.physics.rutgers.edu” (without the quotes).

  • For Remote Login, enter your Physics account username.

  • For Kernel Program, enter “math” (without the quotes).

Select “Advanced Options”.

Under “Arguments to MLOpen:”, enter the following (without the quotes):

“-LinkMode Listen –LinkProtocol TCPIP –LinkOptions MLDontInteract –LinkHost 127.0.0.1”

Under “Shell command to launch kernel:”, enter the following (with the quotes):

On a Windows Vista or Windows 7/8 PC:

“C:\Users\{username}\AppData\Local\Mathematica\FrontEnd\tunnel.bat” {RU_User}:XXXXXXXX@128.6.24.206 “/usr/local/bin/math” “`linkname`”


On a Mac OS X PC:

“/Users/{username}/Library/Mathematica/FrontEnd/tunnel.sh” {RU_User}:XXXXXXXX@128.6.24.206 “/usr/local/bin/math” “`linkname`”



On a Linux PC:

“/home/{username}/.Mathematica/FrontEnd/tunnel.sh” {RU_User}:XXXXXXXX@128.6.24.206 “/usr/local/bin/math” “`linkname`”

Notes re “Advanced Options” and “Launch command:” above:
Type “straight ahead”; that is, no carriage returns. (Let the window do the formatting.)

Copy-and-paste likely will only work from a text window, not from a .pdf or .doc.

And, under “Launch command:”


  • {username} is your username on your PC

  • {RU_User} is your Physics account username

  • XXXXXXXX is your Physics account password

  • Those are backquotes (`) immediately surrounding the final argument “linkname”

Finally:



  • “Translate Return into Newline” should be checked

  • “Raw MathLink connection” should be unchecked

At that point you’re done with the remote kernel creation and configuration.

Click OK to close the Kernel Configuration window,

and click OK again to close the remaining window which lists the

local and remote kernels.

Step 3: Run calculation on remote Mathematica kernel

Go to Evaluation > Default Kernel and select RemoteKernel

(or whatever you named the kernel in the above step).

This tells Mathematica you want to use the remote kernel.


Now you’re ready to run a calculation. To test, try something simple (say, 2+2).

The answer to your calculation should appear shortly.


Final Note:

Unless you routinely plan to run Mathematica with a remote kernel (unlikely),



when you’re finished you’ll want to reset the default kernel back to local

(go to Evaluation > Default Kernel and select Local).


Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©atelim.com 2016
rəhbərliyinə müraciət