(1) log in typhon using your account. (2) make a new directory with the name of example and then enter the directory. The command will be: -bash-2.05b$mkdir example -bash-2.05b$cd example (3) Create a file with the name of example.c and the content is the following(this is your first parallel program): #include int main(int argc, char **argv) { int nprocs, mypid; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&nprocs); MPI_Comm_rank(MPI_COMM_WORLD,&mypid ); printf("Hello world from process %d of total %d\n",mypid,nprocs); MPI_Finalize(); } You can use vi command to create file and type the contents: -bash-2.05b$ vi example.c #include int main(int argc, char **argv) { int nprocs, mypid; MPI_Init(&argc,&argv); MPI_Comm_size(MPI_COMM_WORLD,&nprocs); MPI_Comm_rank(MPI_COMM_WORLD,&mypid ); printf("Hello world from process %d of total %d\n",mypid,nprocs); MPI_Finalize(); } ~ (4)creat a file with the name of lamhosts and the content is the following: typhon compute01 compute03 compute05 For example, you can use vi command to create the file and type the contents: -bash-2.05b$ vi lamhosts typhon compute01 compute03 compute05 ~ ~ ~ ~~ "lamhosts" 4L, 37C written Note: This file is indicating the processor elements you are going to use. If you want to find more processor names you can use. go to the directory of etc and open the file hosts where all processors' name are listed. In the above file content, except the name of typhon, You can replace any name with other processor's name. For example, you can use vi or cat command to open the file and you can have the following: -bash-2.05b$ ls example -bash-2.05b$ cd .. -bash-2.05b$ cd .. -bash-2.05b$ ls bin dev home lib machines mnt proc sbin tmp var boot etc initrd lost+found misc opt root tftpboot usr -bash-2.05b$ cd etc(before you type this command, please use ls command to check if you have directory named etc) -bash-2.05b$ cat hosts (before you type this command, please use ls commmand to check if you have file named hosts) The following are the results from the upper command: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 10.0.0.254 typhon.grid.cuny.edu typhon 163.238.55.103 typhon.grid.cuny.edu typhon 163.238.35.5 montecarlo.csi.cuny.edu montecarlo 163.238.35.169 bec.csi.cuny.edu bec 10.0.0.01 compute00.grid.cuny.edu compute00 10.0.0.02 compute01.grid.cuny.edu compute01 10.0.0.03 compute02.grid.cuny.edu compute02 10.0.0.04 compute03.grid.cuny.edu compute03 10.0.0.05 compute04.grid.cuny.edu compute04 10.0.0.06 compute05.grid.cuny.edu compute05 10.0.0.07 compute06.grid.cuny.edu compute06 10.0.0.08 compute07.grid.cuny.edu compute07 10.0.0.09 compute08.grid.cuny.edu compute08 10.0.0.10 compute09.grid.cuny.edu compute09 10.0.0.11 compute10.grid.cuny.edu compute10 10.0.0.12 compute11.grid.cuny.edu compute11 10.0.0.13 compute12.grid.cuny.edu compute12 10.0.0.14 compute13.grid.cuny.edu compute13 10.0.0.15 compute14.grid.cuny.edu compute14 10.0.0.16 compute15.grid.cuny.edu compute15 10.0.0.17 compute16.grid.cuny.edu compute16 10.0.0.18 compute17.grid.cuny.edu compute17 10.0.0.19 compute18.grid.cuny.edu compute18 10.0.0.20 compute19.grid.cuny.edu compute19 10.0.0.21 compute20.grid.cuny.edu compute20 10.0.0.22 compute21.grid.cuny.edu compute21 10.0.0.23 compute22.grid.cuny.edu compute22 10.0.0.24 compute23.grid.cuny.edu compute23 10.0.0.25 compute24.grid.cuny.edu compute24 10.0.0.26 compute25.grid.cuny.edu compute25 10.0.0.27 compute26.grid.cuny.edu compute26 10.0.0.28 compute27.grid.cuny.edu compute27 10.0.0.29 compute28.grid.cuny.edu compute28 10.0.0.30 compute29.grid.cuny.edu compute29 10.0.0.31 compute30.grid.cuny.edu compute30 10.0.0.32 compute31.grid.cuny.edu compute31 After you check this file, if you want to go back to your home directory, type the following command: -bash-2.05b$ cd (4)booting the processors in the file of lamhosts using the following command: -bash-2.05b$ lamboot -v lamhosts You will see the results as follows: LAM 7.1.2/MPI 2 C++/ROMIO - Indiana University n-1<9101> ssi:boot:base:linear: booting n0 (typhon) n-1<9101> ssi:boot:base:linear: booting n1 (compute01) n-1<9101> ssi:boot:base:linear: booting n2 (compute03) n-1<9101> ssi:boot:base:linear: booting n3 (compute05) n-1<9101> ssi:boot:base:linear: finished (5)compile your parallel program using the following command: -bash-2.05b$ mpicc example.c -o example And you will see the result as following: example.c:9:2: warning: no newline at end of file (6)Now list all files you have using ls command: -bash-2.05b$ ls And you will see the result as follows: example example.c lamhosts (7) run your parallel program using the following command: -bash-2.05b$ mpirun -np 4 ./example And you will see the result similar as follows(the processor sequence may be different): Hello world from process 0 of total 4 Hello world from process 1 of total 4 Hello world from process 2 of total 4 Hello world from process 3 of total 4