Hot answers tagged

17

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


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


12

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


12

As indicated in the documentation, one can access the Mathematica kernel from the command prompt using the command math in Unix/Linux and MathKernel from Mac OS X/ Windows. If the MathKernel command is not in your PATH variable, you can try one of several things: Enter the full pathname as part of the command Add MathKernel as a PATH variable using the ...


11

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


11

You can download the Remote Development Kit here (scroll down a bit). It's a CDF file that shows this when opened: Click "INSTALL" to finish the installation. Now go to Palettes -> Remote Development Control Panel. Click Configure Pi Connection and enter the IP address of your Pi, as well as the default username. Click New Pi Notebook, enter an ...


10

Dale Roberts's solution works fine, but only when the remote machine can be seen directly from the Internet. After connection you can type Links[] and see {LinkObject["31415@127.0.0.1,31416@127.0.0.1", 3, 1], LinkObject["36946@109.1.2.3,51520@109.1.2.3", 56, 2], LinkObject["59488@109.1.2.3,54373@109.1.2.3", 57, 3]} It means that the main ...


10

Here's a solution that works quite well with me and a colleague of mine in my research group. I assume you have Mathematica installed on both your local and remote machine. The command MathKernel has to be available on the shell of the remote machine. Short answer: 1- Install GOW if you're using Windows 2- Open command prompt, and connect to the target ...


9

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


8

I've been successful connecting to my office Mac workstation using SSH port forwarding: ssh -R 31415:127.0.0.1:31415 -R 31416:127.0.0.1:31416 username@XXX.XXX.XXX.XXX "/Applications/Mathematica.app/Contents/MacOS/MathKernel -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName 31415@127.0.0.1,31416@127.0.0.1 -LinkHost 127.0.0.1" where ...


8

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


7

From the docs: LinkCreate["8000", LinkProtocol -> "TCPIP"] Further down that page is shown: This connects to the port on frog.wolfram.com. link = LinkConnect["2981@frog.wolfram.com,2982@frog.wolfram.com", LinkProtocol -> "TCPIP"]


7

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.


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


7

Here is a stab at a basic mathlink solution. In the kernel that contains status information define this post function: post[e_] := Module[{link}, Quiet[ link = LinkConnect["status"]; If[LinkReadyQ[link], LinkRead[link]; LinkWrite[link, e]]; LinkClose[link] ]] If there is nothing to connect (there is no open "status" link on the system) then this ...


7

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


6

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


6

This is what I did (using mathematica 9.0.1; remote RHEL linux server for running kernels; local workstation windows 7 64bit): On the remote kernels-tab I added the hostname of the server. Then I checked the 'Use custom launch command' and added the following: plink -ssh -batch -l `3` `1` "math -mathlink -linkmode Connect `4` -linkname '`2`' -subkernel ...


5

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.


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


5

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


5

The formatting you're seeing on the command-line is caused as a result of settings the FE makes to the "stdout" stream. Internally, the FE calls this function: FE`SetResultForm[FE`form_] := SetOptions["stdout", FormatType -> FE`form]; with the argument for form being whatever the default output format should be. This setting doesn't get reset ...


5

Your PBS specifications do not get sent to Mathematica. PBS doesn't control Mathematica. Your job is being run on a machine with 16 cores and Mathematica sees this, hence the result of $ProcessorCount. To limit Mathematica to a single core, add the following lines to your script SetSystemOptions["MKLThreads" -> 1] SetSystemOptions["ParallelOptions" ...


5

Because there seems to be no quality resource or documentation on this subject, I will attempt to provide as close of a hand-holding solution as possible. I think this is feasible in the present case since we are restricting ourselves to one version of Mathematica on one platform (the RPi). My setup I have two RPis on my internal network. The local RPi ...


4

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


4

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


4

It is possible to connect to the RPi through a PC running v9 using the remote kernel options From "Kernel Configuration Options..." Add a new kernel Choose the Advanced options and ensure that Arguments to MLOpen has the following -LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract and the Shell command to launch kernel is "`java`" ...


4

This comes a little late, but this is my solution: Remote Machine running linux with tmux (similar to screen but newer, should work with screen but I dont know the commands) and Mathematica 10 installed. Local Machine running MacOS Yosemite with Mathematica 10. Launch tmux in remote machine and execute Mathematica: tmux wolfram (executable to ...


4

sorry for answering so late but i just saw the question. Actually it is quite simple. Just go to evaluation>kernel configuration options add a new kernel and fill like this: replacing path/to/your/perm/key, yourec2user and your.ec2.address with your information. notice that we are using macs native ssh instead of mathematica's java ssh. the -i option ...


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



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