# Tag Info

13

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

13

Mathematica by default uses its own ssh implementation. You can see it in the dialog of the remote kernel configuration dialog in the advanced options: java -jar mathssh. As far as I know, you can safely replace that with the local ssh command (most likely /usr/bin/ssh). You have to select the "Advanced Options" radiobutton to do that (if you first add ...

9

Yes, older kernels are compatible with newer front ends. I think this is why the Version5Graphics, Version6Graphics and Version7Graphics 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 ...

9

Instead of driving a remote kernel directly via MathLink, you should consider implementing this task with webMathematica: webMathematica 3 added support for queueing long running computations, which can also use compute kernels. you can connect to webMathematica's web frontend with a web browser to inspect the state of the running computation at any time. ...

8

What you did with setting the "com.wolfram.jlink.libdir" property will work. Perhaps you didn't enter the correct path, or you used the wrong JLinkNativeLibrary.dll file (meaning you used the 32-bit one from JLink/SystemFiles/Libraries/Windows, instead of the 64-bit one from JLink/SystemFiles/Libraries/Windows-x86-64, or vice-versa). But you really ...

8

If you want to use port forwarding, you'll need to know that for every MathLink connection, two different ports are used. The full syntax for TCPIP link names looks like this: LinkCreate["8000@1.2.3.4,8001@1.2.3.4", LinkProtocol -> "TCPIP"] 8000 and 8001 are the port numbers while 1.2.3.4 is your IP address. You can pass only a single port number to ...

7

Here's one approach, though it's hard to say without knowing the site and what additional information you want for the files. Import["http://kaurov.com", {"HTML", "Images"}] There are several other items you can ask for (including what elements you can ask for!) In[53]:= Import["http://kaurov.com", {"HTML", "Elements"}] Out[53]= {"Data", "FullData", ...

6

6

5

So here is the final solution i figured out after a while: Open up the kernel configuration menu, Select Advanced Options and use the following for "Arguments to MLOpen": -LinkMode Listen -LinkProtocol TCPIP -LinkName 31415@10.8.0.14,31416@10.8.0.14 -LinkOptions MLDontInteract Replace 10.8.0.14 with the IP address of your client Then as Launch Command ...

5

After some fiddling I found a solution to directly access my local files from the remote kernel via SSH. If localuser is the user name on the machine that runs the front end on which are also the data you want to import from the remote kernel and 111.111.111.11 is the IP address of the same machine, you just need to type: Import["!ssh ...

5

Why MathLink or webMathematica? (both quite time-consuming once you do something nontrivial) Keep it simple: On Windows: Use Remote Desktop to connect to your server (where you started the FrontEnd, starting the parallel calculation). On Linux: Use TightVNC or NX or some such.

5

5

From rather superficial looking at the docs, I think what you ask for should be possible and even relatively easy to implement, but I'd choose J/Link and Java over Mathlink, for the following reasons: Java runtime is very stable. If you let it manage your remote kernels on the remote machine, you get a chance to have a better error / exception / crash ...

4

I've discovered (at least some of) the answer to this question. One needs to install the Wolfram lightweight grid manager on local AND remote computers. This seems a bit confusing as the title of the program that one sees during the installation, refers to this application as "Wolfram gridMathematica Server with Wolfram Lightweight Grid Manager". A bit ...

3

From your update, your situation is very similar to mine, where I can connect to hostA through the internet, but to hostB only via hostA. Here is the pared down settings from my ~/.ssh/config that you can adapt to your machines: Host hostA HostName hostA.school.edu User rm ForwardX11 yes ForwardX11Trusted yes ControlMaster auto ...

3

you can try to add the dll to your path list. Window->Preferences->Java->Installed JREs. Then choose your current JRE(JDK) or the one you are using and click Edit. Fill Default VM Arguments: -Djava.library.path="the pathhhh of dll" or Under Linux set LD_LIBRARY_PATH. Under Windows set PATH.

3

Unfortunately, I have only a Linux and a Mac combination here to try but maybe I can give some hints. First, you should setup your systems in your local network so you can use ssh without password. Then you should carefully study Preferences->Parallel->Remove Kernels->Custom launch command. This things is likely to need some adjustment. On my Linux machine ...

3

I'll just show some screen shots of what it looks like when you run the Mathematica Kernel from within emacs in the Terminal on Mac OS X. This is the purely cursor-driven text terminal, no mouse support: Start emacs type EscxshellReturn type math start entering Mathematica commands, entering them with Shift-Return Do some calculations and backtrack with ...

2

Yes, you can. It is slightly involved, but I think there is no other way than installing a VNC server (e.g. tigervnc) on the Linux server. I put all code and instructions also here for easy copying. The basic idea is to use JLink`UseFrontEnd[ ] from the Kernel. So the FrontEnd is just a service to the Kernel. However, there still needs to be an X-server ...

2

You can either automatically save a *.m file created from your notebook automatically (Options Inspector -> Selected Notebook -> AutoGeneratePackage, make sure all cells are initialization cells) and run this. I suggest running it from inside a screen session which keeps the connection alive even after you disconnect. I can also recommend tmux for this if ...

1

On Unix you can install rlwrap (~/)> rlwrap math Mathematica 8.0 for Mac OS X x86 (64-bit) Copyright 1988-2011 Wolfram Research, Inc. In[1]:= 1+1 Out[1]= 2 it saves the commands, and you can use up-arrows to access previously typed commands.

1

This is not the desired solution, but it is what I ended up doing: I finally gave up on trying to access a remote math kernel under Windows 7 and used a Ubuntu 12.04 image in VMWare which worked as expected. Since the guy in the last link, who had the same problem 2 years ago, also couldn't make it work and eventually gave up I assume it's some kind of ...

1

In an effort to reduce unanswered questions: I would create a folder on your computer (example C:\tmp) and give everyone read/write permissions Then you can access the folder from the remote kernel by doing d=RandomReal[{-1, 1}, {3, 2000}]; Export[Export["\\\\YOUR-COMPUTER-NAME_OR-IP\\tmp\\d.dat", d] There are also other options: Set up a sftp ...

1

It is sufficient if you just do ssh - I was able to use the following commands without X11 forwarding. After you ssh to the machine with Mathematica and invoke MathKernel you can do in the interactive session: UFE = UsingFrontEnd (* Out[4]= UsingFrontEnd *) plot = UFE @ Plot[x^2,{x,-2,2}] (* Out[5]= -Graphics- *) UFE @ ...

1

Sometimes, yes it is sometimes distributed. I can't say for sure when and why, but I have noticed cases where ParallelMap does not distribute all the memory, but ParallelTable does. Basically, Mathematica is trying to make things easy. You don't always want to have to spell out each and every variable that you want available on a remote kernel, and so it ...

1

I'm optimistic that it's theoretically possible, but it looks like it'll require custom code. It seems to me that a good starting point is using LinkCreate and LinkConnect. I'm not quite enough of an expert on the notebook interface to think of a way to trick it into remoting all of its input to the kernel on the other side of such a link, but it's not hard ...

Only top voted, non community-wiki answers of a minimum length are eligible