| Date | Description |
| 15-Oct-08 | Original Posting |
| 21-Oct-08 | Changed the public directory name to cse260f-public |
This is a simple lab excercise to get you started on Valkyrie. All the code you need lives in the following publicly readable directory, which will be referred to henceforth as $(PUB)
Before you begin, print out or bring up in your browser the Using Valkyrie document. You will find it handy.
Copy the directory $(PUB)/Examples/Basic to your home directory. Compile and run the two programs contained inside using the supplied Makefile. Don’t modify the Makefile, as it defines various compiler and loader flags via an include file called arch. This arch file is found in $(PUB) and be sure to include it in any Makefile that you write.
Your first MPI program is a parallel "hello world" program. It prints "Hello World'' from each processor along with the rank (process ID). It also reports the total number of processors participating in the run. Run the program (interactively) on between 3 and 8 processors. Here is some sample output:
# processes: 3
Hello world from process 2 Hello world from process 0 Hello world from process 1
Do the process ID's come in any particular order? Why or why not?
The second program, called message, sends 2 integers from each process to process 0, which prints out the received values. A common convention is to call process 0 the root. Run the program several times on 4 processes, noting any variation in message order.
Note that because two of Valkyrie’s nodes are down, that you will hve to use a machinefile. One has been prepared for you and it lives in $(PUB)/machines.valkyrie
Thus, to run hello on 7 processors do
mpirun -np 7 -machinefile ~cs260f/public-cs260f/machines.valkyrie hello