Monday, February 25, 2013

Tips: Source installation on your home directory

Hi, this is my first post. I'd like to share some tips on this blog.

The first tip is source installation of software. Sometimes I want to try some new version of software for fun or for study, and install it on my home directory. The source installation is basically 5 steps.

1. Download
 wget http://www.url.com/path/to/software.tar.gz
 or
 wget http://www.url.com/path/to/software.tar.bz2
2. Uncompress
 tar zxvf software.tar.gz
 or
 tar jxvf software.tar.bz2
3. Setup
 ./configure --prefix=/path/to/install
4. Build
 make
5. Install
 make install

So here's an example, installing pre-released OpenMPI version 1.7rc6 on my home for using bravo.

First, login to india and submit an interactive job on bravo queue.
 ssh myaccount@india.futuregrid.org
 qsub -I -l nodes=1:ppn=8 -q bravo
"-I" = interactive mode
"-l nodes=1:ppn=8" = reserve 1 node and 8 processors per node
"-q bravo" = submit a job on bravo cluster

Download OpenMPI 1.7rc6 from the website(http://www.open-mpi.org/software/ompi/v1.7/)
 wget http://www.open-mpi.org/software/ompi/v1.7/downloads/openmpi-1.7rc6.tar.bz2

Uncompress
 tar jxvf openmpi-1.7rc6.tar.bz2

Create a directory for software, and setup the installation.
 mkdir -p /N/u/myaccount/opt/test
 cd openmpi-1.7rc6
 ./configure --help
 ./configure --prefix=/N/u/myaccount/opt/test/openmpi-1.7rc6

Build
 make

Then, install
 make install

Installation is done.

This is optional, I would usually add the path and the library path by putting these lines at the bottom of my .bashrc.
 # OpenMPI-1.7
 export OPENMPI=/N/u/myaccount/opt/test/openmpi-1.7
 export PATH=$OPENMPI/bin:$PATH
 export LD_LIBRARY_PATH=$OPENMPI/lib:$LD_LIBRARY_PATH

Now I have this new version of openMPI for me. So, MPI benchmark would be good for the next topic.

No comments:

Post a Comment

Questions? Thoughts? We'd like to hear from you.