1、I MPI II MPI FORTRAN C MPI MPI C /FORTRAN MPI MPI MPI MPI MPI MPI-2 MPI-1 MPI-2 MPI MPI III IX XI XII .XIV . XVII .1 1 2 1.1 2 1.1.1 2 1.1.2 .3 1.2 .4 1.3 .5 2 .6 2.1 6 2.2 .7 2.3 .8 3 9 3.1 9 3.2 9 3.3 . 11 MPI .12 4 MPI .13 4.1 MPI13 4.2 MPI 13 4.3 MPI 14 4.4 MPI 14 4.5 MPI .15 4.6 .15 5 MPI .16 5
2、.1 MPI Hello World!” 16 5.1.1 FORTRAN77+MPI .16 5.1.2 C+MPI 18 5.2 MPI 21 5.3 .22 6 MPI 23 6.1 .23 6.1.1 MPI 23IV 6.1.2 MPI .25 6.1.3 MPI .25 6.1.4 25 6.1.5 .26 6.1.6 .26 6.1.7 .27 6.1.8 status.27 6.1.9 28 6.2 MPI 29 6.3 MPI .30 6.3.1 MPI 30 6.3.2 .32 6.4 MPI .33 6.4.1 MPI 33 6.4.2 34 6.4.3 MPI .35
3、6.5 .35 7 MPI 36 7.1 MPI .36 7.2 MPI 38 7.3 39 7.4 41 7.5 43 7.6 46 7.7 MPI .47 7.8 .50 8 MPI 51 8.1 MPI 51 8.1.1 Jacobi 51 8.1.2 MPI Jacobi 52 8.1.3 Jacobi .55 8.1.4 Jacobi 60 8.2 MPI 62 8.2.1 62 8.2.2 .65 8.3 .68 9 MPI .69 9.1 69 9.2 70 9.3 74 9.4 76 9.5 .79 10 MPICH MPI .80 10.1 Linux MPICH.80V 1
4、0.1.1 .80 10.1.2 81 10.1.3 .82 10.1.4 .82 10.1.5 .83 10.1.6 .83 10.1.7 86 10.2 Windows NT MPICH .87 10.2.1 .87 10.2.2 .87 10.2.3 88 10.2.4 .91 11 92 11.1 92 11.2 .93 11.3 .94 MPI .95 12 MPI 96 12.1 .96 12.2 97 12.3 99 12.4 101 12.5 102 12.5.1 . 102 12.5.2 . 104 12.6 107 12.6.1 107 12.6.2 . 109 12.7
5、110 12.8 .112 12.9 Jacobi 113 12.10 116 12.11 Jacobi 119 12.12 .122 13 MPI 123 13.1 123 13.1.1 . 123 13.1.2 124 13.1.3 125 13.2 .126 13.3 .127 13.4 .130 13.5 .132 13.6 .135VI 13.7 .138 13.8 .139 13.9 MPI 141 13.10 p .142 13.11 .144 13.12 145 13.13 .146 13.14 .147 13.15 149 13.16 MINLOC MAXLOC 151 13
6、.17 153 13.18 .155 14 MPI .156 14.1 156 14.2 157 14.2.1 . 157 14.2.2 . 158 14.2.3 . 160 14.2.4 . 163 14.2.5 164 14.3 .171 14.4 172 14.5 .175 14.6 177 14.7 .181 15 MPI 182 15.1 .182 15.2 182 15.3 187 15.4 190 15.5 .194 15.6 .198 16 MPI .199 16.1 199 16.2 199 16.3 .205 16.4 Jacobi .208 16.5 .212 17 MP
7、I 213 17.1 213 17.2 .215 18 MPI .216 18.1 MPI-1 C 216 18.2 MPI-1 Fortran .223VII 18.3 MPI-2 C 234 18.4 MPI-2 Fortran .243 18.5 .258 MPI MPI-2 .259 19 260 19.1 260 19.2 MPI .262 19.3 264 19.4 socket 268 19.5 .268 20 269 20.1 .269 20.2 270 20.2.1 . 270 20.2.2 . 271 20.2.3 . 272 20.2.4 273 20.3 275 20.
8、3.1 . 275 20.3.2 . 276 20.3.3 . 278 20.4 .280 21 I/O.281 21.1 .281 21.2 .282 21.3 .286 21.3.1 . 286 21.3.2 289 21.3.3 291 21.4 .293 21.4.1 294 21.4.2 . 298 21.4.3 . 300 21.4.4 . 301 21.5 303 21.5.1 304 21.5.2 . 306 21.5.3 . 307 21.6 311 21.7 .314 315 316VIII 318 MPI .320 1 MPI .325 2 MPICH 1.2.1 329
9、IX 21 , Great Challenge” , 90 HPCC ASCI (Computational Science and Engineering) 777 THNPSC-1 THNPSC-2 2000 -MPI MPI MPI THNPSC-1 THNPSC-2 2000 MPI MPI MPI X MPI MPI MPI MPI MPI-2 2001 2 2 XI - PC MPI MPI 1994 MPI MPI FORTRAN 77 C MPI 6 FORTRAN 77 C MPI 6 Fortran90 C+ MPI Fortran 90 C+ MPI FORTRAN77
10、C MPI MPI MPI MPI MPI MPI MPI MPI-2 I/O MPI 2001 2 1XII 1 FORTRAN77+MPI .17 3 C+MPI .20 4 Fortran90+MPI 20 5 .29 6 MPI_REAL MPI_REAL 31 7 MPI_REAL MPI_BYTE 31 8 MPI_BYTE MPI_BYTE 32 9 MPI_CHARACTER .32 10 .36 11 MPI 38 12 MPI .39 13 MPI 41 14 .42 15 .45 16 .46 17 .47 18 .48 19 .49 20 Jacobi 52 21 MP
11、I_SEND MPI_RECV Jacobi .55 22 MPI_SENDRECV Jacobi 60 23 Jacobi 62 24 65 25 67 26 .74 27 .76 28 .79 29 .97 30 MPI_WAIT 103 31 .108 32 MPI_REQUEST_FREE 110 33 . 111 34 .112 35 .113 36 Jacobi 116 37 Jacobi 122 38 127 39 MPI_Gather 129 40 MPI_Gatherv 130 41 MPI_Scatter .132XIII 42 MPI_Scatterv .132 43 MPI_Allgather .134 44 MPI_Allgatherv .135 45 MPI_Alltoall 137 46 139 47 p 144 48 .150 49 150 50 .151 51 MPI_MAXLOC 153 52 .155 53 .165 54 MPI_ADDRESS 171 55 MPI .172 56 .174 57 176 58