Friday, January 28, 2011

apt-get - how to update, upgrade

It is not necessary that apt-get fetches the latest versions you needed always. You have to update the list of places from where new versions can be fetched.

It works like this:

apt-get looks at:

/etc/apt/sources.list

You have to update that file with proper links:

This post explains it well: https://help.ubuntu.com/community/Repositories/CommandLine

remember Ubundu 8.xx is called hardy, other versions have got different names.. find out and use accordingly.
use: "cat /etc/issue" or "lsb_release -a" to find out the version of linux u r running

once updated the list use
man apt-get to know how to update and upgrade the version list.

then use apt-get install .... to update your libraries with the new versions.



Installing different versions of open mpi - NFS cluster

It can be bit tricky.

Basically we can have different versions of open mpi running on the same machine, because they can work independent if we install them in different folders.

choose an NSF folder which is common to all machines. Eg: /opt
create a folder called /opt/mpi
create a folder for the version you are planning to install. Eg: /opt/mpi/ompi-4.3.1
(u need root privileges)

Now download tar (.gz) file of the version u r planning to install from openmpi site.

http://www.open-mpi.org/software

(better not to build from the svn checkout version. get the native one)

Now make sure that your system has got the correct versions of autoconf, automake, libtool, gcc, ffortran, g++ etc
(this link will help you to know the requirements: http://www.open-mpi.org/svn/building.php)

if apt-get does not get you the latest or the right version, manually install them.
Eg: from the gnu site: ftp://ftp.gnu.org/gnu/

(manual installation tips:
./configure,
./make all install

you may have to set the correct symbolic links using "ln -s" command at: /usr/bin/ as well.

check versions using --version command. Eg: gcc --version
)

Once your env is ready, start installing open-mpi.

Unzip the tar file

(in the below step, adding prefix is important, otherwise the installation will conflict with the previous or next version installations)

./configure --prefix=/opt/mpi/ompi-4.3.1

(a lot of output)

./make all install

(a lot of output)

If you are lucky, your new open mpi will be installed at /opt/mpi/ompi-xxx folder, without any fuss. Or address the bugs :( and install.

Now, set the PATH and LD_LIBRARY_PATH at .bashrc file to /opt/mpi/ompi-xxx/bin and /opt/mpi/ompi-xxx/lib as follows:

PATH=/opt/mpi/ompi-1.4.3/bin:$PATH
export PATH

LD_LIBRARY_PATH=/opt/mpi/ompi-1.4.3/lib
export LD_LIBRARY_PATH

Logout and login again....
Now this open mpi version should be accessible by all nodes in the NFS cluster. Happy open-mping..

About Me

My photo
Jaison Paul Mulerikkal is the Vice Principal of Rajagiri School of Engineering and Technology (RSET), Kochi. He was the Principal of Jyothi Engineering College (JEC), Cheruthuruthy, Trissur, India. He is a member of CMI Sacred Heart Province, Kochi. He is a civil engineer by profession, but did his Masters in Information Systems from RMIT University, Melbourne, Australia and subsequently received his PhD in High Performance Scientific Computing from the Australian National University. He had worked as a computational scientist at the University of Auckland, New Zealand.