CSCI 431 Homework 11

time due submission file
8:00 AM Friday, 8 December, 2006 csci/431/HW11/HW11.tar

Getting ready

This assignment requires that you have a working account on Verify that you do so by connecting, via ssh, to Use the same userid as you do on the other UNCA CSCI workstations. Your password will be the four letters 'CSci' followed by the last four digits of your UNCA student ID. By the way, the number printed on your "onecard" is not really your student ID. The one card ID has one extra digit tacked to end of the student ID.

Try this out immediately. If it doesn't work, send email to

The files of trc

You'll have a different home directory on trc than you have on the other UNCA CSCI computers. However, your trc home directory should have symbolic link that points to your regular home directory.

The network of trc

trc is connected to both the main campus network and to a "private" network of eight computers. You need to make sure that you can can connect to these eight computers using ssh. Verify that you can do this by logging onto trc and then using ssh to connect to the following eight computers.

  1. blantyre
  2. toxaway
  3. selica
  4. hillgirt
  5. cannon
  6. calvert
  7. yale
  8. quebec

In case you're wondering, the eight computers are named after railroad stations of Transylvania Railroad Company which once ran a passenger line between Hendersonville and Lake Toxaway.

You may notice that you can not "see" your UNCA CSCI home directory from the eight computers of the "private" network.

Modify the path

Next you need to make some modifications to your environment variables. I suggest you copy /home/brock/.bash_profile and /home/brock/.bashrc into your home directory and then modify then if needed. You'll need to reconnect to trc to get the new environment variable definitions.

Type the following command to make sure you can access the PGI compiler.

Checking out MPI

Now verify that you can start MPI daemons on all computers of the private network by typing the following obscure command:

If this fails, it's probably due to an issue with the ssh daemon. Use ssh to connect to the problematic computer and try again. If you can't connect to a computers, it's probably down. In that case

Next run /bin/hostname on all eight internal computers, along with trc itself.

Finally, kill all those MPI daemons.

The assignment

The assignment is to modify the MPI program for summing cubes to sum up (-1)i+1 / i while using all available processors. Just in case it isn't obvious, this means you add in 1/i when i is odd and subtract 1/i when i is even. This should give you a number close to ln(2), the natural log of 2, or about 0.693.