Running Mathematica (or other computations) in background

Thursday, April 23rd, 2009

From time to time (unfortunately) I want/have to run long Mathematica calculations. Since my office machine is quite strong (or at least faster than my machine), I want to do the computation on that machine. To start a background Mathematica calculation on Linux machines do the following: First log in to your machine using ssh. Then start “screen”. “screen” will enable you to log-off even when the calculation is running. Thus, this works for any kind of computations (I think there is another Linux trick to do this, but I don’t remember). If you’re using Linux everyday, it’s worth to learn how to use “screen”. Your efficiency will increase by a factor of 10^500. :-) Create a plain text file, say, with the name “calculation”. Enter everything you want to have done in this file. For example

A={{a,b},{c,d}}

B=Inverse[A]

DoVeryComplicatedThingWhichTakesAtLeast100HoursWith[A]

Then just run

math -run “<<calculation”

Then “detach” from the screen by entering Ctrl-a and then d, that is, first enter Ctrl-a, release and then enter d. Now you can log-off and watch your favorite movie. To check the progress of the calculation, just log-in again and enter “screen -r”. To log-off, detach, i.e. Ctrl-a and then d. If the calculation is done, you “exit” from “screen”.

Very basic rsync usage

Monday, February 23rd, 2009

To make a backup of my home folder on my machine in the office: First cd to the folder where all files should get copied, in my case this would be /ext/tha. Then

rsync -avz –exclude ‘\.*’ ~/ .

The –exclude option excludes the invisible folders which I don’t need to backup.

Essential utilities for the Mac OS X

Tuesday, October 14th, 2008

A memo for me in case I have to re-install the OS: These are essential applications without which I cannot survive…

  • Quicksilver
  • SlimBatteryMonitor
  • Caffeine
  • Google Notifier
  • Fetch
  • Skim
  • Dropbox
  • Paparazzi!
  • Xee