On Stumbling Blocks  //  Tuesday, September 16, 2008

Last time I covered the /home directory mounted via NFS. In the last week, I have accomplished alot. Here is what's happened:


1 - Installed MPICH2
I actually got MPICH2 all compiled and installed. The install guide for MPICH2 is fantastic. I must say, however, that the aforementioned walkthrough was actually less than helpful in my case. The difference between the versions of the operating system and MPI were such that it served more as a rough set of guidelines, and less as a reference.

I installed MPICH2 on disseminate/grid1 in /mpi. The source code can be found in /mpi/mpich2-1.0.7-src, and I built the code into /mpi/mpich2-1.0.7 in the standard fashion:

./configure --prefix=/mpi/mpich2-1.0.7 \
1>>~/mpich2-conf.log
make && sudo make install
Afterwards, I chown'ed the files to root, and linked the mpich2-1.0.7* directories to just mpich2 directories, as follows:
lrwxrwxrwx  1 root root   14 2008-09-06 18:43 mpich2 -> ./mpich2-1.0.7
drwxr-xr-x 12 root root 4096 2008-09-06 20:02 mpich2-1.0.7
drwxr-xr-x 12 root root 4096 2008-09-06 18:41 mpich2-1.0.7-src
lrwxrwxrwx 1 root root 17 2008-09-07 16:26 mpich2-src -> mpich2-1.0.7-src/
I've found that this tends to make life easier in any future upgrades. In fact, I've seen this approach taken in many different UNIX environments, and the results always seem to work well. This way, I can install upgrades to MPICH2, test out the newer version, and then once everything is squared, all I have to do is move a symlink.

After all that, I exported /mpi via NFS to the other nodes in the grid. That way, each system can mount the same /mpi, and has access to the same versions of MPICH2.

2 - Set up NIS for authentication

Next step was to allow each user to log in to any of the grid nodes that they want with the same credentials. Since we're using a homogenous Linux environment, I decided that NIS was the way to go. Setup was surprisingly simple, but this is just another example of why I like Ubuntu. To install NIS, all I did was to run the following:

sudo apt-get install nis
More to follow on that as I want to post it. The most important thing I learned about NIS is that when all your user accounts are NIS accounts, MAKE SURE YOU HAVE A root PASSWORD SET ON ALL NODES!. That is all.

I cron'ed a job on the master that rebuilds the NIS database every 15 minutes. That means that I can create an account on disseminate/grid1, and within 15 minutes, that user will be able to log into any of the nodes with the same credentials. That - coupled with the NFS-mounted /home - makes each node a virtually identical environment.

3 - First-Time Login Wizard

I wrote a log-in script for first-time logins that sets up a user's environment to use MPI/MPD and to ssh between grid nodes without entering their passwords. Granted, this is necessary for MPD usage, but still convenient. I should probably post the code for those scripts here at some point, but I intend to put up an image if the actual node OS when I'm done, so you can look at it then.

Well, that's all I've got for now. I think for next week, I'm going to work on building a .deb file for the setup I've developed for the node. That way, I can just dpkg -i elon-grid-node.deb and it'll set everything up for me. Maybe, I'll even set up my own APT repository...

Cheers!

-CF

Labels: , , ,


posted by Christian @ 5:51 PM
0 Comments

Site Design Copyright © 2008 Christian Funkhouser

Site used in accordance with the Elon University Web Policy.

Make note of this disclaimer.