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..

Sunday, March 14, 2010

Solve Conflict between IEEEtran class and 'listings' in creating captions

This tip works like a charm.

Use this patch code after IEEEtran loads:

\makeatletter
\let\@ORGmakecaption\@makecaption
\long\def\@makecaption#1#2{\@ORGmakecaption{#1}{#2}\vskip\belowcaptionskip\relax}
\makeatother

Monday, October 5, 2009

mpirun and "test"

I had a great revelation today! I was unable to run my MPI program named "test.cpp" using mpirun (Open MPI) 1.3.2

I was stuck up for 3 days!

I couldnt find any problem with my code. I tried, tried, tired. It didnt work!

I changed the name of file to "client.cpp"

Alleluia! It worked. It seems that "test" is a reserved word/file in MPI. Dont mess with it, ever!

Wednesday, August 26, 2009

Differences between C++ Classes and Structs

Quoted from Ref:

Probably the most frequently asked interview question that I have received is one that explores the difference between C++ classes and structs. Such a question was asked by a Northrop Grumman recruiter during a career fair at UC Irvine. I was also asked this sort of question during an on-site interview at Heavy Iron Studios. Recently, it has been asked during a phone interview with Amazon.com.

My answer typically states that members of a class are private by default, whereas members of a struct are public by default. Inheritance between classes is also private by default, and inheritance between structs is public by default. The interviewer was usually satisfied with this answer, which Dr. Raymond Klefstad fed to my first computer science class. Lately, I was interested in the nontrivial cases that bring me uncertainty: a struct inheriting from a class and a class inheriting from a struct.

Tuesday, March 10, 2009

IEEEtran latex - url in reference

The url representation in reference (using bibtex in latex) may break up. U can avoid that by using:

usepackage{hyperref}

in latex file.

Monday, February 16, 2009

Installing Husband.

I got this email from one of my friends.. hilarious.

------------------------------------------------------------------
A desperate woman writes to the Technical support Guy,



Dear Tech Support,

Last year I upgraded from Boyfriend 5.0 to Husband 1.0 and I noticed a distinct slowdown in the overall system performance, particularly in the flower and jewellery applications, which operated flawlessly under Boyfriend 5.0.

In addition, Husband 1.0 uninstalled many other valuable programs, such as
Romance 9.5 and Personal Attention 6.5, and then installed undesirable programs such as NEWS 5.0, MONEY 3.0 and CRICKET 4.1.

Conversation 8.0 no longer runs, and Housecleaning 2.6 simply crashes the system.

Please note that I have tried running Nagging 5.3 to fix these problems, but to no avail.

What can I do?

Signed,

Desperate Woman


DEAR DESPERATE Madam,

First, keep in mind, Boyfriend 5.0 is an Entertainment Package, while Husband 1.0 is an operating system.

Please enter command: ithoughtyoulovedme.htmland try to download Tears 6.2 and do not forget to install the Guilt 3.0 update.
If that application works as designed, Husband1.0should then automatically run the applications Jewellery 2.0 and Flowers 3.5.

However, remember, overuse of the above application can cause Husband 1.0 to default to Silence 2.5, Happy Hour 7.0 or Beer 6.1.
Please note that Beer 6. 1 is a very bad program that will download the Farting and Snoring Loudly Beta.

Whatever you do, DO NOT under any circumstances install Mother-In-Law 1.0 (it runs a virus in the background that will eventually seize control of all your system resources.)

In addition, please do not attempt to reinstall the Boyfriend 5.0 program. These are unsupported applications and will crash Husband 1.0.

In summary, Husband 1.0 is a great program, but it does have limited memory and cannot learn new applications quickly.
You might consider buying additional software to improve memory and performance.
We recommend: Cooking 3.0 and Hot Looks 7..7.

Good Luck

Tech Support .

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.