Cloud, IT, Ubuntu

Compiling mpich2 on Ubuntu 10.4 with smpd

I’ve tried using openmpi initially to program in MPI, however, it turned out that it currently doesn’t support spawning the processes on both Windows and Linux at the same time. I’ve took the .exe that they provide, and even if I had rsh configured properly to connect from Windows to Linux, it kept trying to connect to a DCOM object on Windows.

I eventually found this post describing that is not possible to mix the operating systems: “I’m afraid that currently Open MPI doesn’t have such feature to make
Linux and Windows work together”. And this discussion seemed to have taken place an year ago, Jan 2010.

So, while on the lookout for a heterogeneous MPI implementation, I found out about mpich2 – which seems to allow a cluster between Windows and Linux. While reading through the documentation, it becomes clear that you need a certain type of process manager being used to allow Windows – Linux communication; to activate it in Linux, you need to recompile mpich2 – as by default a different process manager is being used.

I’ve followed this advice from mpich2 mailing lists and below are the steps that I did.

All the commands should be ran line root.

cd /usr/local/src
wget http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.3.2/mpich2-1.3.2.tar.gz
tar xzf mpich2-1.3.2.tar.gz
cd mpich2-1.3.2

Now we’re ready to configure the project before compiling. One thing, since this is a hobby project, I do not need (nor I do have) the Fortran compiler, and I had to disable it otherwise configure complained.
It also stopped after disabling Fortran with the message below:

...
checking for MD5... no
checking for library containing md5_calc... no
checking for md5_calc function... no
configure: error: SMPD requires MD5 support, and configure could not find either md5_calc in md5.h or MD5 in openssl/md5.h
configure: error: src/pm/smpd configure failed

After a bit of searching on Ubuntu’s forums, turned out I was missing the libssl-dev pachage.
Just to make sure, before configuring the project, execute:

apt-get install libssl-dev

The next steps are to configure the project and after it finishes, start the build process:

./configure --with-pm=smpd --with-device=ch3:sock --disable-f77 --disable-fc
time make

If everything went ok, you will see a message like:

Make completed
make[1]: Leaving directory `/usr/local/src/mpich2-1.3.2'

real 2m4.536s
user 1m12.137s
sys 0m12.857s

A make install is needed to install everything, and you will find the compilers in /usr/local/bin.
Before compiling the first project, smpd has to be started (and it will ask you a passphrase which you have to give. It offers to save it in your folder in .smpd file which you should accept).

Then you can proceed compiling and running the code.

PS: I liked the cleanness of mpich2 compiling process, a straightforward process without headaches.

Leave a Reply