To compile second.c type:
gustav@cisr:~/mpi/simplempi 260 $ hcc -o second second.c -lmpi gustav@cisr:~/mpi/simplempi 261 $The file preamble.c must exist in the same directory.
In order to run the program, type the following in the same window from which the LAM machine was started. Enter a number of intervals when the program prompts for input:
gustav@cisr:~/mpi/simplempi 269 $ mpirun -w N `pwd`/second -- `uname -n` Greetings to the master (cisr, 0) from (mercury, 1) Greetings to the master (cisr, 0) from (venus, 2) Greetings to the master (cisr, 0) from (earth, 3) Greetings to the master (cisr, 0) from (mars, 4) Greetings to the master (cisr, 0) from (jupiter, 5) Greetings to the master (cisr, 0) from (saturn, 6) Greetings to the master (cisr, 0) from (uranus, 7) Greetings to the master (cisr, 0) from (bacchus, 8) Greetings to the master (cisr, 0) from (ceres, 9) Greetings to the master (cisr, 0) from (diana, 10) Greetings to the master (cisr, 0) from (minerva, 11) Greetings to the master (cisr, 0) from (vesta, 12) Enter the number of intervals: 400 pi is approximately 3.1415931744231274 gustav@cisr:~/mpi/simplempi 270 $