At my graduate school, all of the clusters still use version-6, and I only have version-7 and version-8 installed on my computer. I would like to use those machines remotely. Are either of the versions I have compatible with the version-6 kernel?
-
$\begingroup$ What happens if you try to set up one of those machines in the kernel configuration options? $\endgroup$– aclCommented Jan 20, 2012 at 18:27
-
$\begingroup$ @acl good question. I'm having I think other issues with communication, but the kernel is launched remotely, and then the nothing happens on my local machine. It keeps waiting. I think its because its attempting to use ports I don't have open on my local machine, but I have not tested that, yet. However, I thought a general compatibility question was viable. $\endgroup$– rcollyerCommented Jan 20, 2012 at 18:29
-
$\begingroup$ Manually connect to the remote kernels. $\endgroup$– SearkeCommented Jan 20, 2012 at 18:46
-
1$\begingroup$ You may be able to ask them to upgrade the software, since they may already have the site license. I have the same situation here in my school, and I successfully asked them updated the Mathematica to the newest version. $\endgroup$– xslittlegrassCommented Jan 17, 2013 at 16:19
2 Answers
The best thing to do is to test whether you can make the connection manually:
Start Mathematica on your local machine. On the toolbar, navigate to Evaluation ► Kernel Configuration Options. Add a new kernel and configure it. In the dialog, click on Add ... and a Kernel Configuration dialog appears. Enter an appropriate name for your remote kernel. Under Basic Options, verify that Launch On is set to Local machine. Additionally, clear the field, Kernel program. Click on the Advanced Options switch. In the text field called Arguments to MLOpen, enter:
-LinkMode Listen -LinkProtocol TCPIP
Click OK and open up a new Mathematica notebook. On the toolbar, navigate to Evaluation ► Notebook's Kernel and click on the name of the kernel that you just created. Evaluate the command:
$Version
inside the notebook. Instead of printing Mathematica's version number, a message box appears:
MathLink Alert
Link created on:
After this message is a string of characters. This string of characters is a linkname
. Record the linkname
so that you can use it later, and click OK to close the dialog.
The title bar of the notebook should still say Running... at the top.
While, the local machine is still running that notebook, connect to the remote machine and launch the Mathematica kernel. Inside the kernel, run the command:
$ParentLink = LinkConnect["linkname", LinkProtocol->"TCPIP"]
Where "linkname" is the linkname
you recorded earlier in quotation marks. For example, if the linkname
you saw was:
[email protected],[email protected]
You would run:
$ParentLink = LinkConnect[
"[email protected],[email protected]",
LinkProtocol->"TCPIP"]
The notebook that is open on the local machine prints out the version of Mathematica you remotely connected to. This indicates that the local machine is successfully using the remote kernel.
-
$\begingroup$ Do I leave the launch command alone? $\endgroup$– rcollyerCommented Jan 20, 2012 at 18:54
-
$\begingroup$ You leave the local notebook which says "Running..." at the top alone and then perform the rest of the manual connection from the remote machine. At the very end, you will see the version number of the remote machine appear in the local front-end. $\endgroup$– SearkeCommented Jan 20, 2012 at 18:57
-
$\begingroup$ That's not what I mean, in the "Kernel Configuration Options" do I leave the "Launch Command" under "Advanced Options" alone? $\endgroup$– rcollyerCommented Jan 20, 2012 at 18:59
-
$\begingroup$ Overall, interesting approach. I'll make the attempt tonight, and let you know. $\endgroup$– rcollyerCommented Jan 20, 2012 at 19:12
-
$\begingroup$ My apologies, I haven't tried this, yet. Probably this weekend. $\endgroup$– rcollyerCommented Jan 24, 2012 at 15:48
Yes, older kernels are compatible with newer front ends. I think this is why the Version5`Graphics`
, Version6`Graphics`
and Version7`Graphics`
packages exist. (Simply to ensure compatibility of graphics. From a short look at .tr files once I got the impression these get loaded when older kernels are used.)
Regarding managing to create a connection, the Remote Kernel Strategies package is the most robust and most hassle-free approach I know.
Unfortunately when I use a remote kernel, my front end tends to freeze occasionally, but others didn't manage to reproduce this, so you may be safe. Just try the dynamic example from that link to test this.
-
$\begingroup$ +1, thanks for the reference. I'll give a try alongside Searke's recommendation tonight. $\endgroup$– rcollyerCommented Jan 20, 2012 at 20:08