Ubuntu cluster setup for MPI parallel programming in Python

Instructions on how to set up an Ubuntu cluster can be found at https://help.ubuntu.com/community/MpichCluster .

I’ve updated a few outdated commands there myself so it shouldn’t be too hard to follow the instructions. The only thing I personally did differently was that I didn’t create a new user, but instead used my old account on all the machines (the important thing is that the username be the same everywhere).

In this post I’ll explain how to make a Python script to utilize this cluster using the MPI standard for parallel programming.

To prepare your Python interpreter for parallel programming, you first need some sort of an MPI interface. Several exist so it’s up to you to choose. I used mpi4py. This is part of the scipy module and it can be installed through Synaptic or with:

sudo apt-get install python-dev # other potential packages to consider - python-mpi mpichpython python-scipy python-numpy

Continue reading Ubuntu cluster setup for MPI parallel programming in Python

LaTex quick start tutorial on Ubuntu

To get started with LaTex quickly I googled a bit and quickly found a cross-platform editor I am very happy with – TexMaker.

You can install it by issuing:

sudo apt-get install texmaker

The interface is very intuitive. Among the editor’s features are code completion, spell-checker (although I didn’t succed at configuring it), wizards with document templates… You can find the user manual and a decent LaTex reference under Help. You can see what it looks like in this screenshot:

LaTex editing in TexMaker

Continue reading LaTex quick start tutorial on Ubuntu

WEP cracking

You need the following packages installed:


(from Synaptic or from terminal “sudo apt-get install aricrack-ng”)

Next I will give you the terminal commands – you just have to change the parts so that they reflect your situation (for example mac addresses, interfaces etc.).

The recipe

Start airmon on your wireless interface (“ip -d addr” might help if you’re not sure):

airmon-ng start wlan0

Monitoring traffic (enter number from 0 on instead of – sometimes you’ll have to backtrack here to change the channel):

Continue reading WEP cracking

Num pad doesn’t work in Ubuntu

When I installed Ubuntu 9.10, my num pad stopped working as it used to – it moved the mouse instead of inputing numbers. Pressing num lock didn’t help either.

Anyway I found the solution quickly on Ubuntu forums:

It appears it’s some accessibility feature. I probably pressed some key combo that turned it on.

Syncronizing your usb and hard disk with Unison

Today I decided to automate the tedious process of syncronising my SD card and hard drive (for example to get files to an e-book reader faster and be able to read from it more often (which is way better than straining your eyes reading from a monitor)). The good thing is that you can later use the same technique to sync USBs, external hard drives, even remote machines via ssh or ftp – you just tweak the paths.

First I thought of Linux’ rsync command, but Unison is suggested as a bit more user-friendly and abstract program that achieves the deed. Here’s how you do it.

Continue reading Syncronizing your usb and hard disk with Unison