Friday, September 25, 2009

Installing MPI4py on CentOS

MPI for Python (mpi4py) provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.



Step 1: Install Python and dependencies
# yum install python python-devel python-lib

Step 2: Build OpenMPI with Intel Compiler
See Blog Entry Building OpenMPI with Intel Compiler (Ver 2)

Step 3:
Get and install MPI4py
# wget http://mpi4py.googlecode.com/files/mpi4py-X.X.X.tar.gz

Step 4:
Build the MPI4py

# cd /usr/local
# tar -zxf mpi4py-X.X.X.tar.gz
# cd mpi4py-X.X.X

Step 5: Setup of MPI
# python setup.py build

# python setup.py install

Step 6: Testing
Issuing at the command line:
$ mpiexec -n 5 python demo/helloworld.py
(will launch a five-process run of the Python interpreter and run the test scripts)


Important Notes
For more information on the installation of MPI4py, see the official MPI4py User Guide

Thursday, September 24, 2009

Scientific Software for Python - Numpy, scipy, pyMPI

NumPy is the fundamental package needed for scientific computing with Python. It contains among other things:

SciPy  is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization.

pyMPI is a project integrating the Message Passing Interface (MPI) into the Python interpreter.

Tuesday, September 22, 2009

Installing xrdp on Fedora 11

What is xrdp? According to the xrdp project website, xrdp is an open source remote desktop protocol(rdp) server. Xrdp uses Xvnc or X11rdp to manage the X session and will display X window desktop to the user via Remote Desktop Protocol.

To install manually, you may want to look at my blog entry Supporting Windows Terminal Clients from LINUX with xrdp

However if you are using Fedora 11, it is a breeze,

Step 1: Install xrdp
# yum install xrdp


 
Step 2: Create soft link to startup xrdp automatically in case of reboot
# ln -s ../init.d/xrdp s99xrdp
# service xrdp restart


Step 3: Configure the firewall via System > Administration > Firewall
Allow port 3389 (TCP) in as shown below 



Step 4: Use Remote Desktop Protocol to connect to the Linux Box





Monday, September 21, 2009

Installing Nvidia Drivers on Linux Mint

Nvidia Drivers requires you to exist the X-Windows environment completely before you can install the drivers properly. Instead of booting into console mode, you can do the following:

Step 1: Down the Nvidia drivers from http://www.nvidia.com/Download/index.aspx?lang=en-us

Step 2: CTRL+ALT+F1 to take you into a non-X terminal

Step 3: Stop /etc/init.d/gdm (GNOME)
# /etc/init.d/gdm stop

Step 4: Install Nvidia Drivers
# ./NVIDIA-Linux-x86-185.18.36-pkg1.run
(Install Nvidia drivers that match your graphics card and follow the installation wizard)

Step 5: Start /etc/init.d/gdm
# /etc/init.d/gdm start

Sunday, September 20, 2009

Speeding up boot time by Optimising Physical Memory and Swap

If you have a lot of physical memory, you may want to reduce your swappiness to increase performance. The performance is boosted as the kernel can cache data in memory for faster access and reduce the amount of data being swapped in and out of the swap space.

Alternatively, if you have very little memory (For example: 256MB or below), you may want to increase swappiness to boost performance.

To change the swappiness, You have to edit the /etc/sysctl.conf. /etc/sysctl.conf is a file tocontain sysctl which configure kernel parameters at runtime.

# vim /etc/sysctl.conf

At the bottom of the file /etc/sysctl.conf, add the following parameters
---------------------------------
vm.swappiness=5
---------------------------

Reboot and you will notice the difference. You may want to use conky to monitor the memory/swap usages