%!PS-Adobe-2.0 %%Creator: dvips 5.528 Copyright 1986, 1994 Radical Eye Software %%Title: temp.dvi %%CreationDate: Tue May 30 10:19:19 1995 %%Pages: 78 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%EndComments %DVIPSCommandLine: dvips -o temp.ps temp %DVIPSParameters: dpi=300, comments removed %DVIPSSource: TeX output 1995.05.30:1018 %%BeginProcSet: tex.pro /TeXDict 250 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N /X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR matrix currentmatrix dup dup 4 get round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@landscape{/isls true N}B /@manualfeed{ statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{ pop nn dup definefont setfont}B /ch-width{ch-data dup length 5 sub get} B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ ch-image}imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{cc 1 add D }B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin 0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X /IE 256 array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for 65781.76 div /vsize X 65781.76 div /hsize X}N /p{show}N /RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V {}B /RV statusdict begin /product where{pop product dup length 7 ge{0 7 getinterval dup(Display)eq exch 0 4 getinterval(NeXT)eq or}{pop false} ifelse}{false}ifelse end{{gsave TR -.1 -.1 TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1 -.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /QV{gsave transform round exch round exch itransform moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{S p tail} B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B /j{ 3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{ 3 2 roll p a}B /bos{/SS save N}B /eos{SS restore}B end %%EndProcSet TeXDict begin 40258431 52099146 1000 300 300 (/tmp_mnt/Net/charlotte/ftp/pub/mpi/mpi-1.jun95/temp.dvi) @start /Fa 1 1 df0 D E /Fb 1 106 df<040C0000000000705898983030606464683006127E910B>105 D E /Fc 2 81 df<00001C00003C0000F80001E00003C0000780000F00000E00001E0000 3C00003C00003C0000780000780000780000780000780000780000780000780000780000 780000780000780000780000780000780000780000780000780000780000780000780000 780000780000780000780000780000780000780000780000780000780000780000780000 780000780000780000780000780000F00000F00000F00001E00001E00003C00003800007 00000E00001C0000780000E00000E000007800001C00000E000007000003800003C00001 E00001E00000F00000F00000F00000780000780000780000780000780000780000780000 780000780000780000780000780000780000780000780000780000780000780000780000 780000780000780000780000780000780000780000780000780000780000780000780000 7800007800007800007800007800007800007800003C00003C00003C00001E00000E0000 0F000007800003C00001E00000F800003C00001C167C7B8121>40 D80 D E /Fd 4 111 df<60F0F070101020204040040A7D830A>59 D<0300038003000000000000000000000000001C002400460046008C000C001800180018 0031003100320032001C0009177F960C>105 D<00180038001000000000000000000000 000001C0022004300430086000600060006000C000C000C000C001800180018001806300 E300C60078000D1D80960E>I<383C0044C6004702004602008E06000C06000C06000C0C 00180C00180C40181840181880300880300F00120E7F8D15>110 D E /Fe 3 62 df<07C018303018701C600C600CE00EE00EE00EE00EE00EE00EE00EE00E E00E600C600C701C30181C7007C00F157F9412>48 D<03000700FF000700070007000700 07000700070007000700070007000700070007000700070007007FF00C157E9412>I61 D E /Ff 2 4 df0 D<020002000200C218F2783AE00F800F 803AE0F278C2180200020002000D0E7E8E12>3 D E /Fg 27 123 df<007E01C007000E001C003C003800780078007FF0F000F000F0007000700070003000 18000C1807E00F147E9312>15 D<70F8F8F87005057C840D>58 D<70F8FCFC7404040408 0810102040060E7C840D>I<000001C00000078000001E00000078000001E00000078000 000E00000038000000F0000003C000000F0000003C000000F0000000F00000003C000000 0F00000003C0000000F0000000380000000E0000000780000001E0000000780000001E00 00000780000001C01A1A7C9723>I62 D<0FFFFFFC1E03C0381803C0181003C00820 03C00820078008600780084007800840078008800F0010000F0000000F0000000F000000 1E0000001E0000001E0000001E0000003C0000003C0000003C0000003C00000078000000 780000007800000078000000F0000000F0000000F0000000F0000001F000007FFFC0001E 1F7F9E1B>84 D<00F1800389C00707800E03801C03803C03803807007807007807007807 00F00E00F00E00F00E00F00E10F01C20F01C20703C20705C40308C400F078014147E9318 >97 D<07803F8007000700070007000E000E000E000E001C001C001CF01D0C3A0E3C0E38 0F380F700F700F700F700FE01EE01EE01EE01CE03CE038607060E031C01F0010207E9F14 >I<0000780003F80000700000700000700000700000E00000E00000E00000E00001C000 01C000F1C00389C00707800E03801C03803C0380380700780700780700780700F00E00F0 0E00F00E00F00E10F01C20F01C20703C20705C40308C400F078015207E9F18>100 D<007C01C207010E011C013C013802780C7BF07C00F000F000F000F00070007001700230 04183807C010147E9315>I<00007C0000CE00019E00039E00030C000700000700000700 000700000E00000E00000E0000FFF0000E00000E00001C00001C00001C00001C00001C00 00380000380000380000380000380000700000700000700000700000700000E00000E000 00E00000E00000C00001C000318000798000F300006200003C000017297E9F16>I<001E 3000713800E0F001C0700380700780700700E00F00E00F00E00F00E01E01C01E01C01E01 C01E01C01E03801E03800E07800E0B8006170001E700000700000700000E00000E00300E 00781C00F038006070003FC000151D809316>I<00E001E001E000C00000000000000000 0000000000000E00130023804380438043808700070007000E000E001C001C001C203840 38403840388019000E000B1F7E9E10>105 D<0000C00001E00001E00001C00000000000 00000000000000000000000000000000001E000063000043800083800103800103800207 00000700000700000700000E00000E00000E00000E00001C00001C00001C00001C000038 0000380000380000380000700000700030700078E000F1C0006380003E00001328819E13 >I<01E0000FE00001C00001C00001C00001C00003800003800003800003800007000007 00000701E00706100E08700E10F00E20F00E40601C80001D00001E00001FC00038700038 3800383800381C20703840703840703840701880E01880600F0014207E9F18>I<03C01F C0038003800380038007000700070007000E000E000E000E001C001C001C001C00380038 00380038007000700070007100E200E200E200E200640038000A207E9F0E>I<1E07C07C 00231861860023A032030043C03403004380380380438038038087007007000700700700 070070070007007007000E00E00E000E00E00E000E00E00E000E00E01C101C01C01C201C 01C038201C01C038401C01C0184038038018801801800F0024147E9328>I<1E07802318 C023A06043C0704380704380708700E00700E00700E00700E00E01C00E01C00E01C00E03 821C03841C07041C07081C03083803101801E017147E931B>I<007C0001C3000301800E 01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0F003C0F00780F0070070 0F00700E0030180018700007C00013147E9316>I<03C1E004621804741C08781C08701E 08701E10E01E00E01E00E01E00E01E01C03C01C03C01C03C01C0380380780380700380E0 03C1C0072380071E000700000700000E00000E00000E00000E00001C00001C0000FFC000 171D819317>I<1E1E0023210023C38043C7804387804383008700000700000700000700 000E00000E00000E00000E00001C00001C00001C00001C000038000018000011147E9315 >114 D<007C018203010603060706060E00078007F803FC01FE001F00077007F006F006 E004400820301FC010147E9315>I<00C000E001C001C001C001C003800380FFF8038007 000700070007000E000E000E000E001C001C001C001C10382038203820384018800F000D 1C7F9B10>I<0F00601180702180E021C0E041C0E04380E08381C00701C00701C00701C0 0E03800E03800E03800E03840E07080C07080C07080E0F1006131003E1E016147E931A> I<03C1C00C62201034701038F02038F020386040700000700000700000700000E00000E0 0000E00000E02061C040F1C040F1C080E2C080446300383C0014147E931A>120 D<0F00601180702180E021C0E041C0E04380E08381C00701C00701C00701C00E03800E03 800E03800E03800E07000C07000C07000E0F00061E0003EE00000E00000E00001C007818 0078380070700060600021C0001F0000141D7E9316>I<01E02003F04007F8C00C1F8008 010000020000040000080000100000600000C0000100000200000400800801001003003F 060061FC0040F80080700013147E9315>I E /Fh 49 122 df<00F0000001F8000003FC 0000039C0000070E0000070E0000070E0000070E0000070E0000071E0000073C00000738 00000778000003F0000003E0030007C003000F8006001FC006003DC0060078E00C0070F0 0C00F0701800E0783800E03C3000E01C6000E00EC000700F800070078040381FE1C01FF8 FFC007E03F001A1F7E9D1F>38 D<018001C0018001806186F99F7DBE1FF807E007E01FF8 7DBEF99F61860180018001C0018010127E9E15>42 D<0006000000060000000600000006 000000060000000600000006000000060000000600000006000000060000000600000006 0000FFFFFFE0FFFFFFE00006000000060000000600000006000000060000000600000006 00000006000000060000000600000006000000060000000600001B1C7E9720>III<001C0000003E0000003E0000002E 0000006700000067000000E7800000C7800000C3800001C3C0000183C0000181C0000381 E0000381E0000700F0000700F0000600F0000E0078000FFFF8000FFFF8001C003C001C00 3C0018003C0038001E0038001E0070001F0070000F0070000F00E0000780191D7F9C1C> 65 DI<003FC000FFF003C0F00780 300F00001E00003C00003C0000780000780000780000F00000F00000F00000F00000F000 00F00000F00000F00000F000007800007800007800003C00003C00001E00000F00080780 1803C07800FFF0003F80151F7D9D1B>IIII<003F8001FFF003C0F80780380F00181E00003C00003C000078 0000780000780000F00000F00000F00000F00000F00000F00000F007F8F007F8F0003878 00387800387800383C00383C00381E00380F003807803803C0F801FFF0003F80151F7D9D 1C>III76 DII<003F000001FFE00003FFF00007C0F800 0F807C001E001E003E001F003C000F00780007807800078078000780F00003C0F00003C0 F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F80007C07800078078000780 7C000F803C000F003E001F001F003E000F807C0007C0F80003FFF00001FFE000003F0000 1A1F7E9D1F>II<003F000001FFE0 0003FFF00007C0F8000F807C001F003E003E001F003C000F007800078078000780780007 80F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003 C07800078078000780780E07803C0F0F003E079F001E03DE000F83FC0007C1F80003FFF0 0001FFF800003F780000003C0000003E0000001F0000000F801A237E9D1F>II<03F8000FFE001C0F00380700700300600000 E00000E00000E00000E00000F000007800007F00003FE0001FFC0007FE0001FF00001F80 0007800003C00003C00001C00001C00001C00001C0C00180E00380F007007C0E001FFC00 07F000121F7E9D17>IIII I89 D<7FFFF07FFFF00001E00003E00003C00007C000 0780000F00001F00001E00003E00003C0000780000F80000F00001F00001E00003C00007 C0000780000F80000F00001E00003E00003C00007C0000780000FFFFF0FFFFF0141D7E9C 19>I<0FC03FF07FF87038401C001C001C00FC0FFC3FFC781CE01CE01CE01CF07C7FFC7F DC3F1C0E127E9114>97 DI<07E00FF81FFC3C1C70047000E000E000E000E000E000E000700070043C1C1FFC 0FF807E00E127E9112>I<000E000E000E000E000E000E000E000E000E000E000E0F8E1F EE3FFE7C3E700E700EE00EE00EE00EE00EE00EE00EF00E701E7C3E3FFE1FEE0F8E0F1D7E 9C15>I<07C01FE03FF078787018601CFFFCFFFCFFFCE000E000E000700070043C1C3FFC 1FF807E00E127E9112>I<00FC01FC03FC07000E000E000E000E000E000E000E00FFE0FF E00E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E1D80 9C0D>I<03C3C00FFFC01FFFC01C3800381C00381C00381C00381C00381C001C38001FF8 001FF0003BC0003800003800001FFC001FFF003FFF80700780E001C0E001C0E001C0F003 C07C0F803FFF001FFE0007F800121B7F9115>III107 DIII<03F0000FFC001FFE003C0F007807 80700380E001C0E001C0E001C0E001C0E001C0F003C07003807807803C0F001FFE000FFC 0003F00012127F9115>II114 D<1FC03FF07FF0F030E000E000F0007F003FC01FE000F0003800388038F0 78FFF07FE01FC00D127F9110>I<1C001C001C001C001C001C00FFE0FFE01C001C001C00 1C001C001C001C001C001C001C001C001C001C201FF00FF007C00C187F970F>III121 D E /Fi 11 104 df0 D<70F8F8F87005057C8D0D>I< 01800180018001800180C183F18F399C0FF003C003C00FF0399CF18FC183018001800180 0180018010147D9417>3 D<03C00FF01FF83FFC7FFE7FFEFFFFFFFFFFFFFFFFFFFFFFFF 7FFE7FFE3FFC1FF80FF003C010127D9317>15 D<000000C0000003C000000F0000003C00 0000F0000003C00000070000001C00000078000001E00000078000001E00000078000000 E0000000780000001E0000000780000001E0000000780000001C0000000700000003C000 0000F00000003C0000000F00000003C0000000C000000000000000000000000000000000 0000000000000000000000007FFFFF80FFFFFFC01A247C9C23>20 DI62 D<00040000000C0000000C0000000C0000 000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000 000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000000C0000 000C0000000C0000000C0000000C0000FFFFFFE0FFFFFFE01B1C7C9B23>I<400002C000 06C00006C00006C00006C00006C00006C00006C00006C00006C00006C00006C00006C000 06C00006C00006C00006C00006C00006C00006C0000660000C60000C3000181C00700F01 E003FF8000FE00171C7D9A1E>91 D<000F0038006000E001C001C001C001C001C001C001 C001C001C001C001C001C001C001C001C0038007001E00F8001E000700038001C001C001 C001C001C001C001C001C001C001C001C001C001C001C001C000E000600038000F102D7D A117>102 DI E /Fj 26 122 df<7FF0FFE07FE00C037D8A10>45 D<70F8F8F0E005057B840E>I<0000 0200000006000000060000000E0000001E0000001E0000003F0000002F0000004F000000 4F0000008F0000010F0000010F0000020F0000020F0000040F00000C0F0000080F000010 0F0000100F0000200F80003FFF800040078000C007800080078001000780010007800200 078002000780060007801E000F80FF807FF81D207E9F22>65 D<01FFFFFE001E001C001E 000C001E0004001E0004003C0004003C0004003C0004003C000400780808007808000078 08000078180000F0300000FFF00000F0300000F0300001E0200001E0200001E0200001E0 001003C0002003C0002003C0004003C00040078000800780018007800100078007000F00 1F00FFFFFE001F1F7D9E1F>69 D<01FFFF00001E03C0001E00E0001E0070001E0078003C 0078003C0078003C0078003C0078007800F0007800F0007801E0007801C000F0070000F0 1E0000FFF00000F0380001E01C0001E01E0001E00E0001E00F0003C01E0003C01E0003C0 1E0003C01E0007803C0007803C0807803C0807803C100F801C10FFF00C20000007C01D20 7D9E21>82 D<00F1800389C00707800E03801C03803C0380380700780700780700780700 F00E00F00E00F00E00F00E20F01C40F01C40703C40705C40308C800F070013147C9317> 97 D<07803F8007000700070007000E000E000E000E001C001C001CF01D0C3A0E3C0E38 0F380F700F700F700F700FE01EE01EE01EE01CE03CE038607060E031C01F0010207B9F15 >I<007E0001C1000300800E07801E07801C07003C0200780000780000780000F00000F0 0000F00000F00000F0000070010070020030040018380007C00011147C9315>I<000078 0003F80000700000700000700000700000E00000E00000E00000E00001C00001C000F1C0 0389C00707800E03801C03803C0380380700780700780700780700F00E00F00E00F00E00 F00E20F01C40F01C40703C40705C40308C800F070015207C9F17>I<007C01C207010E01 1C013C013802780C7BF07C00F000F000F000F0007000700170023804183807C010147C93 15>I<00007800019C00033C00033C000718000700000700000E00000E00000E00000E00 000E0001FFE0001C00001C00001C00001C00003800003800003800003800003800007000 00700000700000700000700000700000E00000E00000E00000E00000C00001C00001C000 0180003180007B0000F300006600003C00001629829F0E>I<003C6000E27001C1E00380 E00700E00F00E00E01C01E01C01E01C01E01C03C03803C03803C03803C03803C07003C07 001C0F001C17000C2E0003CE00000E00000E00001C00001C00301C00783800F0700060E0 003F8000141D7E9315>I<00C001E001E001C000000000000000000000000000000E0033 00230043804300470087000E000E000E001C001C001C003840388030807080310033001C 000B1F7C9E0E>105 D<01E0000FE00001C00001C00001C00001C0000380000380000380 000380000700000700000703C00704200E08E00E11E00E21E00E40C01C80001D00001E00 001FC00038E000387000387000383840707080707080707080703100E03100601E001320 7D9F15>107 D<03C01FC0038003800380038007000700070007000E000E000E000E001C 001C001C001C0038003800380038007000700070007100E200E200E200E200640038000A 207C9F0C>I<1C0F80F0002630C318004740640C004780680E004700700E004700700E00 8E00E01C000E00E01C000E00E01C000E00E01C001C01C038001C01C038001C01C038001C 01C0708038038071003803806100380380E1003803806200700700660030030038002114 7C9325>I<1C0F802630C04740604780604700704700708E00E00E00E00E00E00E00E01C 01C01C01C01C01C01C03843803883803083807083803107003303001C016147C931A>I< 007C0001C3000301800E01C01E01C01C01E03C01E07801E07801E07801E0F003C0F003C0 F003C0F00780F00700700F00700E0030180018700007C00013147C9317>I<01C1E00262 1804741C04781C04701E04701E08E01E00E01E00E01E00E01E01C03C01C03C01C03C01C0 380380780380700380E003C1C0072380071E000700000700000E00000E00000E00000E00 001C00001C0000FFC000171D809317>I<1C1E002661004783804787804707804703008E 00000E00000E00000E00001C00001C00001C00001C000038000038000038000038000070 000030000011147C9313>114 D<00FC030206010C030C070C060C000F800FF007F803FC 003E000E700EF00CF00CE008401020601F8010147D9313>I<018001C003800380038003 8007000700FFF007000E000E000E000E001C001C001C001C003800380038003820704070 407080708031001E000C1C7C9B0F>I<0E00C03300E02301C04381C04301C04701C08703 800E03800E03800E03801C07001C07001C07001C07101C0E20180E20180E201C1E200C26 4007C38014147C9318>I<0E03803307802307C04383C04301C04700C08700800E00800E 00800E00801C01001C01001C01001C02001C02001C04001C04001C08000E300003C00012 147C9315>I<0383800CC4401068E01071E02071E02070C040E00000E00000E00000E000 01C00001C00001C00001C040638080F38080F38100E5810084C60078780013147D9315> 120 D<0E00C03300E02301C04381C04301C04701C08703800E03800E03800E03801C0700 1C07001C07001C07001C0E00180E00180E001C1E000C3C0007DC00001C00001C00003800 F03800F07000E06000C0C0004380003E0000131D7C9316>I E /Fk 46 124 df<007E1F0001C1B1800303E3C00703C3C00E03C1800E01C0000E01C0000E01C0 000E01C0000E01C0000E01C000FFFFFC000E01C0000E01C0000E01C0000E01C0000E01C0 000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0000E01C0 000E01C0000E01C0007F87FC001A1D809C18>11 D<004000800100020006000C000C0018 001800300030007000600060006000E000E000E000E000E000E000E000E000E000E000E0 00E000600060006000700030003000180018000C000C00060002000100008000400A2A7D 9E10>40 D<800040002000100018000C000C000600060003000300038001800180018001 C001C001C001C001C001C001C001C001C001C001C001C001800180018003800300030006 0006000C000C00180010002000400080000A2A7E9E10>I<60F0F0701010101020204080 040C7C830C>44 DI<000600000006000000060000000F000000 0F0000000F00000017800000178000001780000023C0000023C0000023C0000041E00000 41E0000041E0000080F0000080F0000180F8000100780001FFF80003007C0002003C0002 003C0006003E0004001E0004001E000C001F001E001F00FF80FFF01C1D7F9C1F>65 D<001F808000E0618001801980070007800E0003801C0003801C00018038000180780000 807800008070000080F0000000F0000000F0000000F0000000F0000000F0000000F00000 00F0000000700000807800008078000080380000801C0001001C0001000E000200070004 000180080000E03000001FC000191E7E9C1E>67 D69 D<001F808000E0618001801980070007800E0003801C0003801C000180380001 80780000807800008070000080F0000000F0000000F0000000F0000000F0000000F00000 00F000FFF0F0000F80700007807800078078000780380007801C0007801C0007800E0007 8007000B800180118000E06080001F80001C1E7E9C21>71 D73 D77 DI<003F8000 00E0E0000380380007001C000E000E001C0007003C00078038000380780003C0780003C0 700001C0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0F00001E0 700001C0780003C0780003C0380003803C0007801C0007000E000E0007001C0003803800 00E0E000003F80001B1E7E9C20>II82 D<07E0801C1980300580700380600180E00180E00080E0 0080E00080F00000F800007C00007FC0003FF8001FFE0007FF0000FF80000F800007C000 03C00001C08001C08001C08001C0C00180C00180E00300D00200CC0C0083F800121E7E9C 17>I<7FFFFFC0700F01C0600F00C0400F0040400F0040C00F0020800F0020800F002080 0F0020000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 0F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000 1F800003FFFC001B1C7F9B1E>II89 D<1FC000307000783800781C00301C00001C00001C0001FC000F1C00381C0070 1C00601C00E01C40E01C40E01C40603C40304E801F870012127E9115>97 DI<07E00C301878307870306000E0 00E000E000E000E000E00060007004300418080C3007C00E127E9112>I<003F00000700 00070000070000070000070000070000070000070000070000070003E7000C1700180F00 300700700700600700E00700E00700E00700E00700E00700E00700600700700700300700 180F000C370007C7E0131D7E9C17>I<03E00C301818300C700E6006E006FFFEE000E000 E000E00060007002300218040C1803E00F127F9112>I<00F8018C071E061E0E0C0E000E 000E000E000E000E00FFE00E000E000E000E000E000E000E000E000E000E000E000E000E 000E000E000E007FE00F1D809C0D>I<00038003C4C00C38C01C3880181800381C00381C 00381C00381C001818001C38000C300013C0001000003000001800001FF8001FFF001FFF 803003806001C0C000C0C000C0C000C06001803003001C0E0007F800121C7F9215>II<18003C003C00180000000000000000 00000000000000FC001C001C001C001C001C001C001C001C001C001C001C001C001C001C 001C001C00FF80091D7F9C0C>I<00C001E001E000C00000000000000000000000000000 0FE000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E0 00E000E000E060E0F0C0F1C061803E000B25839C0D>IIIII<03F0000E1C00180600300300700380600180E001 C0E001C0E001C0E001C0E001C0E001C06001807003803003001806000E1C0003F0001212 7F9115>II<03C1000C3300180B00300F00700700700700 E00700E00700E00700E00700E00700E00700600700700700300F00180F000C370007C700 000700000700000700000700000700000700000700003FE0131A7E9116>II<1F9030704030C010C010E010F8007F803FE00FF000F880388018C018C018E010D060 8FC00D127F9110>I<04000400040004000C000C001C003C00FFE01C001C001C001C001C 001C001C001C001C001C101C101C101C101C100C100E2003C00C1A7F9910>IIII<7F8FF00F03800F030007020003840001C80001 D80000F00000700000780000F800009C00010E00020E000607000403801E07C0FF0FF815 12809116>II<7FFC70386038407040F040E041C003C003 8007000F040E041C043C0C380870087038FFF80E127F9112>II E /Fl 48 122 df<003F83F800FF8FF801FF9FF803E03E00038038000780780007807800 078078000780780007807800078078000780780007807800FFFC7FC0FFFC7FC0FFFC7FC0 078078000780780007807800078078000780780007807800078078000780780007807800 078078000780780007807800078078000780780007807800078078000780780007807800 078078001D2380A21C>11 D45 D I<00C001C007C0FFC0FFC0FBC003C003C003C003C003C003C003C003C003C003C003C003 C003C003C003C003C003C003C003C003C003C003C003C003C003C0FFFFFFFFFFFF10227C A118>49 D<03F0000FFC001FFE003C1F003007807007C06003C0E003E0C001E04001E040 01E00001E00001E00001E00003C00003C0000780000780000F00001E00003C0000780000 F00001E00001C0000380000700000E00001C0000380000700000FFFFE0FFFFE0FFFFE013 227EA118>I<01F00007FC001FFF003E0F003807807003C02003C02003C00003C00003C0 0003C0000780000780000F00001E0003FC0003F80003FE00000F000007800003C00003C0 0001E00001E00001E00001E00001E08001E0C003C0E003C07007803C0F801FFF000FFC00 03F00013237EA118>I<001F00001F00002F00002F00006F0000EF0000CF0001CF0001CF 00038F00038F00078F00070F000F0F000E0F001E0F003C0F003C0F00780F00780F00F00F 00FFFFF8FFFFF8FFFFF8000F00000F00000F00000F00000F00000F00000F00000F00000F 0015217FA018>I<3FFF803FFF803FFF803C00003C00003C00003C00003C00003C00003C 00003C00003C00003CF8003FFE003FFF003F0F803E07803C03C03803C00001E00001E000 01E00001E00001E00001E00001E04003C04003C0E003C07007807C1F003FFE000FFC0003 F00013227EA018>I<007E0001FF0003FF0007C1000F00001E00001E00003C00003C0000 78000078000078F800F1FE00F7FF00FF0F80FC0780F803C0F803C0F801C0F001E0F001E0 F001E0F001E0F001E07001E07001E07801E07803C03803C03C03801C07801F0F000FFE00 07FC0001F00013237EA118>II<01F00007FC000FFE001E0F003C07803C07807803C07803C078 03C07803C07803C03803803C07801E0F000F1E0007FC0003F8000FFE001E0F003C078078 03C07803C0F001E0F001E0F001E0F001E0F001E0F001E07803C07803C03C07803E0F801F FF0007FC0001F00013237EA118>I<001F0000001F0000003F8000003F8000003B800000 7BC0000073C0000071C00000F1E00000F1E00000E0E00001E0F00001E0F00001C0F00003 C0780003C078000380780007803C0007803C0007003C000F001E000F001E000FFFFE001F FFFF001FFFFF001C000F003C0007803C00078038000780780003C0780003C0700003C0F0 0001E0F00001E0E00001E01B237EA220>65 DI<000FF000007FFC0000FFFF0001 F01F0003C00700078000000F0000001E0000003E0000003C0000003C0000007800000078 00000078000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0 000000F00000007800000078000000780000003C0000003C0000003E0000001E0000000F 0000000780008003C0038001F00F8000FFFF00007FFC00000FF00019257DA31F>I II76 DII<001FC000007FF00001FFFC0003F07E0007C01F 000F800F801F0007C01E0003C03C0001E03C0001E0780000F0780000F0780000F0700000 70F0000078F0000078F0000078F0000078F0000078F0000078F0000078F0000078F00000 78780000F0780000F0780000F07C0001F03C0001E03E0003E01E0003C01F0007C00F800F 8007C01F0003F07E0001FFFC00007FF000001FC0001D257DA324>I82 D<00FE0003FFC007FFE00F81E01E00603C00003C00007800007800007800007800007800 007C00003C00003F00001FC0000FFC0007FF0001FF80003FC00007E00001F00000F00000 F8000078000078000078000078000078000078C000F0E000F0F801E07E07C03FFF800FFF 0001FC0015257EA31B>III<07E01FF83FFC381E201E000F000F00 0F000F00FF07FF1FFF3E0F780FF00FF00FF00FF00FF83F7FFF3FEF1F8F10167E9517>97 DI<01FC0007FF000FFF801F03803C0180780000780000700000F00000F00000F0 0000F00000F00000F000007800007800007800003C00401F03C00FFFC007FF8001FC0012 167E9516>I<0003C00003C00003C00003C00003C00003C00003C00003C00003C00003C0 0003C00003C00003C003E3C00FFBC01FFFC03F0FC03C07C07803C07803C0F003C0F003C0 F003C0F003C0F003C0F003C0F003C0F003C07803C07803C03C07C03E0FC01FFFC00FFBC0 03E3C012237EA219>I<03F00007FC001FFE003E0F003C0780780380780380F001C0FFFF C0FFFFC0FFFFC0F00000F00000F000007000007800007800003C00801F07800FFF8007FF 0001F80012167E9516>I<003F00FF01FF03C00380078007800780078007800780078007 80FFF8FFF8FFF80780078007800780078007800780078007800780078007800780078007 800780078007800780102380A20F>I<01F07807FFF80FFFF81F1F001E0F003C07803C07 803C07803C07803C07801E0F001F1F000FFE001FFC0019F0003800003800003C00001FFE 001FFFC01FFFE03FFFF07801F07800F8F00078F00078F00078F000787800F03E03E01FFF C00FFF8001FC0015217F9518>III<00F000F000F000F0000000 00000000000000000000000000000000F000F000F000F000F000F000F000F000F000F000 F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F080F0E3 E0FFE07FC01F000C2D83A20D>IIIII<01FC0007FF000FFF801F 07C03C01E07800F07800F0700070F00078F00078F00078F00078F00078F000787800F078 00F07C01F03E03E01F07C00FFF8007FF0001FC0015167F9518>II 114 D<07F01FFC3FFE3C0E7806780078007C003F003FF01FF80FFC01FE001F000F000F00 0FC00FF81EFFFE3FFC0FF010167F9513>I<0F000F000F000F000F000F00FFF8FFF8FFF8 0F000F000F000F000F000F000F000F000F000F000F000F000F000F000F080F1C07FC07F8 03E00E1C7F9B12>IIII<7801F07C01E03E03C01E07C00F0780078F0007DE0003FC00 01FC0000F80000700000F80001FC0003DC00039E00078F000F07801E07801E03C03C01E0 7800F0F800F81516809516>II E /Fm 33 90 df45 D<3078F8787005057C84 0D>I<000C001C00FC0F380038003800380038003800700070007000700070007000E000 E000E000E000E000E001C001C001C001C001C001C0038003C0FFFE0F1E7C9D17>49 D<003F8000C1E00100F00200780400780400780F007C0F807C0F807C0F00780600780000 F80000F00001E00001C0000380000700000E00001C0000380000600000C0000180000300 200600200800401000403FFFC07FFF80FFFF80161E7E9D17>I<007F000183C00201E004 00F00700F00F00F00F01F00F01F00001E00001E00003C0000380000700000E0000F80000 0E000007000007800007C00003C00007C03007C07807C0F807C0F807C0F00780800F0040 0E00201C0018780007E000141F7D9D17>I<0000600000600000E00001C00003C00005C0 000DC00009C00011C000238000438000C380008380010380020380040700080700180700 100700200700400700FFFFF0000E00000E00000E00000E00000E00001C00001E0001FFE0 141E7E9D17>I<01803001FFE003FFC003FF0003FC000200000200000200000400000400 00040000047C000587000603800C01800801C00001C00001E00001E00001E00001E07003 C0F803C0F003C0E00380800780400700400E00201C0018700007C000141F7D9D17>I<00 0F8000704000C0200180E00301E00701E00E00C01E00001C00003C000038000078F80079 0E007A07007C0300F80380F80380F003C0F003C0F003C0F003C0F00780E00780E00780E0 0700E00F00600E00701C0030180018700007C000131F7C9D17>I<2000003FFFE07FFFC0 7FFF80400100C00200800200800400000800001000002000004000004000008000018000 0300000300000700000600000E00000E00001E00001C00001C00003C00003C00003C0000 780000780000780000300000131F799D17>I<003F0000C1C00100600200600400300C00 300C00300C00300C00600E00600F80C00FC18007F60003FC0001FC0001FF00063F800C0F 801007C03003C06001C06000C0C000C0C000C0C000C0C00080C001006003003004001818 0007E000141F7D9D17>I<007E0001C3000301800601C00E01C01C00C03C00E03C00E03C 01E07801E07801E07801E07801E07803E07803E03803C03807C01C0BC00C13C003E38000 0780000780000700000E00600E00F01C00F01800E0300080600041C0003F0000131F7C9D 17>I<0000100000001800000038000000380000007800000078000000FC000001BC0000 013C0000033C0000023C0000063C0000043E0000081E0000081E0000101E0000101E0000 201E0000200F0000400F0000400F0000FFFF0000800F0001000F80010007800200078002 00078004000780040007800C0007C03E0007C0FF807FFC1E207E9F22>65 D<07FFFF00007C01C0003C01E0003C00F0007800F8007800F8007800F8007800F8007800 F8007800F000F001F000F001E000F003C000F00F8000FFFE0000F00F0001E007C001E003 C001E003E001E001E001E001E001E001E003C001E003C003E003C003E003C003C003C007 C003C00F8007800F0007803E00FFFFF0001D1F7E9E20>I<0001F808000E061800380138 007000F801E0007803C0007007800030078000300F0000301F0000301E0000303E000020 3C0000007C0000007C0000007C0000007C000000F8000000F8000000F8000000F8000000 F80000007800004078000080780000803C0000803C0001001C0002000E00020006000C00 0300100001C0E000003F00001D217B9F21>I<07FFFF00007C01E0003C00F0003C007800 78003C0078003C0078001E0078001E0078001E0078001F00F0001F00F0001F00F0001F00 F0001F00F0001F00F0001F01E0001E01E0003E01E0003E01E0003E01E0003C01E0007C03 C0007803C000F003C000F003C001E003C003C003C0078007800F0007803C00FFFFE00020 1F7E9E23>I<07FFFFF8007C0078003C0038003C00180078001800780008007800080078 0008007800080078080800F0100000F0100000F0100000F0300000FFF00000F0700001E0 200001E0200001E0200001E0200001E0000801E0001003C0001003C0001003C0002003C0 002003C0006003C000C0078001C0078007C0FFFFFF801D1F7E9E1F>I<07FFFFF8007C00 78003C0038003C001800780018007800080078000800780008007800080078000800F010 0000F0100000F0100000F0300000F0700000FFF00001E0600001E0200001E0200001E020 0001E0200001E0000003C0000003C0000003C0000003C0000003C0000003C00000078000 0007C00000FFFE00001D1F7E9E1E>I<0001FC04000F030C003C009C0070007C00E0003C 01C0003803800018078000180F0000181F0000181E0000183E0000103C0000007C000000 7C0000007C0000007C000000F8000000F8000000F8007FFCF80003E0780001E0780001E0 780003C0780003C03C0003C03C0003C01C0003C00E0007C007000B800380118001E06080 003F80001E217B9F24>I<07FFC7FFC0007C00F800003C007800003C007800007800F000 007800F000007800F000007800F000007800F000007800F00000F001E00000F001E00000 F001E00000F001E00000FFFFE00000F001E00001E003C00001E003C00001E003C00001E0 03C00001E003C00001E003C00003C007800003C007800003C007800003C007800003C007 800003C007800007800F000007C00F8000FFF8FFF800221F7E9E22>I<07FFE0007C0000 3C00003C0000780000780000780000780000780000780000F00000F00000F00000F00000 F00000F00001E00001E00001E00001E00001E00001E00003C00003C00003C00003C00003 C00003C00007800007C000FFFC00131F7F9E10>I<07FFE07FE0007C001F00003C000C00 003C00180000780010000078004000007800800000780100000078020000007804000000 F008000000F010000000F060000000F0F0000000F1F0000000F278000001E478000001E8 78000001F03C000001E03C000001E01E000001E01E000003C00F000003C00F000003C00F 000003C007800003C007800003C003C000078003C00007C007E000FFFC3FFC00231F7E9E 23>75 D<07FFF000007E0000003C0000003C000000780000007800000078000000780000 007800000078000000F0000000F0000000F0000000F0000000F0000000F0000001E00000 01E0000001E0000001E0000001E0008001E0010003C0010003C0010003C0030003C00200 03C0060003C0060007801E0007807C00FFFFFC00191F7E9E1C>I<07FC0000FFC0007C00 00F800003C00017800003C00017800004E0002F000004E0002F000004E0004F000004E00 04F000004E0008F000004E0008F00000870011E00000870011E00000870021E000008700 21E00000870041E00000838041E00001038083C00001038083C00001038103C000010382 03C0000101C203C0000101C403C0000201C40780000201C80780000201C80780000201D0 0780000200F00780000600E00780000600E00F00000F00C00F8000FFE0C1FFF8002A1F7E 9E2A>I<07FC01FFC0003E003E00003E001800003E001800004F001000004F0010000047 80100000478010000043C010000043C010000083C020000081E020000081E020000080F0 20000080F020000080782000010078400001007C400001003C400001003C400001001E40 0001001E400002000F800002000F800002000F8000020007800002000780000600038000 06000300000F00010000FFE0010000221F7E9E22>I<0003F800001E0E000038070000E0 038001C001C003C001E0078000E00F0000F00F0000F01E0000F01E0000F83E0000F83C00 00F87C0000F87C0000F87C0000F87C0000F8F80001F0F80001F0F80001F0F80001F0F800 03E0780003E0780003C0780007C07C0007803C000F003C001E001E001C000E0038000700 F00003C3C00000FE00001D217B9F23>I<07FFFF00007C03C0003C01E0003C00F0007800 F0007800F8007800F8007800F8007800F8007800F000F001F000F001E000F003C000F007 8000F00F0000FFF80001E0000001E0000001E0000001E0000001E0000001E0000003C000 0003C0000003C0000003C0000003C0000003C000000780000007C00000FFFC00001D1F7E 9E1F>I<0003F800001E0E000038070000F0038001E001C003C001E0078001E00F0000F0 0F0000F01F0000F01E0000F83E0000F83C0000F87C0000F87C0000F87C0000F87C0000F8 F80001F0F80001F0F80001F0F80001F0F80003E0780003E0780003C0780007C0781E0780 3C210F003C409E001E409C000E80F8000740F00003C1C04000FEC0400000E0400000E080 0000E1800000FF800000FF000000FF0000007E0000003C001D297B9F23>I<07FFFC0000 7C0700003C03C0003C01E0007801E0007801F0007801F0007801F0007801F0007801E000 F003E000F003C000F0078000F00F0000F03C0000FFF00001E0300001E0380001E01C0001 E01C0001E01C0001E01E0003C03E0003C03E0003C03E0003C03E0003C03E0003C03E0207 803E0407C01F04FFFC0F18000003E01F207E9E21>I<003F040060CC01803C03801C0300 1C0700180600080E00080E00080E00080E00000F00000F80000FE00007FE0003FF8001FF C0007FE00007E00001E00000E00000F00000F04000E04000E04000E04000E06000C06001 80E00380F80300C60C0081F80016217D9F19>I<3FFFFFF03C0780F03007803060078030 400F0010400F0010C00F0010800F0010800F0010800F0010001E0000001E0000001E0000 001E0000001E0000001E0000003C0000003C0000003C0000003C0000003C0000003C0000 00780000007800000078000000780000007800000078000000F0000001F800007FFFE000 1C1F7A9E21>III89 D E /Fn 10 58 df<1F00318060C04040C060C060C060C0 60C060C060C060C060404060C031801F000B107F8F0F>48 D<0C003C00CC000C000C000C 000C000C000C000C000C000C000C000C000C00FF8009107E8F0F>I<1F00618040C08060 C0600060006000C00180030006000C00102020207FC0FFC00B107F8F0F>I<1F00218060 C060C000C0008001800F00008000400060C060C060804060801F000B107F8F0F>I<0300 030007000F000B001300330023004300C300FFE003000300030003001FE00B107F8F0F> I<20803F002C002000200020002F0030802040006000600060C06080C061801F000B107F 8F0F>I<0780184030C060C06000C000CF00F080E040C060C060C060406060C030801F00 0B107F8F0F>I<40007FE07FC08080808001000200040004000C00080008001800180018 00180018000B117E900F>I<1F00318060C060C060C071803F000F00338061C0C060C060 C060404060801F000B107F8F0F>I<1F00318060C0C040C060C060C06040E021E01E6000 60004060C0608043003E000B107F8F0F>I E /Fo 86 126 df<70F8F8F8F8F8F8F8F8F8 F8F8F8F8F8F8F870000000000070F8F8F870051C779B18>33 D<4010E038F078E038E038 E038E038E038E038E038E038E038E03860300D0E7B9C18>I<030600078F00078F00078F 00078F00078F00078F007FFFC0FFFFE0FFFFE07FFFC00F1E000F1E000F1E000F1E000F1E 000F1E007FFFC0FFFFE0FFFFE07FFFC01E3C001E3C001E3C001E3C001E3C001E3C000C18 00131C7E9B18>I<3803007C07807C0780EE0F80EE0F00EE0F00EE1F00EE1E00EE1E00EE 3E007C3C007C3C00387C0000780000780000F80000F00001F00001E00001E00003E00003 C00003C00007C0000783800787C00F87C00F0EE00F0EE01F0EE01E0EE01E0EE03E0EE03C 07C03C07C018038013247E9F18>37 D<01C00007E0000FF0000E70001C38001C38001C38 001C38001C73F01C73F01CE3F00FE3800FC7000F87000F07001F0E003F0E007B8E0073DC 00E1DC00E0F800E0F800E07070E0787070FC707FFFE03FCFE00F03C0141C7F9B18>I<38 7C7C7E3E0E0E0E1C1C38F8F0C0070E789B18>I<007000F001E003C007800F001E001C00 380038007000700070007000E000E000E000E000E000E000E000E0007000700070007000 380038001C001E000F00078003C001F000F000700C24799F18>I<6000F00078003C001E 000F000780038001C001C000E000E000E000E00070007000700070007000700070007000 E000E000E000E001C001C0038007800F001E003C007800F00060000C247C9F18>I<01C0 0001C00001C00001C000C1C180F1C780F9CF807FFF001FFC0007F00007F0001FFC007FFF 00F9CF80F1C780C1C18001C00001C00001C00001C00011147D9718>I<00600000F00000 F00000F00000F00000F00000F00000F0007FFFC0FFFFE0FFFFE07FFFC000F00000F00000 F00000F00000F00000F00000F00000600013147E9718>I<1C3E7E7F3F1F070E1E7CF860 080C788518>I<7FFF00FFFF80FFFF807FFF0011047D8F18>I<3078FCFC78300606778518 >I<000300000780000780000F80000F00001F00001E00001E00003E00003C00007C0000 780000780000F80000F00001F00001E00003E00003C00003C00007C0000780000F80000F 00000F00001F00001E00003E00003C00003C00007C0000780000F80000F00000F0000060 000011247D9F18>I<01F00007FC000FFE001F1F001C07003803807803C07001C07001C0 E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0F001E07001C07001C0 7803C03803801C07001F1F000FFE0007FC0001F000131C7E9B18>I<0180038003800780 0F803F80FF80FB8043800380038003800380038003800380038003800380038003800380 0380038003807FFCFFFE7FFC0F1C7B9B18>I<03F0000FFE003FFF007C0F807003C0E001 C0F000E0F000E06000E00000E00000E00001C00001C00003C0000780000F00001E00003C 0000780000F00001E00007C0000F80001E00E03C00E07FFFE0FFFFE07FFFE0131C7E9B18 >I<07F8001FFE003FFF007807807803C07801C03001C00001C00003C0000380000F0003 FF0003FE0003FF000007800003C00001C00000E00000E00000E0F000E0F000E0F001C0F0 03C07C07803FFF001FFE0003F800131C7E9B18>I<001F00003F0000770000770000E700 01E70001C7000387000787000707000E07001E07003C0700380700780700F00700FFFFF8 FFFFF8FFFFF8000700000700000700000700000700000700007FF000FFF8007FF0151C7F 9B18>I<1FFF803FFF803FFF803800003800003800003800003800003800003800003800 003BF8003FFE003FFF003C07801803C00001C00000E00000E06000E0F000E0F000E0E001 C07003C07C0F803FFF001FFC0003F000131C7E9B18>I<007E0001FF0007FF800F83C01E 03C01C03C0380180380000700000700000E1F800E7FE00FFFF00FE0780F803C0F001C0F0 00E0E000E0F000E07000E07000E07000E03801C03C03C01E07800FFF0007FE0001F80013 1C7E9B18>II<03F0000FFC001FFE 003C0F00780780700380E001C0E001C0E001C0E001E0E001E07001E07803E03C0FE01FFF E00FFEE003F0E00000E00001C00001C00001C0300380780780780F00783E003FFC001FF0 0007C000131C7E9B18>57 D<3078FCFC783000000000000000003078FCFC783006147793 18>I<183C7E7E3C180000000000000000183C7E7E3E1E0E1C3C78F060071A789318>I<00 0300000780001F80003F00007E0001FC0003F00007E0001FC0003F00007E0000FC0000FC 00007E00003F00001FC00007E00003F00001FC00007E00003F00001F8000078000030011 187D9918>I<7FFFC0FFFFE0FFFFE0FFFFE0000000000000000000000000FFFFE0FFFFE0 FFFFE07FFFC0130C7E9318>I<600000F00000FC00007E00003F00001FC00007E00003F0 0001FC00007E00003F00001F80001F80003F00007E0001FC0003F00007E0001FC0003F00 007E0000FC0000F0000060000011187D9918>I<00700000F80000F80000D80000D80001 DC0001DC0001DC00018C00038E00038E00038E00038E0003060007070007070007070007 07000FFF800FFF800FFF800E03800E03801C01C01C01C07F07F0FF8FF87F07F0151C7F9B 18>65 DI<00F8E003FEE007FFE00F07E01E 03E03C01E03800E07000E07000E0700000E00000E00000E00000E00000E00000E00000E0 0000E000007000007000E07000E03800E03C00E01E01C00F07C007FF8003FE0000F80013 1C7E9B18>I<7FF800FFFE007FFF001C0F801C03C01C03C01C01E01C00E01C00E01C00F0 1C00701C00701C00701C00701C00701C00701C00701C00701C00F01C00E01C00E01C01E0 1C01C01C03C01C0F807FFF00FFFE007FF800141C7F9B18>III<01F1C003FDC00FFFC0 1F0FC01C03C03803C03801C07001C07001C0700000E00000E00000E00000E00000E00000 E00FF0E01FF0E00FF07001C07001C07003C03803C03803C01C07C01F0FC00FFFC003FDC0 01F1C0141C7E9B18>I<7F07F0FF8FF87F07F01C01C01C01C01C01C01C01C01C01C01C01 C01C01C01C01C01C01C01FFFC01FFFC01FFFC01C01C01C01C01C01C01C01C01C01C01C01 C01C01C01C01C01C01C01C01C07F07F0FF8FF87F07F0151C7F9B18>I<7FFF00FFFF807F FF0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001 C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007FFF00FF FF807FFF00111C7D9B18>I<7F07F0FF87F87F07F01C03C01C07801C07001C0E001C1E00 1C3C001C38001C70001CF0001DF0001DF0001FB8001FB8001F1C001E1C001C0E001C0E00 1C07001C07001C03801C03801C01C07F03F0FF87F87F03F0151C7F9B18>75 D<7FE000FFE0007FE0000E00000E00000E00000E00000E00000E00000E00000E00000E00 000E00000E00000E00000E00000E00000E00000E00000E00000E00700E00700E00700E00 700E00707FFFF0FFFFF07FFFF0141C7F9B18>II<7E07F0FF0FF87F07F01D81C01D81C01D81C01DC1C01CC1C01CC1C01CE1C01CE1C0 1CE1C01C61C01C71C01C71C01C31C01C39C01C39C01C39C01C19C01C19C01C1DC01C0DC0 1C0DC01C0DC07F07C0FF87C07F03C0151C7F9B18>I<0FF8003FFE007FFF00780F007007 00F00780E00380E00380E00380E00380E00380E00380E00380E00380E00380E00380E003 80E00380E00380E00380E00380E00380F00780700700780F007FFF003FFE000FF800111C 7D9B18>II<0FF8003FFE007FFF00780F00 700700F00780E00380E00380E00380E00380E00380E00380E00380E00380E00380E00380 E00380E00380E00380E00380E1E380E1E380F0E78070F700787F007FFF003FFE000FFC00 001C00001E00000E00000F0000070000070011227D9B18>I<7FF800FFFE007FFF001C0F 801C03801C03C01C01C01C01C01C01C01C03C01C03801C0F801FFF001FFE001FFE001C0F 001C07001C03801C03801C03801C03801C03801C039C1C039C1C039C7F01F8FF81F87F00 F0161C7F9B18>I<03F3801FFF803FFF807C0F80700780E00380E00380E00380E0000070 00007800003F00001FF00007FE0000FF00000F800003C00001C00000E00000E06000E0E0 00E0E001E0F001C0F80780FFFF80FFFE00E7F800131C7E9B18>I<7FFFF8FFFFF8FFFFF8 E07038E07038E07038E07038007000007000007000007000007000007000007000007000 00700000700000700000700000700000700000700000700000700000700007FF0007FF00 07FF00151C7F9B18>IIII<7F8FE07F9F E07F8FE00E07000F0700070E00078E00039C0003DC0001F80001F80000F00000F0000070 0000F00000F80001F80001DC00039E00038E00070F000707000E07800E03801E03C07F07 F0FF8FF87F07F0151C7F9B18>II<3FFFE0 7FFFE07FFFE07001C07003C0700780700700000F00001E00001C00003C00007800007000 00F00001E00001C00003C0000780000700000F00001E00E01C00E03C00E07800E07000E0 FFFFE0FFFFE0FFFFE0131C7E9B18>II<600000F00000F00000F8000078 00007C00003C00003C00003E00001E00001F00000F00000F00000F800007800007C00003 C00003C00003E00001E00001F00000F00000F800007800007800007C00003C00003E0000 1E00001E00001F00000F00000F8000078000078000030011247D9F18>I I<7FFF00FFFF80FFFF807FFF0011047D7F18>95 D<061E3E387070E0E0E0F8FC7C7C3807 0E789E18>I<1FE0003FF8007FFC00781E00300E0000070000070000FF0007FF001FFF00 7F0700780700E00700E00700E00700F00F00781F003FFFF01FFBF007E1F014147D9318> I<7E0000FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFFC00FC1 E00F80E00F00700E00700E00380E00380E00380E00380E00380E00380F00700F00700F80 E00FC1E00FFFC00EFF80063E00151C809B18>I<01FE0007FF001FFF803E078038030070 0000700000E00000E00000E00000E00000E00000E000007000007001C03801C03E03C01F FF8007FF0001FC0012147D9318>I<001F80003F80001F80000380000380000380000380 00038003E3800FFB801FFF803C1F80380F80700780700380E00380E00380E00380E00380 E00380E00380700780700780380F803C1F801FFFF00FFBF803E3F0151C7E9B18>I<01F0 0007FC001FFE003E0F00380780700380700380E001C0E001C0FFFFC0FFFFC0FFFFC0E000 007000007001C03801C03E03C01FFF8007FF0001FC0012147D9318>I<001F80007FC000 FFE000E1E001C0C001C00001C00001C0007FFFC0FFFFC0FFFFC001C00001C00001C00001 C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0007FFF007F FF007FFF00131C7F9B18>I<01E1F007FFF80FFFF81E1E301C0E00380700380700380700 3807003807001C0E001E1E001FFC001FF80039E0003800001C00001FFE001FFFC03FFFE0 7801F0700070E00038E00038E00038E000387800F07E03F01FFFC00FFF8001FC00151F7F 9318>I<7E0000FE00007E00000E00000E00000E00000E00000E00000E3E000EFF800FFF C00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00 E00E00E00E00E07FC3FCFFE7FE7FC3FC171C809B18>I<03800007C00007C00007C00003 80000000000000000000000000007FC000FFC0007FC00001C00001C00001C00001C00001 C00001C00001C00001C00001C00001C00001C00001C00001C00001C000FFFF00FFFF80FF FF00111D7C9C18>I<0038007C007C007C003800000000000000000FFC1FFC0FFC001C00 1C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C00 1C001C001C6038F078FFF07FE03F800E277E9C18>II<7FE000FFE0007FE00000E00000E00000E00000E00000E00000E00000E00000 E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000 E00000E00000E0007FFFC0FFFFE07FFFC0131C7E9B18>I<7CE0E000FFFBF8007FFFF800 1F1F1C001E1E1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C00 1C1C1C001C1C1C001C1C1C001C1C1C001C1C1C007F1F1F00FFBFBF807F1F1F0019148193 18>I<7E3E00FEFF807FFFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E0 0E00E00E00E00E00E00E00E00E00E00E00E07FC3FCFFE7FE7FC3FC1714809318>I<01F0 000FFE001FFF003E0F803803807001C07001C0E000E0E000E0E000E0E000E0E000E0F001 E07001C07803C03C07803E0F801FFF000FFE0001F00013147E9318>I<7E3E00FEFF807F FFC00FC1E00F80E00F00700E00700E00380E00380E00380E00380E00380E00380F00700F 00700F80E00FC1E00FFFC00EFF800E3E000E00000E00000E00000E00000E00000E00000E 00007FC000FFE0007FC000151E809318>I<01E38007FB801FFF803E1F80380F80700780 700780E00380E00380E00380E00380E00380E00380700780700780380F803C1F801FFF80 0FFB8003E380000380000380000380000380000380000380000380003FF8003FF8003FF8 151E7E9318>I<7F87E0FF9FF07FBFF803F87803F03003E00003C00003C0000380000380 000380000380000380000380000380000380000380007FFE00FFFF007FFE0015147F9318 >I<07F7003FFF007FFF00780F00E00700E00700E007007C00007FE0001FFC0003FE0000 1F00600780E00380E00380F00380F80F00FFFF00FFFC00E7F00011147D9318>I<018000 0380000380000380000380007FFFC0FFFFC0FFFFC0038000038000038000038000038000 0380000380000380000380000380400380E00380E00380E001C1C001FFC000FF80003E00 13197F9818>I<7E07E0FE0FE07E07E00E00E00E00E00E00E00E00E00E00E00E00E00E00 E00E00E00E00E00E00E00E00E00E00E00E01E00F03E007FFFC03FFFE01FCFC1714809318 >I<7F8FF0FF8FF87F8FF01E03C00E03800E03800E0380070700070700070700038E0003 8E00038E00038E0001DC0001DC0001DC0000F80000F80000700015147F9318>II<7F8FF07F9FF07F8F F0070700078E00039E0001DC0001F80000F80000700000F00000F80001DC00039E00038E 000707000F07807F8FF0FF8FF87F8FF015147F9318>I<7F8FF0FF8FF87F8FF00E01C00E 03800E0380070380070700070700038700038600038E0001CE0001CE0000CC0000CC0000 DC0000780000780000780000700000700000700000F00000E00079E0007BC0007F80003F 00001E0000151E7F9318>I<3FFFF07FFFF07FFFF07001E07003C0700780000F00001E00 003C0000F80001F00003C0000780000F00701E00703C0070780070FFFFF0FFFFF0FFFFF0 14147F9318>I<0007E0001FE0007FE000780000E00000E00000E00000E00000E00000E0 0000E00000E00000E00000E00000E00001E0007FC000FF8000FF80007FC00001E00000E0 0000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000007800007F E0001FE00007E013247E9F18>I<7C0000FF0000FFC00003C00000E00000E00000E00000 E00000E00000E00000E00000E00000E00000E00000E00000F000007FC0003FE0003FE000 7FC000F00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000 E00003C000FFC000FF00007C000013247E9F18>125 D E /Fp 42 122 df<000FF07F00007FF9FF8000F83FC7C001E07F8FC003E07F0FC007C07F0FC007C0 3F078007C01F000007C01F000007C01F000007C01F000007C01F0000FFFFFFF800FFFFFF F80007C01F000007C01F000007C01F000007C01F000007C01F000007C01F000007C01F00 0007C01F000007C01F000007C01F000007C01F000007C01F000007C01F000007C01F0000 07C01F000007C01F00003FF8FFF0003FF8FFF0002220809F1F>11 D45 D<387CFEFEFE7C3807077C860F>I<01FC0007FF 001F07C01E03C03E03E07C01F07C01F07C01F0FC01F8FC01F8FC01F8FC01F8FC01F8FC01 F8FC01F8FC01F8FC01F8FC01F8FC01F8FC01F8FC01F87C01F07C01F07C01F03E03E01E03 C01F8FC007FF0001FC00151D7E9C1A>48 D<00E00001E0000FE000FFE000F3E00003E000 03E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E00003E000 03E00003E00003E00003E00003E00003E00003E00003E00003E000FFFF80FFFF80111D7C 9C1A>I<07F0001FFE00383F007C1F80FE0FC0FE0FC0FE0FE0FE07E07C07E03807E0000F E0000FC0000FC0001F80001F00003E0000780000F00000E00001C0000380600700600E00 601C00E01FFFC03FFFC07FFFC0FFFFC0FFFFC0131D7D9C1A>I<01FC0007FF000E0F801E 0FC03F07E03F07E03F07E03F07E01E0FC0000FC0000F80001F0001FC0001FC00000F8000 07C00003E00003F00003F83803F87C03F8FE03F8FE03F8FE03F0FC03F07807E03C0FC01F FF8003FC00151D7E9C1A>I<0001C00003C00007C00007C0000FC0001FC0003BC00073C0 0063C000C3C00183C00383C00703C00E03C00C03C01803C03803C07003C0E003C0FFFFFE FFFFFE0007C00007C00007C00007C00007C00007C000FFFE00FFFE171D7F9C1A>I<3803 803FFF803FFF003FFE003FFC003FF0003F800030000030000030000030000033F80037FE 003C1F00380F801007C00007C00007E00007E07807E0FC07E0FC07E0FC07E0FC07C0780F C0600F80381F001FFC0007F000131D7D9C1A>I<003F0001FFC007E0E00F81E01F03F01E 03F03E03F07C03F07C01E07C0000FC1000FCFF00FDFFC0FD03E0FE01F0FE01F0FC01F8FC 01F8FC01F8FC01F87C01F87C01F87C01F83C01F03E01F01E03E00F07C007FF8001FE0015 1D7E9C1A>I<6000007FFFF87FFFF87FFFF07FFFE07FFFC0E00180C00300C00300C00600 000C0000180000380000380000780000700000F00000F00001F00001F00001F00001F000 03F00003F00003F00003F00003F00003F00001E00000C000151E7D9D1A>I<01FC0007FF 000F07801E03C01C01E03C01E03C01E03E01E03F01E03FC3C01FE3801FFF000FFE0007FF 8007FFC01FFFE03C3FF0780FF07803F8F001F8F000F8F00078F00078F000707800707C00 E03E03C00FFF8003FC00151D7E9C1A>I<01FC000FFF001F07803E03C07C03E07C01E0FC 01F0FC01F0FC01F0FC01F8FC01F8FC01F8FC01F87C03F87C03F83E05F81FFDF807F9F800 41F80001F03C01F07E01F07E03E07E03E07E07C03C0780381F001FFC0007F000151D7E9C 1A>I<07F8001FFE00381F80780F80FC0FC0FC0FC0FC0FC0780FC0301F80001F00003E00 007C0000700000E00000E00000C00000C00000C00000C00000C00000C000000000000000 00000000000001C00003E00007F00007F00007F00003E00001C00012207D9F19>63 D<0000E000000000E000000001F000000001F000000001F000000003F800000003F80000 0006FC00000006FC0000000EFE0000000C7E0000000C7E000000183F000000183F000000 303F800000301F800000701FC00000600FC00000600FC00000C007E00000FFFFE00001FF FFF000018003F000018003F000030001F800030001F800060001FC00060000FC000E0000 FE00FFE00FFFE0FFE00FFFE0231F7E9E28>65 D<0007FC02003FFF0E00FE03DE03F000FE 07E0003E0FC0001E1F80001E3F00000E3F00000E7F0000067E0000067E000006FE000000 FE000000FE000000FE000000FE000000FE000000FE0000007E0000007E0000067F000006 3F0000063F00000C1F80000C0FC0001807E0003803F0007000FE01C0003FFF800007FC00 1F1F7D9E26>67 D69 DI<03FC080FFF381E03F83800F8 700078700038F00038F00018F00018F80000FC00007FC0007FFE003FFF801FFFE00FFFF0 07FFF000FFF80007F80000FC00007C00003CC0003CC0003CC0003CE00038E00078F80070 FE01E0E7FFC081FF00161F7D9E1D>83 D<07FC001FFF003F0F803F07C03F03E03F03E00C 03E00003E0007FE007FBE01F03E03C03E07C03E0F803E0F803E0F803E0FC05E07E0DE03F F8FE0FE07E17147F9319>97 DI<01FE0007FF801F0FC03E0FC03E0FC07C0FC07C0300FC0000FC0000FC 0000FC0000FC0000FC00007C00007E00003E00603F00C01F81C007FF0001FC0013147E93 17>I<0007F80007F80000F80000F80000F80000F80000F80000F80000F80000F80000F8 0000F801F8F80FFEF81F83F83E01F87E00F87C00F87C00F8FC00F8FC00F8FC00F8FC00F8 FC00F8FC00F87C00F87C00F87E00F83E01F81F07F80FFEFF03F8FF18207E9F1D>I<01FE 0007FF800F83C01E01E03E00F07C00F07C00F8FC00F8FFFFF8FFFFF8FC0000FC0000FC00 007C00007C00003E00181E00180F807007FFE000FF8015147F9318>I<01FC3C07FFFE0F 079E1E03DE3E03E03E03E03E03E03E03E03E03E01E03C00F07800FFF0009FC0018000018 00001C00001FFF800FFFF007FFF81FFFFC3C007C70003EF0001EF0001EF0001E78003C78 003C3F01F80FFFE001FF00171E7F931A>103 DI<1C003E007F007F007F003E001C0000000000000000 0000000000FF00FF001F001F001F001F001F001F001F001F001F001F001F001F001F001F 001F001F00FFE0FFE00B217EA00E>I107 DIII<01FF0007FFC01F83F03E00F83E00F87C007C7C007CFC007EFC007EFC007E FC007EFC007EFC007E7C007C7C007C3E00F83E00F81F83F007FFC001FF0017147F931A> II<01F81807FE381F87783F01F83E 01F87E00F87C00F8FC00F8FC00F8FC00F8FC00F8FC00F8FC00F87C00F87E00F87E00F83F 01F81F87F80FFEF803F8F80000F80000F80000F80000F80000F80000F80000F80007FF00 07FF181D7E931C>II<0FE63FFE701E600EE006E006F800FFC07FF83FFC1FFE03FE001FC007C007E007 F006F81EFFFCC7F010147E9315>I<01800180018003800380038007800F803F80FFFCFF FC0F800F800F800F800F800F800F800F800F800F800F860F860F860F860F8607CC03F801 F00F1D7F9C14>IIIIII E /Fq 74 123 df<007F07F001FF1FF003FF3FF00780780007 0070000F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F00F000FFF8FF80FF F8FF80FFF8FF800F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F 00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F00F0000F 00F0001C20809F1B>11 D<00F8F001F8F003F8F00780F00700F00F00F00F00F00F00F00F 00F00F00F00F00F00F00F0FFF8F0FFF8F0FFF8F00F00F00F00F00F00F00F00F00F00F00F 00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F00F014 20809F18>13 D<007C000000FE000001FF000003C78000038780000383C0000783C00007 03C0000703C0000783C00007878000078F8000078F0000079E000003BC008003F800E003 F001E003E001C007E001C00FF003C01EF003803CF8078078780700787C0F00F03E0E00F0 1F1E00F01F3C00F00FF800F807F0007803E0007C0FF8303FFFFFF01FFE3FF007F00FC01C 227EA022>38 D<007000E001C00380078007000E001E001E003C003C003C007800780078 0078007000F000F000F000F000F000F000F000F000F000F000F000F00070007800780078 0078003C003C003C001E001E000E0007000780038001C000E000700C2E7EA112>40 DI<018001C001800180 C183E187F99F7DBE1FF807E007E01FF87DBEF99FE187C1830180018001C0018010147DA1 17>I<000600000006000000060000000600000006000000060000000600000006000000 060000000600000006000000060000000600000006000000060000FFFFFFF0FFFFFFF000 060000000600000006000000060000000600000006000000060000000600000006000000 06000000060000000600000006000000060000000600001C207D9A23>I<787878781830 306060E0050A7D830D>III<03F0 0007F8001FFE001E1E003C0F00380700780780780780700380F003C0F003C0F003C0F003 C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C07807807807 807807803807003C0F001E1E001FFE000FFC0003F00012207E9E17>48 D<00C001C00FC0FFC0FFC0F3C003C003C003C003C003C003C003C003C003C003C003C003 C003C003C003C003C003C003C003C003C003C003C0FFFEFFFEFFFE0F1F7C9E17>I<07F0 000FFC001FFE00383F00700F00600780E00780E003C04003C04003C00003C00003C00003 C0000780000780000F00000E00001C00003C0000780000E00001C0000380000700000E00 001C0000380000700000FFFFC0FFFFC0FFFFC0121F7E9E17>I<03F0000FFC001FFE003C 1F00780F00300780200780000780000780000780000F00000F00003E0003FC0003F80003 FC00001E00000F000007800003800003C00003C00003C00003C08003C0C003C0C0078070 0F807C1F003FFE000FFC0003F00012207E9E17>I<003E00003E00005E00005E0000DE00 01DE00019E00039E00039E00079E00071E000F1E000E1E001E1E003C1E003C1E00781E00 781E00F01E00FFFFF0FFFFF0FFFFF0001E00001E00001E00001E00001E00001E00001E00 001E00141E7F9D17>I<7FFF007FFF007FFF007800007800007800007800007800007800 0078000079F0007FFC007FFE007F1F007C07007C07807807800003C00003C00003C00003 C00003C00003C00003C0400780600780F00F007C1E003FFC001FF80007E000121F7E9D17 >I<007C0001FE0003FE000782000F00001E00003C00003C000078000078000078F800F3 FC00F7FE00FE1F00FC0F80F80780F80780F003C0F003C0F003C0F003C0F003C07003C078 03C07803C07807803807803C0F001E1E000FFE0007F80001F00012207E9E17>I<03F000 0FFC001FFE003E1F003C0F007807807807807807807807807807807807803C0F001E1E00 0FFC0007F8000FFC001F3E003C0F00780780780780F003C0F003C0F003C0F003C0F003C0 F003C07807807C0F803E1F001FFE000FFC0003F00012207E9E17>56 D<03F00007F8000FFC001E1E003C0F00780700780780F00780F00380F003C0F003C0F003 C0F003C0F003C0F003C07807C07807C07C0FC03E1FC01FFBC00FF3C007C7800007800007 80000700000F00001E00201E00307C007FF8003FF0000FC00012207E9E17>II61 D<001F0000001F0000003F8000003B8000003B8000007BC0000073C00000 71C00000F1E00000E1E00000E0E00001E0F00001E0F00001C0F00003C0780003C0780003 80780007803C0007803C0007003C000FFFFE000FFFFE000FFFFE001E000F001E000F003C 000F803C0007803C000780780007C0780003C0780003C0F00003E01B207F9F1E>65 DI<001FC000 FFF801FFFC03E03C07800C0F00001E00003E00003C00007C0000780000780000780000F0 0000F00000F00000F00000F00000F00000F00000F000007800007800007800007C00003C 00003E00001E00000F000207800E03E03E01FFFC00FFF0001FC017227DA01D>IIII<001FE000FFF801FFFE03E03E07800E0F0000 1E00003E00003C00007C0000780000780000780000F00000F00000F00000F00000F00000 F00000F003FEF003FE7803FE78001E78001E7C001E3C001E3E001E1E001E0F001E07801E 03E03E01FFFE00FFF8001FC017227DA01E>III75 DIII<003F000000FF C00003FFF00007E1F8000F807C001F003E001E001E003C000F003C000F00780007807800 078078000780F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F000 03C0F00003C0F80007C07800078078000780780007803C000F003C000F001E001E001F00 3E000F807C0007E1F80003FFF00000FFC000003F00001A227DA021>II<003F000000FFC00003FFF000 07E1F8000F807C001F003E001E001E003C000F003C000F00780007807800078078000780 F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0F00003C0 F00003C07800078078000780781E07803C0F0F003C0F8F001E079E001F03FE000F83FC00 07E1F80003FFF00000FFF800003F780000007C0000003E0000001E0000001F0000000F80 1A277DA021>II<01FC0007FF800FFFC01F03C03C00C03C00007800007800007800007800007800007C 00003C00003F00001FE0000FFC0007FE0001FF00003F800007C00003C00003E00001E000 01E00001E00001E00001E00001C0C003C0F007C0FC0F807FFF001FFE0003F80013227EA0 19>IIIII<780007807C000F003E001F001E001E000F003C000F807C000780780003C0 F00003E1F00001F1E00000F3C000007FC000007F8000003F0000001F0000001E0000003F 0000007F8000007FC00000F3C00001F1E00001E0F00003C0F80007C0780007803C000F00 3E001F001E001E000F003C000F807C0007C0780003C0F00003E01B207F9F1E>IIII93 D<07E03FF87FFC701E401F000F000F000F003F07FF 1FFF7E0FF80FF00FF00FF00FF83F7FFF3FEF1F8F10147E9316>97 DI<03F00FFC 1FFE3E0E3C0278007800F000F000F000F000F000F000780078003C013E0F1FFF0FFE03F0 10147E9314>I<0007800007800007800007800007800007800007800007800007800007 8000078000078007C7800FF7801FFF803E1F807C0780780780F80780F00780F00780F007 80F00780F00780F00780F00780780780780F803E1F801FFF800FF78007C78011207E9F17 >I<03F0000FFC001FFE003E1F003C0700780700700380FFFF80FFFF80FFFF80F00000F0 0000F000007000007800003C01003E07001FFF0007FE0001F80011147F9314>I<007E01 FE03FE078007000F000F000F000F000F000F000F00FFF0FFF0FFF00F000F000F000F000F 000F000F000F000F000F000F000F000F000F000F000F000F000F20809F0E>I<03E0F00F FFF01FFFF03E3E003C1E00780F00780F00780F00780F00780F003C1E003E3E001FFC003F F80033E0003000003800003FFE003FFF801FFFC03FFFE07803F0F000F0F000F0F000F0F8 01F07E07E03FFFC00FFF0003FC00141E7F9317>III<01E001E001E001E00000000000 000000000000000000000001E001E001E001E001E001E001E001E001E001E001E001E001 E001E001E001E001E001E001E001E001E001E001E001E001E0C3C0FFC0FF803F000B2983 9F0C>IIIII<01F80007FE001FFF 803F0FC03C03C07801E07801E0F000F0F000F0F000F0F000F0F000F0F000F07801E07801 E03C03C03F0FC01FFF8007FE0001F80014147F9317>II<03C7800FF7801FFF803E1F807C0F80780780780780F00780F00780 F00780F00780F00780F00780F807807807807C0F803E1F801FFF800FF78007C780000780 000780000780000780000780000780000780000780000780111D7E9317>II<07F01FFC3FFC780C7800780078007C003FC01FF00FF803F8007C003C003C C03CF07CFFF87FF00FC00E147F9311>I<1E001E001E001E001E001E00FFF0FFF0FFF01E 001E001E001E001E001E001E001E001E001E001E001E001E001E201FF00FF007C00C1A7F 9910>IIII<7801E07C03C03E07801E0F 000F0F00079E0003FC0003F80001F80000F00001F00001F80003FC00079E000F0F000E0F 001E07803C03C07801E0F801F01414809315>II<7FFF7FFF7FFF003E003C007800F800F001E003E007C007800F001F001E00 3C007C00FFFFFFFFFFFF10147F9314>I E /Fr 45 122 df<000FF01FE0003FF07FE000 FFF0FFE001FFF1FFE001F003F00003E003E00003C007C00007C007C00007C007C00007C0 07C00007C007C00007C007C00007C007C00007C007C00007C007C000FFFF07FF00FFFF07 FF00FFFF07FF0007C007C00007C007C00007C007C00007C007C00007C007C00007C007C0 0007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C000 07C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007C007C00007 C007C00007C007C00007C007C00007C007C000232A7FA923>11 D45 DI<007F000001FFC00007FFF0000FFFF8000FC1F8 001F007C003F007E003E003E003C001E007C001F007C001F007C001F0078000F00F8000F 80F8000F80F8000F80F8000F80F8000F80F8000F80F8000F80F8000F80F8000F80F8000F 80F8000F80F8000F80F8000F80F8000F80F8000F8078000F007C001F007C001F007C001F 003E003E003E003E003F007E001F80FC000FC1F8000FFFF80007FFF00001FFC000007F00 0019297EA71E>48 D<00180000380000F80007F800FFF800FFF800F8F80000F80000F800 00F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F800 00F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F80000F800 00F80000F80000F80000F8007FFFF07FFFF07FFFF014287BA71E>I<00FE0003FFC007FF E00FFFF01F03F83C00FC38007E78003E70003EF0001FF0001F60001F20001F00001F0000 1F00001F00003E00003E00007C00007C0000F80001F00001E00003C0000780000F00001E 00003C0000780000F00001E00003C0000780000F00001E00003C00007FFFFF7FFFFF7FFF FF7FFFFF18287EA71E>I<007F000001FFC00007FFF0000FFFF8001FC1F8003E007C003C 003E0078003E0038003E0010003E0000003E0000003E0000003C0000007C000000FC0000 01F8000007F00000FFE00000FFC00000FFE00000FFF0000001FC0000007C0000003E0000 001F0000001F0000000F8000000F8000000F8000000F8000000F8040000F8060001F00F0 001F00F8003F007E007E003F81FC001FFFF8000FFFF00003FFE000007F000019297EA71E >I<0003F0000007F0000005F000000DF000000DF000001DF0000039F0000039F0000079 F0000079F00000F1F00000F1F00001E1F00003E1F00003E1F00007C1F00007C1F0000F81 F0000F81F0001F01F0001F01F0003E01F0007C01F0007C01F000F801F000FFFFFF80FFFF FF80FFFFFF80FFFFFF800001F0000001F0000001F0000001F0000001F0000001F0000001 F0000001F0000001F0000001F00019277EA61E>I<3FFFFC3FFFFC3FFFFC3FFFFC3E0000 3E00003E00003E00003E00003E00003E00003E00003E00003E00003E3F003EFFC03FFFE0 3FFFF03FE1F83F807C3F003E3E003E00003E00001F00001F00001F00001F00001F00001F 00001F20001F60003E70003EF8007C7C00FC3F03F81FFFF00FFFE007FF8000FE0018287E A61E>I<000FF000003FFC0000FFFC0001FFFC0003F80C0007E000000FC000000F800000 1F0000001E0000003E0000003C0000007C0000007C0000007C3FE000F8FFF000F9FFF800 FBFFFC00FF807E00FF003E00FE003F00FC001F00FC001F00FC000F80F8000F80F8000F80 F8000F80F8000F8078000F807C000F807C000F807C000F003E001F003E001F001F003E00 1F807C000FC1FC0007FFF80003FFF00001FFC000007F000019297EA71E>II<007F000001FFC00007FFF0000FFFF8001FC1FC003F00 7E003E003E007E003F007C001F007C001F007C001F007C001F007C001F003E003E003E00 3E001F007C000FC1F80007FFF00003FFE00003FFE0000FFFF8001FC1FC003F007E003E00 3E007C001F007C001F00F8000F80F8000F80F8000F80F8000F80F8000F80F8000F807C00 1F007C001F007E003F003F007E001FC1FC000FFFF80007FFF00003FFE000007F00001929 7EA71E>I<007F000001FFC00003FFE0000FFFF0000FC1F8001F007C003E007C007C003E 007C001E007C001F00F8001F00F8001F00F8000F00F8000F80F8000F80F8000F80F8000F 80F8001F807C001F807C001F807E003F803E007F803F00FF801FFFEF800FFFCF8007FF8F 8003FE1F0000001F0000001F0000001E0000003E0000003E0000007C0000007C000000F8 001801F0001E07E0003FFFC0001FFF80000FFE000003F8000019297EA71E>I66 D<0001FF00000FFFE0003FFFF8007FFFF800FE01F801F8003003F0001007C000000F8000 001F8000001F0000003E0000003E0000007E0000007C0000007C0000007C000000F80000 00F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F80000 007C0000007C0000007C0000007E0000003E0000003E0000001F0000001F8000000F8000 0007C0000003F0000401F8001C00FE00FC007FFFFC003FFFF8000FFFE00001FF001E2C7C AA26>II73 D77 DI<0001FC0000000FFF8000003FFFE0 00007FFFF00001FE03FC0003F800FE0007E0003F0007C0001F000F80000F801F000007C0 1F000007C03E000003E03E000003E07C000001F07C000001F07C000001F078000000F0F8 000000F8F8000000F8F8000000F8F8000000F8F8000000F8F8000000F8F8000000F8F800 0000F8F8000000F8F8000000F87C000001F07C000001F07C000001F07E000003F03E0000 03E03F000007E01F000007C01F80000FC00FC0001F8007E0003F0007F0007F0003F800FE 0001FE03FC0000FFFFF800003FFFE000000FFF80000001FC0000252C7DAA2C>II82 D<007FC00001FFF80007FFFE00 0FFFFF001FC07F003F000F007E0006007C0000007C000000F8000000F8000000F8000000 F8000000F8000000FC0000007E0000007F0000003F8000001FF800000FFF800007FFE000 03FFF80000FFFC00000FFE000000FF0000003F0000001F8000000F8000000FC0000007C0 000007C0000007C0000007C0000007C0000007C000000F8060000F80F0001F00FC003F00 FF80FE007FFFFC001FFFF80007FFE00000FF80001A2C7DAA21>I<01FE000FFF803FFFC0 3FFFE03C03F03001F00001F80000F80000F80000F80000F80000F8007FF807FFF81FFFF8 3FE0F87F00F8FC00F8F800F8F800F8F800F8FC01F87E07F87FFFF83FFFF81FFCF80FE0F8 151B7E9A1D>97 DI<007FC0 01FFF007FFFC0FFFFC1FC07C1F00083E00007C00007C00007C0000F80000F80000F80000 F80000F80000F80000F800007C00007C00007E00003E00001F000C1FC07C0FFFFC07FFFC 01FFF0007F80161B7E9A1B>I<00003E00003E00003E00003E00003E00003E00003E0000 3E00003E00003E00003E00003E00003E00003E00003E00FC3E03FF3E07FFFE0FFFFE1FC1 FE3F007E3E003E7C003E7C003EFC003EF8003EF8003EF8003EF8003EF8003EF8003EF800 3EFC003E7C003E7C003E3E007E3F00FE1FC1FE0FFFFE07FFBE03FF3E00FC3E172A7EA91F >I<007E0003FF8007FFC00FFFE01F83F03F00F03E00787C00787C003878003CFFFFFCFF FFFCFFFFFCFFFFFCF80000F80000F800007800007C00007C00003E00003F000C1FC07C0F FFFC07FFFC01FFF0007F80161B7E9A1B>I<001FC0007FC000FFC001FFC003F00003E000 07C00007C00007C00007C00007C00007C00007C00007C00007C000FFFE00FFFE00FFFE00 07C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C000 07C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C000 122A7FA912>I<00F8078003FE7FC00FFFFFC01FFFFFC01F07C0003E03E0003E03E0007C 01F0007C01F0007C01F0007C01F0007C01F0007C01F0003E03E0003E03E0001F07C0001F FFC0003FFF80003BFE000038F8000078000000780000003C0000003FFFC0003FFFF8001F FFFC001FFFFE003FFFFF007C007F00F8001F80F8000F80F8000F80F8000F80FC001F807E 003F003F80FE003FFFFE000FFFF80007FFF00000FF80001A287E9A1E>III107 DI< F83F003F00F8FFC0FFC0FBFFE3FFE0FFFFF7FFF0FF83F783F0FE01FE01F8FC00FC00F8FC 00FC00F8FC00FC00F8F800F800F8F800F800F8F800F800F8F800F800F8F800F800F8F800 F800F8F800F800F8F800F800F8F800F800F8F800F800F8F800F800F8F800F800F8F800F8 00F8F800F800F8F800F800F8F800F800F8F800F800F8F800F800F8251B7B9A30>II<007F000001FFC00007FFF0000FFFF8001FC1FC003F00 7E003E003E007C001F007C001F0078000F00F8000F80F8000F80F8000F80F8000F80F800 0F80F8000F80F8000F807C001F007C001F007E003F003E003E003F007E001FC1FC000FFF F80007FFF00001FFC000007F0000191B7E9A1E>I I<00FC3E03FF3E07FFBE0FFFFE1FC1FE3F80FE3E007E7E003E7C003E7C003EF8003EF800 3EF8003EF8003EF8003EF8003EF8003EFC003E7C003E7E003E3E007E3F00FE1FC1FE1FFF FE0FFFBE03FF3E01F83E00003E00003E00003E00003E00003E00003E00003E00003E0000 3E00003E00003E00003E17277E9A1F>II<03FC001FFF803FFFC07FFFC07C07C0F80080F80000F80000F80000FC0000 7F80007FF8003FFE001FFF0007FF8000FFC0000FE00007E00003E00003E04003E0E007E0 FC0FC0FFFFC07FFF801FFE0003F800131B7E9A17>I<07C00007C00007C00007C00007C0 0007C00007C000FFFFC0FFFFC0FFFFC007C00007C00007C00007C00007C00007C00007C0 0007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C00007C0 4007E1C003FFE003FFE001FF8000FC0013227FA116>III121 D E /Fs 11 118 df45 D<000000003FFE00000E0000000FFFFF C0001E0000007FFFFFF8003E000003FFFFFFFE00FE00000FFFFFFFFF81FE00003FFFF800 FFC3FE0000FFFF80000FF7FE0001FFFC000003FFFE0007FFF0000001FFFE000FFFC00000 007FFE001FFF800000003FFE003FFF000000001FFE007FFE000000000FFE00FFFC000000 0007FE01FFF80000000007FE03FFF00000000003FE03FFF00000000001FE07FFE0000000 0001FE07FFE00000000000FE0FFFC00000000000FE0FFFC000000000007E1FFFC0000000 00007E1FFF8000000000007E3FFF8000000000007E3FFF8000000000003E3FFF80000000 00003E7FFF8000000000003E7FFF0000000000003E7FFF000000000000007FFF00000000 000000FFFF00000000000000FFFF00000000000000FFFF00000000000000FFFF00000000 000000FFFF00000000000000FFFF00000000000000FFFF00000000000000FFFF00000000 000000FFFF00000000000000FFFF00000000000000FFFF00000000000000FFFF00000000 000000FFFF000000000000007FFF000000000000007FFF000000000000007FFF00000000 0000007FFF8000000000003E3FFF8000000000003E3FFF8000000000003E3FFF80000000 00003E1FFF8000000000003E1FFFC000000000003E0FFFC000000000007C0FFFC0000000 00007C07FFE000000000007C07FFE00000000000F803FFF00000000000F803FFF0000000 0001F801FFF80000000001F000FFFC0000000003E0007FFE0000000007E0003FFF000000 000FC0001FFF800000001F80000FFFC00000003F000007FFF0000000FE000001FFFC0000 01FC000000FFFF80000FF80000003FFFF8007FF00000000FFFFFFFFFC000000003FFFFFF FF00000000007FFFFFFC00000000000FFFFFE00000000000003FFE000000474979C756> 67 D 80 D<0007FFFC000000007FFFFFC0000001FFFFFFF8000003FFFFFFFE000007FE001FFF 000007FF0003FFC0000FFF8001FFE0000FFF8000FFF0000FFF80007FF0000FFF80007FF8 000FFF80007FF80007FF00003FFC0007FF00003FFC0003FE00003FFC0000F800003FFC00 000000003FFC00000000003FFC00000000003FFC00000000003FFC00000007FFFFFC0000 00FFFFFFFC000007FFFFFFFC00003FFFE03FFC0000FFFE003FFC0003FFF0003FFC0007FF C0003FFC000FFF00003FFC001FFE00003FFC003FFC00003FFC007FF800003FFC007FF800 003FFC00FFF000003FFC00FFF000003FFC00FFF000003FFC00FFF000003FFC00FFF00000 3FFC00FFF000007FFC007FF80000FFFC007FF80001EFFC003FFC0003EFFC003FFF0007CF FF000FFFC03F8FFFF807FFFFFF07FFFC01FFFFFC03FFFC007FFFF001FFFC0003FF80007F F8362E7DAD3A>97 D<00001FFFC0000000FFFFF8000007FFFFFE00001FFFFFFF80007FFC 00FFC000FFE001FFC001FFC003FFE003FF8003FFE007FF0003FFE00FFE0003FFE00FFE00 03FFE01FFC0001FFC01FFC0001FFC03FFC0000FF803FFC00003E007FF8000000007FF800 0000007FF800000000FFF800000000FFF800000000FFF800000000FFF800000000FFF800 000000FFF800000000FFF800000000FFF800000000FFF800000000FFF8000000007FF800 0000007FF8000000007FFC000000003FFC000000003FFC000000001FFC000000F81FFE00 0000F80FFE000000F80FFF000001F007FF800003F003FFC00007E001FFE0000FC000FFF0 001F80007FFE00FF00001FFFFFFE000007FFFFF8000000FFFFE00000001FFE00002D2E7C AD35>99 D<00FC0001FE0003FF0007FF800FFFC01FFFE01FFFE01FFFE01FFFE01FFFE01F FFE00FFFC007FF8003FF0001FE0000FC0000000000000000000000000000000000000000 0000000000000000000000000000007FC0FFFFC0FFFFC0FFFFC0FFFFC0FFFFC003FFC001 FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001 FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001 FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC001FFC0FFFFFFFFFFFFFF FFFFFFFFFFFFFFFF18497CC820>105 D<007FC001FFC00000FFE00000FFFFC00FFFF800 07FFFC0000FFFFC03FFFFE001FFFFF0000FFFFC0FFFFFF007FFFFF8000FFFFC1FC07FF80 FE03FFC000FFFFC3E003FFC1F001FFE00003FFC7C001FFC3E000FFE00001FFCF0001FFE7 8000FFF00001FFDE0000FFEF00007FF00001FFDC0000FFEE00007FF00001FFFC0000FFFE 00007FF80001FFF80000FFFC00007FF80001FFF00000FFF800007FF80001FFF00000FFF8 00007FF80001FFF00000FFF800007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF80001FFE00000FFF000007FF80001FFE00000FFF000007FF80001FFE00000FFF0 00007FF800FFFFFFC07FFFFFE03FFFFFF0FFFFFFC07FFFFFE03FFFFFF0FFFFFFC07FFFFF E03FFFFFF0FFFFFFC07FFFFFE03FFFFFF0FFFFFFC07FFFFFE03FFFFFF05C2E7CAD63> 109 D<007FC001FFC00000FFFFC00FFFF80000FFFFC03FFFFE0000FFFFC0FFFFFF0000FF FFC1FC07FF8000FFFFC3E003FFC00003FFC7C001FFC00001FFCF0001FFE00001FFDE0000 FFE00001FFDC0000FFE00001FFFC0000FFF00001FFF80000FFF00001FFF00000FFF00001 FFF00000FFF00001FFF00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF000FFFFFFC07FFFFFE0FFFFFFC07FFFFFE0FFFFFFC07FFFFFE0FFFFFFC07F FFFFE0FFFFFFC07FFFFFE03B2E7CAD42>I<00000FFF0000000000FFFFF000000007FFFF FE0000001FFFFFFF8000003FFC03FFC00000FFE0007FF00001FF80001FF80003FF00000F FC0007FE000007FE000FFE000007FF000FFC000003FF001FFC000003FF803FFC000003FF C03FF8000001FFC03FF8000001FFC07FF8000001FFE07FF8000001FFE07FF8000001FFE0 FFF8000001FFF0FFF8000001FFF0FFF8000001FFF0FFF8000001FFF0FFF8000001FFF0FF F8000001FFF0FFF8000001FFF0FFF8000001FFF0FFF8000001FFF0FFF8000001FFF07FF8 000001FFE07FF8000001FFE07FF8000001FFE07FF8000001FFE03FFC000003FFC03FFC00 0003FFC01FFC000003FF801FFE000007FF800FFE000007FF0007FF00000FFE0003FF8000 1FFC0001FFC0003FF80000FFE0007FF000007FFC03FFE000001FFFFFFF80000007FFFFFE 00000000FFFFF0000000000FFF000000342E7DAD3B>I<0001F000000001F000000001F0 00000001F000000001F000000001F000000003F000000003F000000003F000000007F000 000007F000000007F00000000FF00000000FF00000001FF00000003FF00000003FF00000 007FF0000001FFF0000003FFF000000FFFFFFFC0FFFFFFFFC0FFFFFFFFC0FFFFFFFFC0FF FFFFFFC000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FF F0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0 000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF0000000FFF000 0000FFF0000000FFF0000000FFF001F000FFF001F000FFF001F000FFF001F000FFF001F0 00FFF001F000FFF001F000FFF001F000FFF001F0007FF001E0007FF803E0003FF803E000 3FFC07C0001FFE0F80000FFFFF800007FFFE000001FFFC0000001FF00024427EC12E> 116 D<007FE000003FF000FFFFE0007FFFF000FFFFE0007FFFF000FFFFE0007FFFF000FF FFE0007FFFF000FFFFE0007FFFF00003FFE00001FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000 FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001FFE00000FFF00001 FFE00000FFF00001FFE00000FFF00001FFE00001FFF00001FFE00001FFF00001FFE00001 FFF00001FFE00003FFF00000FFE00007FFF00000FFE0000F7FF000007FE0001F7FF00000 7FF0003E7FF800003FFC00FC7FFFE0001FFFFFF87FFFE00007FFFFE07FFFE00001FFFF80 7FFFE000003FFE007FFFE03B2E7CAD42>I E /Ft 8 117 df<00001E000000003E000000 00FE00000003FE0000003FFE0000FFFFFE0000FFFFFE0000FFFFFE0000FFCFFE0000000F FE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE 0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE00 00000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000 000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE000000 0FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000F FE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE0000000FFE00007FFFFF FFC07FFFFFFFC07FFFFFFFC07FFFFFFFC0223879B731>49 D<0000001FFF000030000001 FFFFE000F000000FFFFFFC01F000007FFFFFFE03F00001FFFE007F87F00003FFE0000FCF F0000FFF000003FFF0001FFC000001FFF0003FF80000007FF0007FF00000003FF000FFC0 0000003FF001FFC00000001FF003FF800000000FF007FF000000000FF00FFF0000000007 F00FFE0000000007F01FFE0000000003F01FFE0000000003F03FFC0000000003F03FFC00 00000001F03FFC0000000001F07FFC0000000001F07FF80000000001F07FF80000000000 007FF8000000000000FFF8000000000000FFF8000000000000FFF8000000000000FFF800 0000000000FFF8000000000000FFF8000000000000FFF8000000000000FFF80000000000 00FFF8000000000000FFF8000000000000FFF80000000000007FF80000000000007FF800 00000000007FF80000000000007FFC0000000000F03FFC0000000000F03FFC0000000000 F03FFC0000000000F01FFE0000000000F01FFE0000000001E00FFE0000000001E00FFF00 00000001E007FF0000000003C003FF8000000003C001FFC0000000078000FFE00000000F 00007FF00000001F00003FF80000003E00001FFC0000007C00000FFF000001F8000003FF E00007F0000001FFFE003FC00000007FFFFFFF000000000FFFFFFC0000000001FFFFF000 000000001FFF0000003C3D7BBB47>67 D<001FFF00000001FFFFF0000003FFFFFC000007 F007FE00000FF801FF00001FFC00FF80001FFC007FC0001FFC007FE0001FFC003FE0000F F8003FF0000FF8003FF00007F0003FF00001C0003FF0000000003FF0000000003FF00000 00003FF0000000FFFFF000000FFFFFF000007FF83FF00001FF803FF00007FE003FF0000F F8003FF0001FF0003FF0003FE0003FF0007FE0003FF0007FE0003FF000FFC0003FF000FF C0003FF000FFC0003FF000FFC0003FF000FFC0007FF0007FE0007FF0007FE000DFF0003F F0039FF8001FFC0F0FFFF007FFFE0FFFF001FFFC07FFF0003FE000FFF02C267DA530>97 D<0001FFC000000FFFF800003FFFFE0000FF80FF0001FE003F8007FC001FC00FF8000FE0 0FF8000FF01FF00007F03FF00007F83FF00007F87FE00007F87FE00003FC7FE00003FC7F E00003FCFFE00003FCFFFFFFFFFCFFFFFFFFFCFFFFFFFFFCFFE0000000FFE0000000FFE0 000000FFE00000007FE00000007FE00000007FE00000003FE00000003FF000003C1FF000 003C1FF000003C0FF800007807FC0000F803FE0001F001FF0007E000FFC03FC0003FFFFF 000007FFFC000000FFE00026267DA52D>101 D<00FF00000000FFFF00000000FFFF0000 0000FFFF00000000FFFF0000000007FF0000000003FF0000000003FF0000000003FF0000 000003FF0000000003FF0000000003FF0000000003FF0000000003FF0000000003FF0000 000003FF0000000003FF0000000003FF0000000003FF0000000003FF0000000003FF0000 000003FF0000000003FF007FC00003FF01FFF80003FF07FFFC0003FF0F03FE0003FF1C01 FF0003FF3001FF8003FF6000FF8003FFE000FFC003FFC000FFC003FF8000FFC003FF8000 FFC003FF8000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000 FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000 FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000 FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC003FF0000FFC0FFFFFC3F FFFFFFFFFC3FFFFFFFFFFC3FFFFFFFFFFC3FFFFF303C7CBB37>104 D<00FF01FF8000FFFF0FFFF000FFFF3FFFFC00FFFFFE03FF00FFFFF000FF8003FFC0007F C003FF80003FE003FF00003FF003FF00001FF803FF00001FFC03FF00000FFC03FF00000F FE03FF00000FFE03FF000007FE03FF000007FF03FF000007FF03FF000007FF03FF000007 FF03FF000007FF03FF000007FF03FF000007FF03FF000007FF03FF000007FF03FF000007 FE03FF000007FE03FF00000FFE03FF00000FFC03FF00000FFC03FF00001FF803FF00001F F803FF00003FF003FF80003FE003FFC0007FC003FFF001FF8003FFFC07FF0003FF3FFFFC 0003FF0FFFF00003FF01FF000003FF0000000003FF0000000003FF0000000003FF000000 0003FF0000000003FF0000000003FF0000000003FF0000000003FF0000000003FF000000 0003FF0000000003FF0000000003FF00000000FFFFFC000000FFFFFC000000FFFFFC0000 00FFFFFC00000030377DA537>112 D<00FE03F000FFFE0FFE00FFFE1FFF00FFFE3C3F80 FFFE707FC007FE60FFE003FEE0FFE003FEC0FFE003FFC0FFE003FF807FC003FF807FC003 FF803F8003FF800E0003FF00000003FF00000003FF00000003FF00000003FF00000003FF 00000003FF00000003FF00000003FF00000003FF00000003FF00000003FF00000003FF00 000003FF00000003FF00000003FF00000003FF00000003FF00000003FF00000003FF0000 0003FF000000FFFFFE0000FFFFFE0000FFFFFE0000FFFFFE000023267DA529>114 D<0007800000078000000780000007800000078000000F8000000F8000000F8000000F80 00001F8000001F8000003F8000003F8000007F800000FF800001FF800007FF80001FFFFF F0FFFFFFF0FFFFFFF0FFFFFFF001FF800001FF800001FF800001FF800001FF800001FF80 0001FF800001FF800001FF800001FF800001FF800001FF800001FF800001FF800001FF80 0001FF800001FF800001FF800001FF800001FF803C01FF803C01FF803C01FF803C01FF80 3C01FF803C01FF803C01FF803C00FF807800FFC078007FC070003FE0E0001FFFC00007FF 800001FF001E377EB626>116 D E /Fu 81 125 df<001F83E000F06E3001C078780380 F8780300F03007007000070070000700700007007000070070000700700007007000FFFF FF8007007000070070000700700007007000070070000700700007007000070070000700 700007007000070070000700700007007000070070000700700007007000070070000700 70007FE3FF001D20809F1B>11 D<003F0000E0C001C0C00381E00701E00701E007000007 0000070000070000070000070000FFFFE00700E00700E00700E00700E00700E00700E007 00E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E00700E07F C3FE1720809F19>I<003FE000E0E001C1E00381E00700E00700E00700E00700E00700E0 0700E00700E00700E0FFFFE00700E00700E00700E00700E00700E00700E00700E00700E0 0700E00700E00700E00700E00700E00700E00700E00700E00700E00700E07FE7FE172080 9F19>I<001F81F80000F04F040001C07C06000380F80F000300F00F000700F00F000700 70000007007000000700700000070070000007007000000700700000FFFFFFFF00070070 070007007007000700700700070070070007007007000700700700070070070007007007 000700700700070070070007007007000700700700070070070007007007000700700700 0700700700070070070007007007007FE3FE3FF02420809F26>I<7038F87CFC7EFC7E74 3A0402040204020804080410081008201040200F0E7E9F17>34 D<007800000084000001 840000030200000702000007020000070200000702000007040000070400000708000007 0800000310000003A00FFC03C003E0038001C001C0008001C0010003E0010004E0020008 F00200187004003078080070380800701C1000F01E1000F00E2000F0074000F003C00870 03C0087801C010380670301C18386007E00F801E227EA023>38 D<70F8FCFC7404040408 0810102040060E7C9F0D>I<0020004000800100020006000C000C001800180030003000 30007000600060006000E000E000E000E000E000E000E000E000E000E000E000E0006000 600060007000300030003000180018000C000C000600020001000080004000200B2E7DA1 12>I<800040002000100008000C00060006000300030001800180018001C000C000C000 C000E000E000E000E000E000E000E000E000E000E000E000E000C000C000C001C0018001 80018003000300060006000C00080010002000400080000B2E7DA112>I<000600000006 000000060000000600000006000000060000000600000006000000060000000600000006 000000060000000600000006000000060000FFFFFFF0FFFFFFF000060000000600000006 000000060000000600000006000000060000000600000006000000060000000600000006 00000006000000060000000600001C207D9A23>43 D<70F8FCFC74040404080810102040 060E7C840D>II<70F8F8F87005057C840D>I<00010003000300 0600060006000C000C000C00180018001800300030003000600060006000C000C000C001 80018001800300030003000600060006000C000C000C0018001800180030003000300060 0060006000C000C000C000102D7DA117>I<03F0000E1C001C0E00180600380700700380 700380700380700380F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0F003C0 F003C0F003C0F003C0F003C07003807003807003807807803807001806001C0E000E1C00 03F000121F7E9D17>I<018003800F80F380038003800380038003800380038003800380 03800380038003800380038003800380038003800380038003800380038007C0FFFE0F1E 7C9D17>I<03F0000C1C00100E00200700400780800780F007C0F803C0F803C0F803C020 07C00007C0000780000780000F00000E00001C0000380000700000600000C00001800003 00000600400C00401800401000803FFF807FFF80FFFF80121E7E9D17>I<03F0000C1C00 100E00200F00780F80780780780780380F80000F80000F00000F00000E00001C00003800 03F000003C00000E00000F000007800007800007C02007C0F807C0F807C0F807C0F00780 400780400F00200E001C3C0003F000121F7E9D17>I<000600000600000E00000E00001E 00002E00002E00004E00008E00008E00010E00020E00020E00040E00080E00080E00100E 00200E00200E00400E00C00E00FFFFF0000E00000E00000E00000E00000E00000E00000E 0000FFE0141E7F9D17>I<1803001FFE001FFC001FF8001FE00010000010000010000010 000010000010000011F000161C00180E001007001007800003800003800003C00003C000 03C07003C0F003C0F003C0E00380400380400700200600100E000C380003E000121F7E9D 17>I<007C000182000701000E03800C07801C0780380300380000780000700000700000 F1F000F21C00F40600F80700F80380F80380F003C0F003C0F003C0F003C0F003C07003C0 7003C07003803803803807001807000C0E00061C0001F000121F7E9D17>I<4000007FFF C07FFF807FFF804001008002008002008004000008000008000010000020000020000040 0000400000C00000C00001C0000180000380000380000380000380000780000780000780 00078000078000078000078000030000121F7D9D17>I<03F0000C0C0010060030030020 01806001806001806001807001807803003E03003F06001FC8000FF00003F80007FC000C 7E00103F00300F806003804001C0C001C0C000C0C000C0C000C0C0008060018020010010 02000C0C0003F000121F7E9D17>I<03F0000E18001C0C00380600380700700700700380 F00380F00380F003C0F003C0F003C0F003C0F003C07007C07007C03807C0180BC00E13C0 03E3C0000380000380000380000700300700780600780E00700C002018001070000FC000 121F7E9D17>I<70F8F8F8700000000000000000000070F8F8F87005147C930D>I<70F8F8 F8700000000000000000000070F0F8F878080808101010202040051D7C930D>I<7FFFFF E0FFFFFFF000000000000000000000000000000000000000000000000000000000000000 00FFFFFFF07FFFFFE01C0C7D9023>61 D<0FC0307040384038E03CF03CF03C603C003800 7000E000C001800180010003000200020002000200020002000000000000000000000007 000F800F800F8007000E207D9F15>63 D<000100000003800000038000000380000007C0 000007C0000007C0000009E0000009E0000009E0000010F0000010F0000010F000002078 00002078000020780000403C0000403C0000403C0000801E0000801E0000FFFE0001000F 0001000F0001000F00020007800200078002000780040003C00E0003C01F0007E0FFC03F FE1F207F9F22>65 DI<000FC040 007030C001C009C0038005C0070003C00E0001C01E0000C01C0000C03C0000C07C000040 7C00004078000040F8000000F8000000F8000000F8000000F8000000F8000000F8000000 F8000000F8000000780000007C0000407C0000403C0000401C0000401E0000800E000080 070001000380020001C0040000703800000FC0001A217D9F21>II II<000FE0200078186000E004E0 038002E0070001E00F0000E01E0000601E0000603C0000603C0000207C00002078000020 F8000000F8000000F8000000F8000000F8000000F8000000F8000000F8007FFCF80003E0 780001E07C0001E03C0001E03C0001E01E0001E01E0001E00F0001E0070001E0038002E0 00E0046000781820000FE0001E217D9F24>III76 DII<001F800000F0F00001C0380007801E000F000F000E0007001E0007803C00 03C03C0003C07C0003E0780001E0780001E0F80001F0F80001F0F80001F0F80001F0F800 01F0F80001F0F80001F0F80001F0F80001F0780001E07C0003E07C0003E03C0003C03C00 03C01E0007800E0007000F000F0007801E0001C0380000F0F000001F80001C217D9F23> II<001F800000F0F00001C03800 07801E000F000F000E0007001E0007803C0003C03C0003C07C0003E07C0003E0780001E0 F80001F0F80001F0F80001F0F80001F0F80001F0F80001F0F80001F0F80001F0F80001F0 780001E0780001E07C0003E03C0003C03C0F03C01E1087800E2047000F204F0007A03E00 01E0380000F0F010001FB01000003010000038300000387000003FF000001FE000001FE0 00000FC0000007801C297D9F23>II<07E0800C1980100780300380600180600180E00180E00080E00080E00080 F00000F000007800007F00003FF0001FFC000FFE0003FF00001F800007800003C00003C0 0001C08001C08001C08001C08001C0C00180C00380E00300F00600CE0C0081F80012217D 9F19>I<7FFFFFE0780F01E0600F0060400F0020400F0020C00F0030800F0010800F0010 800F0010800F0010000F0000000F0000000F0000000F0000000F0000000F0000000F0000 000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000 000F0000000F0000000F0000001F800007FFFE001C1F7E9E21>IIII<7FF83FF80FE00FC0 07C0070003C0020001E0040001F00C0000F0080000781000007C1000003C2000003E4000 001E4000000F8000000F8000000780000003C0000007E0000005E0000009F0000018F800 0010780000207C0000603C0000401E0000801F0001800F0001000780020007C0070003C0 1F8007E0FFE01FFE1F1F7F9E22>I91 D<080410082010201040204020804080408040B85CFC7EFC7E7C3E381C0F0E7B9F17>I< FEFE06060606060606060606060606060606060606060606060606060606060606060606 06060606060606FEFE072D7FA10D>I<1FE000303000781800781C00300E00000E00000E 00000E0000FE00078E001E0E00380E00780E00F00E10F00E10F00E10F01E10781E103867 200F83C014147E9317>97 D<0E0000FE00000E00000E00000E00000E00000E00000E0000 0E00000E00000E00000E00000E3E000EC3800F01C00F00E00E00E00E00700E00700E0078 0E00780E00780E00780E00780E00780E00700E00700E00E00F00E00D01C00CC300083E00 15207F9F19>I<03F80E0C1C1E381E380C70007000F000F000F000F000F000F000700070 00380138011C020E0C03F010147E9314>I<000380003F80000380000380000380000380 00038000038000038000038000038000038003E380061B801C0780380380380380700380 700380F00380F00380F00380F00380F00380F003807003807003803803803807801C0780 0E1B8003E3F815207E9F19>I<03F0000E1C001C0E00380700380700700700700380F003 80F00380FFFF80F00000F00000F000007000007000003800801800800C010007060001F8 0011147F9314>I<007C00C6018F038F07060700070007000700070007000700FFF00700 070007000700070007000700070007000700070007000700070007000700070007007FF0 1020809F0E>I<0000E003E3300E3C301C1C30380E00780F00780F00780F00780F00780F 00380E001C1C001E380033E0002000002000003000003000003FFE001FFF800FFFC03001 E0600070C00030C00030C00030C000306000603000C01C038003FC00141F7F9417>I<0E 0000FE00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E 3E000E43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E 01C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC16207F9F19>I<1C001E003E00 1E001C000000000000000000000000000E007E000E000E000E000E000E000E000E000E00 0E000E000E000E000E000E000E000E000E00FFC00A1F809E0C>I<00E001F001F001F000 E0000000000000000000000000007007F000F00070007000700070007000700070007000 700070007000700070007000700070007000700070007000706070F060F0C061803F000C 28829E0E>I<0E0000FE00000E00000E00000E00000E00000E00000E00000E00000E0000 0E00000E00000E0FF00E03C00E03000E02000E04000E08000E10000E30000E70000EF800 0F38000E1C000E1E000E0E000E07000E07800E03800E03C00E03E0FFCFF815207F9F18> I<0E00FE000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00B20809F0C>I< 0E1F01F000FE618618000E81C81C000F00F00E000F00F00E000E00E00E000E00E00E000E 00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00 E00E000E00E00E000E00E00E000E00E00E000E00E00E00FFE7FE7FE023147F9326>I<0E 3E00FE43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E 01C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC16147F9319>I<01F800070E00 1C03803801C03801C07000E07000E0F000F0F000F0F000F0F000F0F000F0F000F07000E0 7000E03801C03801C01C0380070E0001F80014147F9317>I<0E3E00FEC3800F01C00F00 E00E00E00E00F00E00700E00780E00780E00780E00780E00780E00780E00700E00F00E00 E00F01E00F01C00EC3000E3E000E00000E00000E00000E00000E00000E00000E00000E00 00FFE000151D7F9319>I<03E0800619801C05803C0780380380780380700380F00380F0 0380F00380F00380F00380F003807003807803803803803807801C0B800E138003E38000 0380000380000380000380000380000380000380000380003FF8151D7E9318>I<0E78FE 8C0F1E0F1E0F0C0E000E000E000E000E000E000E000E000E000E000E000E000E000E00FF E00F147F9312>I<1F9030704030C010C010C010E00078007F803FE00FF0007080388018 8018C018C018E030D0608F800D147E9312>I<020002000200060006000E000E003E00FF F80E000E000E000E000E000E000E000E000E000E000E000E080E080E080E080E08061003 1001E00D1C7F9B12>I<0E01C0FE1FC00E01C00E01C00E01C00E01C00E01C00E01C00E01 C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E03C00603C0030DC001F1FC1614 7F9319>II< FF9FE1FC3C0780701C0300601C0380200E0380400E0380400E03C0400707C0800704C080 0704E080038861000388710003C8730001D0320001D03A0000F03C0000E01C0000E01C00 00601800004008001E147F9321>I<7FC3FC0F01E00701C007018003810001C20000E400 00EC00007800003800003C00007C00004E000087000107000303800201C00601E01E01E0 FF07FE1714809318>II<3FFF380E 200E201C40384078407000E001E001C00380078007010E011E011C0338027006700EFFFE 10147F9314>III E /Fv 45 122 df<70F8FCFC7404040404080810102040060F7C840E>44 DI<70F8F8F87005057C840E>I<01F000071C000C060018030038 03803803807001C07001C07001C07001C0F001E0F001E0F001E0F001E0F001E0F001E0F0 01E0F001E0F001E0F001E0F001E0F001E0F001E0F001E07001C07001C07001C07803C038 03803803801C07000C0600071C0001F00013227EA018>48 D<008003800F80F380038003 800380038003800380038003800380038003800380038003800380038003800380038003 80038003800380038003800380038007C0FFFE0F217CA018>I<03F8000C1E0010070020 07804007C07807C07803C07807C03807C0000780000780000700000F00000E0000380003 F000001C00000F000007800007800003C00003C00003E02003E07003E0F803E0F803E0F0 03C04003C0400780200780100F000C1C0003F00013227EA018>51 D<000200000600000E00000E00001E00001E00002E00004E00004E00008E00008E00010E 00020E00020E00040E00040E00080E00100E00100E00200E00200E00400E00800E00FFFF F8000E00000E00000E00000E00000E00000E00000E00001F0001FFF015217FA018>I<10 00801E07001FFF001FFE001FF80013E00010000010000010000010000010000010000010 F800130E001407001803801003800001C00001C00001E00001E00001E00001E07001E0F0 01E0F001E0E001C08001C04003C04003802007001006000C1C0003F00013227EA018>I< 007E0001C1000300800601C00E03C01C03C0180180380000380000780000700000700000 F0F800F30C00F40600F40300F80380F801C0F001C0F001E0F001E0F001E0F001E0F001E0 7001E07001E07001E03801C03801C01803801C03000C0600070C0001F00013227EA018> I<01F800060E000803001001802001802000C06000C06000C06000C07000C07801803E01 003F02001FC4000FF80003F80003FC00067F00083F80100F803007C06001C06000E0C000 E0C00060C00060C00060C000606000406000C03000801803000E0E0003F00013227EA018 >56 D<01F000060C000C0600180700380380700380700380F001C0F001C0F001C0F001E0 F001E0F001E0F001E0F001E07001E07003E03803E01805E00C05E00619E003E1E00001C0 0001C00001C0000380000380300300780700780600700C002018001030000FC00013227E A018>I<0001800000018000000180000003C0000003C0000003C0000005E0000005E000 000DF0000008F0000008F0000010F800001078000010780000203C0000203C0000203C00 00401E0000401E0000401E0000800F0000800F0000FFFF000100078001000780030007C0 020003C0020003C0040003E0040001E0040001E00C0000F00C0000F03E0001F8FF800FFF 20237EA225>65 D<0007E0100038183000E0063001C00170038000F0070000F00E000070 1E0000701C0000303C0000303C0000307C0000107800001078000010F8000000F8000000 F8000000F8000000F8000000F8000000F8000000F800000078000000780000107C000010 3C0000103C0000101C0000201E0000200E000040070000400380008001C0010000E00200 00381C000007E0001C247DA223>67 D69 DI73 D77 DI80 D82 D<03F0200C0C601802603001E07000E06000 60E00060E00060E00020E00020E00020F00000F000007800007F00003FF0001FFE000FFF 0003FF80003FC00007E00001E00000F00000F0000070800070800070800070800070C000 60C00060E000C0F000C0C80180C6070081FC0014247DA21B>I<7FFFFFF8780780786007 8018400780084007800840078008C007800C800780048007800480078004800780040007 800000078000000780000007800000078000000780000007800000078000000780000007 800000078000000780000007800000078000000780000007800000078000000780000007 80000007800000078000000FC00003FFFF001E227EA123>I<0FE0001838003C0C003C0E 0018070000070000070000070000FF0007C7001E07003C0700780700700700F00708F007 08F00708F00F087817083C23900FC1E015157E9418>97 D<0E0000FE00001E00000E0000 0E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E1F000E61C0 0E80600F00300E00380E003C0E001C0E001E0E001E0E001E0E001E0E001E0E001E0E001E 0E001C0E003C0E00380F00700C80600C41C0083F0017237FA21B>I<01FE000703000C07 801C0780380300780000700000F00000F00000F00000F00000F00000F00000F000007000 007800403800401C00800C010007060001F80012157E9416>I<0000E0000FE00001E000 00E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E001F8E007 04E00C02E01C01E03800E07800E07000E0F000E0F000E0F000E0F000E0F000E0F000E0F0 00E07000E07800E03800E01801E00C02E0070CF001F0FE17237EA21B>I<01FC00070700 0C03801C01C03801C07801E07000E0F000E0FFFFE0F00000F00000F00000F00000F00000 7000007800203800201C00400E008007030000FC0013157F9416>I<003C00C6018F038F 030F070007000700070007000700070007000700FFF80700070007000700070007000700 0700070007000700070007000700070007000700070007807FF8102380A20F>I<000070 01F198071E180E0E181C07001C07003C07803C07803C07803C07801C07001C07000E0E00 0F1C0019F0001000001000001800001800001FFE000FFFC00FFFE03800F0600030400018 C00018C00018C000186000306000303800E00E038003FE0015217F9518>I<0E0000FE00 001E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00 000E1F800E60C00E80E00F00700F00700E00700E00700E00700E00700E00700E00700E00 700E00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18237FA21B>I<1C 001E003E001E001C00000000000000000000000000000000000E00FE001E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFC00A227FA10E >I<01C003E003E003E001C00000000000000000000000000000000001E00FE001E000E0 00E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E0 00E000E000E000E060E0F0C0F18061803E000B2C82A10F>I<0E0000FE00001E00000E00 000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E03FC0E01 F00E01C00E01800E02000E04000E08000E10000E38000EF8000F1C000E1E000E0E000E07 000E07800E03C00E01C00E01E00E00F00E00F8FFE3FE17237FA21A>I<0E00FE001E000E 000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E 000E000E000E000E000E000E000E000E000E000E000E000E00FFE00B237FA20E>I<0E1F C07F00FE60E183801E807201C00F003C00E00F003C00E00E003800E00E003800E00E0038 00E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800 E00E003800E00E003800E00E003800E00E003800E00E003800E0FFE3FF8FFE27157F942A >I<0E1F80FE60C01E80E00F00700F00700E00700E00700E00700E00700E00700E00700E 00700E00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18157F941B>I< 01FC000707000C01801800C03800E0700070700070F00078F00078F00078F00078F00078 F00078F000787000707800F03800E01C01C00E038007070001FC0015157F9418>I<0E1F 00FE61C00E80600F00700E00380E003C0E001C0E001E0E001E0E001E0E001E0E001E0E00 1E0E001E0E003C0E003C0E00380F00700E80E00E41C00E3F000E00000E00000E00000E00 000E00000E00000E00000E00000E0000FFE000171F7F941B>I<0E3CFE461E8F0F0F0F06 0F000E000E000E000E000E000E000E000E000E000E000E000E000E000F00FFF010157F94 13>114 D<0F8830786018C018C008C008E008F0007F803FE00FF001F8003C801C800C80 0CC00CC008E018D0308FC00E157E9413>I<02000200020002000600060006000E001E00 3E00FFF80E000E000E000E000E000E000E000E000E000E000E000E040E040E040E040E04 0E040708030801F00E1F7F9E13>I<0E0070FE07F01E00F00E00700E00700E00700E0070 0E00700E00700E00700E00700E00700E00700E00700E00700E00700E00F00E00F0060170 03827800FC7F18157F941B>III121 D E /Fw 20 118 df45 D68 D73 D77 D80 D<007F802001FFE02007C078600F001C601E0006E03C0003E0380001E0780000E0 700000E070000060F0000060F0000060F0000020F0000020F0000020F8000020F8000000 7C0000007E0000003F0000003FC000001FF800000FFF800007FFF80003FFFC0000FFFF00 000FFF800000FFC000001FE0000007E0000003F0000001F0000000F0000000F8000000F8 8000007880000078800000788000007880000078C0000078C0000070E00000F0E00000E0 F00000E0F80001C0EC000380C7000700C1F01E00807FFC00800FF0001D337CB125>83 D<00FE00000303C0000C00E00010007000100038003C003C003E001C003E001E003E001E 0008001E0000001E0000001E0000001E00000FFE0000FC1E0003E01E000F801E001F001E 003E001E003C001E007C001E00F8001E04F8001E04F8001E04F8003E04F8003E0478003E 047C005E043E008F080F0307F003FC03E01E1F7D9E21>97 D<003F8000E0600380180700 040F00041E001E1C003E3C003E7C003E7C0008780000F80000F80000F80000F80000F800 00F80000F80000F80000F800007800007C00007C00003C00011E00011E00020F00020700 0403801800E060003F80181F7D9E1D>99 D<000001E000003FE000003FE0000003E00000 01E0000001E0000001E0000001E0000001E0000001E0000001E0000001E0000001E00000 01E0000001E0000001E0000001E0000001E0000001E0001F81E000F061E001C019E00780 05E00F0003E00E0003E01E0001E03C0001E03C0001E07C0001E0780001E0F80001E0F800 01E0F80001E0F80001E0F80001E0F80001E0F80001E0F80001E0F80001E0780001E07800 01E03C0001E03C0001E01C0001E01E0003E00E0005E0070009E0038011F000E061FF003F 81FF20327DB125>I<003F800000E0E0000380380007003C000E001E001E001E001C000F 003C000F007C000F0078000F8078000780F8000780F8000780FFFFFF80F8000000F80000 00F8000000F8000000F8000000F8000000780000007C0000003C0000003C0000801E0000 800E0001000F0002000780020001C00C0000F03000001FC000191F7E9E1D>I<0007E000 1C1000383800707C00E07C01E07C01C03803C00003C00003C00003C00003C00003C00003 C00003C00003C00003C00003C00003C000FFFFC0FFFFC003C00003C00003C00003C00003 C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003 C00003C00003C00003C00003C00003C00003C00003C00003C00003C00007E0007FFF007F FF0016327FB114>I<000000F0007F030801C1C41C0380E81C070070080F0078001E003C 001E003C003E003E003E003E003E003E003E003E003E003E003E003E001E003C001E003C 000F007800070070000780E00009C1C000087F0000180000001800000018000000180000 00180000001C0000000E0000000FFFF80007FFFF0003FFFF800E000FC0180001E0300000 F070000070E0000038E0000038E0000038E0000038E00000387000007070000070380000 E01C0001C00700070001C01C00003FE0001E2F7E9F21>I<07000F801F801F800F800700 000000000000000000000000000000000000000000000780FF80FF800F80078007800780 078007800780078007800780078007800780078007800780078007800780078007800780 0780078007800FC0FFF8FFF80D307EAF12>105 D<0780FE001FC000FF83078060F000FF 8C03C18078000F9001E2003C0007A001E4003C0007A000F4001E0007C000F8001E0007C0 00F8001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000 F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0 001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F000 1E00078000F0001E00078000F0001E00078000F0001E00078000F0001E00078000F0001E 000FC001F8003F00FFFC1FFF83FFF0FFFC1FFF83FFF0341F7E9E38>109 D<0780FE0000FF83078000FF8C03C0000F9001E00007A001E00007A000F00007C000F000 07C000F000078000F000078000F000078000F000078000F000078000F000078000F00007 8000F000078000F000078000F000078000F000078000F000078000F000078000F0000780 00F000078000F000078000F000078000F000078000F000078000F000078000F0000FC001 F800FFFC1FFF80FFFC1FFF80211F7E9E25>I<001FC00000F0780001C01C00070007000F 0007801E0003C01C0001C03C0001E03C0001E0780000F0780000F0780000F0F80000F8F8 0000F8F80000F8F80000F8F80000F8F80000F8F80000F8F80000F8780000F07C0001F03C 0001E03C0001E01E0003C01E0003C00F00078007800F0001C01C0000F07800001FC0001D 1F7E9E21>I<0783E0FF8C18FF907C0F907C07A07C07C03807C00007C00007C000078000 078000078000078000078000078000078000078000078000078000078000078000078000 0780000780000780000780000780000780000FC000FFFE00FFFE00161F7E9E19>114 D<01FC100E03301800F0300070600030E00030E00010E00010E00010F00010F800007E00 003FF0001FFF000FFFC003FFE0003FF00001F80000F880003C80003C80001CC0001CC000 1CE0001CE00018F00038F00030CC0060C301C080FE00161F7E9E1A>I<00400000400000 400000400000400000C00000C00000C00001C00001C00003C00007C0000FC0001FFFE0FF FFE003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003C00003 C00003C00003C00003C00003C00003C01003C01003C01003C01003C01003C01003C01003 C01001C02001E02000E0400078C0001F00142C7FAB19>I<078000F000FF801FF000FF80 1FF0000F8001F000078000F000078000F000078000F000078000F000078000F000078000 F000078000F000078000F000078000F000078000F000078000F000078000F000078000F0 00078000F000078000F000078000F000078000F000078000F000078000F000078001F000 078001F000078001F000038002F00003C004F00001C008F800007030FF80001FC0FF8021 1F7E9E25>I E /Fx 5 85 df<00000000C00000000000E00000000001E00000000003E0 0000000003E00000000007E00000000007E0000000000FE0000000000FE0000000001FE0 000000001FE00000000037E00000000067E00000000067E000000000C7E000000000C7F0 0000000183F00000000183F00000000303F00000000703F00000000603F00000000C03F0 0000000C03F00000001803F00000001803F00000003003F00000003003F00000006003F0 000000C003F0000000C003F00000018003F00000018003F8000003FFFFF8000003FFFFF8 0000060001F800000E0001F800000C0001F80000180001F80000180001F80000300001F8 0000300001F80000600001F80000E00001F80000C00001F80001C00001F80001C00001F8 0007C00001FC001FC00003FC00FFF8007FFFE0FFF8007FFFE02B327BB135>65 D<000FFFFFFE0000000FFFFFFF800000007F000FE00000007E0003F00000007E0000F800 00007E0000FC0000007E00007C000000FC00003E000000FC00003E000000FC00003F0000 00FC00001F000001F800001F000001F800001F800001F800001F800001F800001F800003 F000001F800003F000001F800003F000001F800003F000001F800007E000003F800007E0 00003F800007E000003F800007E000003F80000FC000003F00000FC000007F00000FC000 007F00000FC000007F00001F8000007E00001F800000FE00001F800000FE00001F800000 FC00003F000001FC00003F000001F800003F000001F800003F000003F000007E000003E0 00007E000007E000007E00000FC000007E00000F800000FC00001F800000FC00003F0000 00FC00007E000000FC0000FC000001F80001F0000001F80003E0000001F8000FC0000003 F8007F000000FFFFFFFC000000FFFFFFE000000031317BB036>68 D<000FFFFFFFFC000FFFFFFFFC00007F0001FC00007E00007C00007E00003C00007E0000 3C00007E0000180000FC0000180000FC0000180000FC0000180000FC0000180001F80000 180001F80000180001F80000180001F80000180003F00080100003F00180000003F00180 000003F00180000007E00300000007E00300000007E00700000007E01F0000000FFFFE00 00000FFFFE0000000FC01E0000000FC00E0000001F800C0000001F800C0000001F800C00 00001F800C0000003F00180000003F00080000003F00000000003F00000000007E000000 00007E00000000007E00000000007E0000000000FC0000000000FC0000000000FC000000 0000FC0000000001F80000000001F80000000001F80000000003F800000000FFFFF00000 00FFFFF00000002E317BB02F>70 D<000FFFFFF000000FFFFFFE0000007F003F8000007E 000FC000007E0007E000007E0003F000007E0001F80000FC0001F80000FC0001F80000FC 0001F80000FC0001F80001F80003F80001F80003F80001F80003F80001F80003F00003F0 0007F00003F00007E00003F0000FC00003F0000FC00007E0001F000007E0007E000007E0 00FC000007E007F000000FFFFFC000000FFFFF0000000FC00F8000000FC003C000001F80 03E000001F8001F000001F8001F000001F8001F800003F0001F800003F0001F800003F00 01F800003F0001F800007E0003F800007E0003F800007E0003F000007E0003F00000FC00 07F00000FC0007F00000FC0007F00800FC0007F00C01F80007F01801F80007F01801F800 03F03003F80003F030FFFFE001F0E0FFFFE000FFC0000000003F002E327BB034>82 D<07FFFFFFFFF00FFFFFFFFFF00FC00FE003F01E000FC000F01C000FC000E018000FC000 E038000FC0006030001F8000E030001F8000E060001F8000C060001F8000C060003F0000 C0C0003F0000C0C0003F0000C0C0003F0000C080007E00008000007E00000000007E0000 0000007E0000000000FC0000000000FC0000000000FC0000000000FC0000000001F80000 000001F80000000001F80000000001F80000000003F00000000003F00000000003F00000 000003F00000000007E00000000007E00000000007E00000000007E0000000000FC00000 00000FC0000000000FC0000000000FC0000000001F80000000001F80000000001F800000 00001F80000000003F00000000003F00000000003F0000000000FF00000000FFFFFF0000 00FFFFFF0000002C3173B033>84 D E end %%EndProlog %%BeginSetup %%Feature: *Resolution 300dpi TeXDict begin %%EndSetup %%Page: 0 1 0 0 bop 795 908 a Fx(D)26 b(R)g(A)f(F)h(T)225 999 y Fw(Do)r(cumen)n(t) 20 b(for)i(a)f(Standard)g(Message-P)n(assing)f(In)n(terface)621 1194 y Fv(Message)c(P)o(assing)h(In)o(terface)e(F)l(orum)832 1320 y(Ma)o(y)h(30,)g(1995)77 1378 y(This)h(w)o(ork)f(w)o(as)h(supp)q (orted)g(in)f(part)h(b)o(y)e(ARP)l(A)h(and)h(NSF)e(under)h(gran)o(t)h (ASC-9310330,)i(the)192 1436 y(National)d(Science)f(F)l(oundation)i (Science)e(and)i(T)l(ec)o(hnology)f(Cen)o(ter)f(Co)q(op)q(erativ)o(e)76 1494 y(Agreemen)o(t)e(No.)22 b(CCR-8809615,)d(and)e(b)o(y)e(the)h (Commission)e(of)j(the)f(Europ)q(ean)i(Comm)o(unit)n(y)654 1552 y(through)f(Esprit)f(pro)s(ject)g(P6643.)p eop %%Page: 1 2 1 1 bop 166 45 a Fu(This)20 b(is)h(the)f(result)g(of)f(a)h(LaT)l(eX)g (run)g(of)g(a)f(draft)g(of)h(a)f(single)j(c)o(hapter)d(of)h(the)g(MPIF) f(Final)75 102 y(Rep)q(ort)d(do)q(cumen)o(t.)969 2828 y(i)p eop %%Page: 1 3 1 2 bop 75 356 a Ft(Chapter)34 b(1)75 564 y Fs(P)m(oin)m(t-to-P)m(oin)m (t)42 b(Comm)m(unication)75 805 y Fr(1.1)59 b(Intro)r(duction)75 906 y Fu(Sending)14 b(and)e(receiving)h(of)f(messages)g(b)o(y)g(pro)q (cesses)g(is)h(the)f(basic)g Fq(MPI)g Fu(comm)o(unication)h(mec)o (hanism.)75 963 y(The)20 b(basic)g(p)q(oin)o(t-to-p)q(oin)o(t)g(comm)o (unication)h(op)q(erations)e(are)g Fp(send)h Fu(and)f Fp(receiv)o(e)p Fu(.)32 b(Their)21 b(use)e(is)75 1019 y(illustrated)e(in)f(the)f(example)h(b)q(elo)o(w.)75 1125 y Fo(#include)23 b("mpi.h")75 1182 y(main\()g(argc,)g(argv)h(\))75 1238 y(int)f(argc;)75 1295 y(char)g(**argv;)75 1351 y({)170 1408 y(char)h(message[20];)170 1464 y(int)g(myrank;)170 1521 y(MPI_Status)f(status;)170 1577 y(MPI_Init\()g(&argc,)g(&argv)g (\);)170 1633 y(MPI_Comm_rank\()f(MPI_COMM_WORLD,)g(&myrank)h(\);)170 1690 y(if)h(\(myrank)f(==)h(0\))95 b(/*)23 b(code)h(for)f(process)g (zero)g(*/)170 1746 y({)266 1803 y(strcpy\(message,"Hello,)e(there"\);) 266 1859 y(MPI_Send\(message,)g(strlen\(message\),)h(MPI_CHAR,)h(1,)g (99,)h(MPI_COMM_WORLD\);)170 1916 y(})170 1972 y(else)382 b(/*)23 b(code)h(for)f(process)g(one)g(*/)170 2029 y({)266 2085 y(MPI_Recv\(message,)e(20,)j(MPI_CHAR,)f(0,)g(99,)h (MPI_COMM_WORLD,)d(&status\);)266 2142 y(printf\("received)h (:\045s:\\n",)g(message\);)170 2198 y(})170 2254 y(MPI_Finalize\(\);)75 2311 y(})166 2417 y Fu(In)17 b(this)h(example,)f(pro)q(cess)h(zero)e (\()p Fq(myrank)g(=)h(0)p Fu(\))f(sends)i(a)e(message)h(to)f(pro)q (cess)h(one)g(using)h(the)75 2474 y Fp(send)f Fu(op)q(eration)g Fq(MPI)p 485 2474 14 2 v 16 w(SEND)p Fu(.)g(The)g(op)q(eration)g(sp)q (eci\014es)i(a)e Fp(send)i(bu\013er)d Fu(in)i(the)f(sender)h(memory)75 2530 y(from)f(whic)o(h)i(the)f(message)g(data)f(is)h(tak)o(en.)28 b(In)19 b(the)f(example)h(ab)q(o)o(v)o(e,)f(the)g(send)g(bu\013er)g (consists)g(of)75 2587 y(the)f(storage)f(con)o(taining)i(the)f(v)m (ariable)i Fq(message)e Fu(in)h(the)f(memory)g(of)f(pro)q(cess)i(zero.) 25 b(The)18 b(lo)q(cation,)75 2643 y(size)k(and)f(t)o(yp)q(e)g(of)g (the)g(send)h(bu\013er)f(are)g(sp)q(eci\014ed)i(b)o(y)e(the)g(\014rst)g (three)g(parameters)g(of)f(the)h(send)75 2699 y(op)q(eration.)29 b(The)19 b(message)f(sen)o(t)g(will)h(con)o(tain)g(the)f(13)g(c)o (haracters)f(of)h(this)h(v)m(ariable.)30 b(In)19 b(addition,)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 2 4 2 3 bop 75 -100 a Fu(2)631 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(the)g(send)h(op)q(eration)g(asso)q (ciates)f(an)g Fp(en)o(v)o(elop)q(e)g Fu(with)h(the)f(message.)26 b(This)17 b(en)o(v)o(elop)q(e)i(sp)q(eci\014es)g(the)75 102 y(message)10 b(destination)h(and)f(con)o(tains)h(distinguishing)h (information)f(that)e(can)i(b)q(e)f(used)h(b)o(y)f(the)h Fp(receiv)o(e)75 158 y Fu(op)q(eration)17 b(to)f(select)i(a)e (particular)i(message.)24 b(The)17 b(last)f(three)h(parameters)f(of)h (the)f(send)i(op)q(eration)75 214 y(sp)q(ecify)f(the)e(en)o(v)o(elop)q (e)h(for)f(the)g(message)g(sen)o(t.)166 271 y(Pro)q(cess)d(one)h(\()p Fq(myrank)e(=)i(1)p Fu(\))f(receiv)o(es)i(this)f(message)f(with)h(the)f Fp(receiv)o(e)g Fu(op)q(eration)h Fq(MPI)p 1734 271 14 2 v 16 w(RECV)p Fu(.)75 327 y(The)e(message)f(to)h(b)q(e)g(receiv)o(ed) h(is)f(selected)h(according)g(to)e(the)h(v)m(alue)h(of)e(its)h(en)o(v)o (elop)q(e,)i(and)e(the)f(message)75 384 y(data)17 b(is)h(stored)f(in)o (to)g(the)h Fp(receiv)o(e)h(bu\013er)p Fu(.)26 b(In)18 b(the)g(example)g(ab)q(o)o(v)o(e,)f(the)h(receiv)o(e)g(bu\013er)g (consists)75 440 y(of)d(the)h(storage)e(con)o(taining)j(the)e(string)h Fq(message)f Fu(in)i(the)e(memory)h(of)f(pro)q(cess)h(one.)21 b(The)16 b(\014rst)f(three)75 497 y(parameters)e(of)h(the)g(receiv)o(e) h(op)q(eration)f(sp)q(ecify)i(the)e(lo)q(cation,)g(size)h(and)g(t)o(yp) q(e)f(of)f(the)h(receiv)o(e)h(bu\013er.)75 553 y(The)e(next)g(three)g (parameters)f(are)h(used)g(for)g(selecting)h(the)f(incoming)h(message.) 19 b(The)13 b(last)g(parameter)75 610 y(is)j(used)f(to)g(return)g (information)h(on)f(the)g(message)g(just)g(receiv)o(ed.)166 666 y(The)g(next)g(sections)g(describ)q(e)i(the)e(blo)q(c)o(king)h (send)g(and)f(receiv)o(e)h(op)q(erations.)k(W)l(e)15 b(discuss)h(send,)75 723 y(receiv)o(e,)e(blo)q(c)o(king)f(comm)o (unication)g(seman)o(tics,)g(t)o(yp)q(e)g(matc)o(hing)f(requiremen)o (ts,)h(t)o(yp)q(e)g(con)o(v)o(ersion)f(in)75 779 y(heterogeneous)18 b(en)o(vironmen)o(ts,)g(and)f(more)g(general)h(comm)o(unication)g(mo)q (des.)27 b(Non)o(blo)q(c)o(king)19 b(com-)75 835 y(m)o(unication)i(is)f (addressed)g(next,)h(follo)o(w)o(ed)f(b)o(y)g(c)o(hannel-lik)o(e)i (constructs)d(and)h(send-receiv)o(e)i(op)q(er-)75 892 y(ations.)32 b(W)l(e)19 b(then)h(consider)g(general)g(datat)o(yp)q(es)f (that)f(allo)o(w)i(one)f(to)g(transfer)f(e\016cien)o(tly)j(hetero-)75 948 y(geneous)g(and)f(noncon)o(tiguous)h(data.)35 b(W)l(e)21 b(conclude)h(with)f(the)f(description)i(of)e(calls)i(for)e(explicit)75 1005 y(pac)o(king)c(and)f(unpac)o(king)h(of)f(messages.)75 1145 y Fr(1.2)59 b(Blo)r(cking)20 b(Send)f(and)g(Receive)f(Op)r (erations)75 1248 y Fl(1.2.1)49 b(Blo)q(cking)18 b(send)75 1334 y Fu(The)d(syn)o(tax)g(of)g(the)g(blo)q(c)o(king)h(send)g(op)q (eration)g(is)f(giv)o(en)h(b)q(elo)o(w.)75 1485 y Fq(MPI)p 160 1485 V 16 w(SEND\(buf,)g(count,)g(datat)o(yp)q(e,)g(dest,)g(tag,)f (comm\))117 1562 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 1633 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)15 b(of)g(elemen)o(ts)g(in)g(send)h(bu\013er)h(\(nonnegativ)o(e)e(in)o (te-)905 1690 y(ger\))117 1761 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e (\(handle\))117 1833 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 1905 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1976 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))75 2101 y Fo(int)23 b(MPI)p 245 2101 15 2 v 17 w(Send\(void*)g(buf,)g(int) g(count,)h(MPI)p 979 2101 V 16 w(Datatype)f(datatype,)g(int)g(dest,)393 2157 y(int)h(tag,)f(MPI)p 683 2157 V 17 w(Comm)g(comm\))75 2244 y(MPI)p 150 2244 V 17 w(SEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g (TAG,)h(COMM,)f(IERROR\))170 2300 y()g(BUF\(*\))170 2356 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(IERROR)166 2443 y Fu(The)15 b(blo)q(c)o(king)i(seman)o(tics)e(of)g(this)h(call)g (are)f(describ)q(ed)i(in)f(Sec.)k(1.4.)75 2561 y Fl(1.2.2)49 b(Message)16 b(data)75 2647 y Fu(The)e(send)g(bu\013er)g(sp)q (eci\014ed)i(b)o(y)e(the)f Fq(MPI)p 803 2647 14 2 v 16 w(SEND)h Fu(op)q(eration)g(consists)g(of)f Fq(count)i Fu(successiv)o(e)g(en)o(tries)f(of)75 2704 y(the)f(t)o(yp)q(e)h (indicated)h(b)o(y)e Fq(datat)o(yp)q(e)p Fu(,)i(starting)e(with)h(the)f (en)o(try)g(at)g(address)h Fq(buf)p Fu(.)20 b(Note)13 b(that)g(w)o(e)g(sp)q(ecify)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 3 5 3 4 bop 75 -100 a Fm(1.2.)34 b(BLOCKING)17 b(SEND)e(AND)g(RECEIVE)g (OPERA)l(TIONS)620 b Fu(3)75 45 y(the)19 b(message)f(length)i(in)g (terms)e(of)g(n)o(um)o(b)q(er)h(of)g Fj(elements)p Fu(,)f(not)g(n)o(um) o(b)q(er)i(of)e Fj(bytes)p Fu(.)30 b(The)19 b(former)f(is)75 102 y(mac)o(hine)e(indep)q(enden)o(t)i(and)d(closer)h(to)e(the)h (application)i(lev)o(el.)166 158 y(The)g(data)f(part)g(of)g(the)g (message)h(consists)f(of)h(a)f(sequence)i(of)e Fq(count)i Fu(v)m(alues,)f(eac)o(h)g(of)f(the)h(t)o(yp)q(e)75 214 y(indicated)j(b)o(y)e Fq(datat)o(yp)q(e)p Fu(.)31 b Fq(count)20 b Fu(ma)o(y)d(b)q(e)i(zero,)g(in)g(whic)o(h)g(case)g(the)f(data)g(part) f(of)h(the)h(message)e(is)75 271 y(empt)o(y)l(.)i(The)13 b(basic)h(datat)o(yp)q(es)e(that)h(can)g(b)q(e)h(sp)q(eci\014ed)h(for)d (message)h(data)f(v)m(alues)i(corresp)q(ond)g(to)e(the)75 327 y(basic)k(datat)o(yp)q(es)f(of)g(the)g(host)g(language.)20 b(P)o(ossible)d(v)m(alues)f(of)f(this)h(argumen)o(t)e(for)h(F)l(ortran) f(and)i(the)75 384 y(corresp)q(onding)g(F)l(ortran)e(t)o(yp)q(es)h(are) g(listed)i(b)q(elo)o(w.)p 472 532 1006 2 v 471 589 2 57 v 497 572 a(MPI)e(datat)o(yp)q(e)p 1046 589 V 294 w(F)l(ortran)f(datat)o(yp)q(e)p 1477 589 V 472 591 1006 2 v 471 647 2 57 v 497 630 a Fq(MPI)p 582 630 14 2 v 16 w(INTEGER)p 1046 647 2 57 v 287 w Fo(INTEGER)p 1477 647 V 471 703 V 497 687 a Fq(MPI)p 582 687 14 2 v 16 w(REAL)p 1046 703 2 57 v 365 w Fo(REAL)p 1477 703 V 471 760 V 497 743 a Fq(MPI)p 582 743 14 2 v 16 w(DOUBLE)p 777 743 V 17 w(PRECISION)p 1046 760 2 57 v 50 w Fo(DOUBLE)23 b(PRECISION)p 1477 760 V 471 816 V 497 799 a Fq(MPI)p 582 799 14 2 v 16 w(COMPLEX)p 1046 816 2 57 v 263 w Fo(COMPLEX)p 1477 816 V 471 873 V 497 856 a Fq(MPI)p 582 856 14 2 v 16 w(LOGICAL)p 1046 873 2 57 v 291 w Fo(LOGICAL)p 1477 873 V 471 929 V 497 912 a Fq(MPI)p 582 912 14 2 v 16 w(CHARA)o(CTER)p 1046 929 2 57 v 211 w Fo(CHARACTER\(1\))p 1477 929 V 471 986 V 497 969 a Fq(MPI)p 582 969 14 2 v 16 w(BYTE)p 1046 986 2 57 v 1477 986 V 471 1042 V 497 1025 a(MPI)p 582 1025 14 2 v 16 w(P)l(A)o(CKED)p 1046 1042 2 57 v 1477 1042 V 472 1044 1006 2 v 75 1214 a Fu(P)o(ossible)16 b(v)m(alues)g(for)f(this)h(argumen)o(t)e(for)h(C)g(and)g(the)g(corresp) q(onding)h(C)f(t)o(yp)q(es)h(are)f(listed)h(b)q(elo)o(w.)p 466 1354 1019 2 v 465 1410 2 57 v 491 1393 a(MPI)f(datat)o(yp)q(e)p 1004 1410 V 259 w(C)g(datat)o(yp)q(e)p 1483 1410 V 466 1412 1019 2 v 465 1468 2 57 v 491 1451 a Fq(MPI)p 576 1451 14 2 v 16 w(CHAR)p 1004 1468 2 57 v 321 w Fo(signed)23 b(char)p 1483 1468 V 465 1525 V 491 1508 a Fq(MPI)p 576 1508 14 2 v 16 w(SHORT)p 1004 1525 2 57 v 291 w Fo(signed)g(short)g (int)p 1483 1525 V 465 1581 V 491 1564 a Fq(MPI)p 576 1564 14 2 v 16 w(INT)p 1004 1581 2 57 v 365 w Fo(signed)g(int)p 1483 1581 V 465 1638 V 491 1621 a Fq(MPI)p 576 1621 14 2 v 16 w(LONG)p 1004 1638 2 57 v 321 w Fo(signed)g(long)g(int)p 1483 1638 V 465 1694 V 491 1677 a Fq(MPI)p 576 1677 14 2 v 16 w(UNSIGNED)p 815 1677 V 17 w(CHAR)p 1004 1694 2 57 v 81 w Fo(unsigned)f(char)p 1483 1694 V 465 1750 V 491 1733 a Fq(MPI)p 576 1733 14 2 v 16 w(UNSIGNED)p 815 1733 V 17 w(SHORT)p 1004 1750 2 57 v 51 w Fo(unsigned)g(short)i (int)p 1483 1750 V 465 1807 V 491 1790 a Fq(MPI)p 576 1790 14 2 v 16 w(UNSIGNED)p 1004 1807 2 57 v 218 w Fo(unsigned)e(int)p 1483 1807 V 465 1863 V 491 1846 a Fq(MPI)p 576 1846 14 2 v 16 w(UNSIGNED)p 815 1846 V 17 w(LONG)p 1004 1863 2 57 v 81 w Fo(unsigned)g(long)i(int)p 1483 1863 V 465 1920 V 491 1903 a Fq(MPI)p 576 1903 14 2 v 16 w(FLO)o(A)l(T)p 1004 1920 2 57 v 301 w Fo(float)p 1483 1920 V 465 1976 V 491 1959 a Fq(MPI)p 576 1959 14 2 v 16 w(DOUBLE)p 1004 1976 2 57 v 262 w Fo(double)p 1483 1976 V 465 2033 V 491 2016 a Fq(MPI)p 576 2016 14 2 v 16 w(LONG)p 712 2016 V 16 w(DOUBLE)p 1004 2033 2 57 v 126 w Fo(long)f(double)p 1483 2033 V 465 2089 V 491 2072 a Fq(MPI)p 576 2072 14 2 v 16 w(BYTE)p 1004 2089 2 57 v 1483 2089 V 465 2146 V 491 2129 a(MPI)p 576 2129 14 2 v 16 w(P)l(A)o(CKED)p 1004 2146 2 57 v 1483 2146 V 466 2147 1019 2 v 166 2308 a Fu(The)f(datat)o(yp)q(es)f Fq(MPI)p 566 2308 14 2 v 16 w(BYTE)h Fu(and)g Fq(MPI)p 899 2308 V 15 w(P)l(A)o(CKED)g Fu(do)f(not)g(corresp)q(ond)h(to)f(a)h(F)l(ortran)e(or)h(C)75 2365 y(datat)o(yp)q(e.)42 b(A)23 b(v)m(alue)h(of)e(t)o(yp)q(e)h Fq(MPI)p 742 2365 V 15 w(BYTE)h Fu(consists)f(of)f(a)g(b)o(yte)h(\(8)f (binary)h(digits\).)43 b(A)23 b(b)o(yte)f(is)75 2421 y(unin)o(terpreted)h(and)f(is)h(di\013eren)o(t)f(from)f(a)h(c)o (haracter.)39 b(Di\013eren)o(t)22 b(mac)o(hines)h(ma)o(y)e(ha)o(v)o(e)h (di\013eren)o(t)75 2478 y(represen)o(tations)15 b(for)g(c)o(haracters,) f(or)h(ma)o(y)g(use)h(more)f(than)g(one)g(b)o(yte)h(to)e(represen)o(t)i (c)o(haracters.)j(On)75 2534 y(the)g(other)g(hand,)h(a)f(b)o(yte)g(has) g(the)g(same)g(binary)g(v)m(alue)i(on)e(all)h(mac)o(hines.)32 b(The)20 b(use)f(of)g(the)g(t)o(yp)q(e)75 2591 y Fq(MPI)p 160 2591 V 16 w(P)l(A)o(CKED)c Fu(is)h(explained)h(in)f(Section)g (1.13.)166 2647 y Fq(MPI)c Fu(requires)h(supp)q(ort)g(of)f(the)h(datat) o(yp)q(es)f(listed)i(ab)q(o)o(v)o(e,)e(whic)o(h)h(matc)o(h)f(the)h (basic)g(datat)o(yp)q(es)f(of)75 2704 y(F)l(ortran)h(77)g(and)h(ANSI)h (C.)f(Additional)h Fq(MPI)f Fu(datat)o(yp)q(es)f(should)i(b)q(e)g(pro)o (vided)g(if)f(the)g(host)g(language)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 4 6 4 5 bop 75 -100 a Fu(4)631 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(has)e(additional)i(data)e(t)o(yp)q(es:)20 b Fq(MPI)p 698 45 14 2 v 16 w(LONG)p 834 45 V 16 w(LONG)p 970 45 V 17 w(INT)p Fu(,)15 b(for)g(\(64)f(bit\))i(C)f(in)o(tegers)g (declared)i(to)d(b)q(e)i(of)75 102 y(t)o(yp)q(e)11 b Fq(longlong)f(int)p Fu(;)i Fq(MPI)p 503 102 V 16 w(DOUBLE)p 698 102 V 17 w(COMPLEX)f Fu(for)f(double)i(precision)g(complex)g(in)f (F)l(ortran)f(declared)-2034 b Fi(>)75 158 y Fu(to)17 b(b)q(e)i(of)e(t)o(yp)q(e)h Fq(DOUBLE)h(COMPLEX)p Fu(;)f Fq(MPI)p 884 158 V 16 w(REAL2)p Fu(,)g Fq(MPI)p 1147 158 V 16 w(REAL4)g Fu(and)g Fq(MPI)p 1488 158 V 16 w(REAL8)g Fu(for)f(F)l(ortran)-2036 b Fi(?)75 214 y Fu(reals,)18 b(declared)h(to)e(b)q(e)h(of)f(t)o(yp)q(e)h Fq(REAL*2)p Fu(,)g Fq(REAL*4)f Fu(and)h Fq(REAL*8)p Fu(,)g(resp)q(ectiv)o(ely;)i Fq(MPI)p 1650 214 V 16 w(INTEGER1)75 271 y(MPI)p 160 271 V 16 w(INTEGER2)10 b Fu(and)h Fq(MPI)p 564 271 V 16 w(INTEGER4)f Fu(for)g(F)l(ortran)f(in)o(tegers,)i(declared)h(to)d(b) q(e)i(of)f(t)o(yp)q(e)g Fq(INTEGER*1)p Fu(,)75 327 y Fq(INTEGER*2)15 b Fu(and)h Fq(INTEGER*4)p Fu(,)f(resp)q(ectiv)o(ely;)h (etc.)189 407 y Fj(R)n(ationale.)80 b Fu(One)22 b(goal)g(of)f(the)h (design)h(is)g(to)e(allo)o(w)h(for)f Fq(MPI)g Fu(to)h(b)q(e)g(implemen) o(ted)i(as)d(a)189 464 y(library)l(,)d(with)f(no)g(need)h(for)e (additional)j(prepro)q(cessing)f(or)e(compilation.)27 b(Th)o(us,)17 b(one)g(cannot)189 520 y(assume)c(that)g(a)g(comm)o (unication)h(call)g(has)g(information)f(on)h(the)f(datat)o(yp)q(e)g(of) g(v)m(ariables)i(in)f(the)189 576 y(comm)o(unication)20 b(bu\013er;)i(this)f(information)f(m)o(ust)f(b)q(e)i(supplied)h(b)o(y)e (an)g(explicit)i(argumen)o(t.)189 633 y(The)17 b(need)h(for)f(suc)o(h)h (datat)o(yp)q(e)e(information)i(will)h(b)q(ecome)f(clear)g(in)g (Section)g(1.3.2.)24 b(\()p Fj(End)18 b(of)189 689 y(r)n(ationale.)p Fu(\))75 808 y Fl(1.2.3)49 b(Message)16 b(envelop)q(e)75 893 y Fu(In)j(addition)g(to)e(the)h(data)g(part,)f(messages)h(carry)f (information)i(that)e(can)h(b)q(e)h(used)f(to)g(distinguish)75 950 y(messages)12 b(and)h(selectiv)o(ely)i(receiv)o(e)f(them.)19 b(This)14 b(information)f(consists)g(of)f(a)h(\014xed)g(n)o(um)o(b)q (er)h(of)e(\014elds,)75 1006 y(whic)o(h)k(w)o(e)f(collectiv)o(ely)j (call)e(the)f Fp(message)i(en)o(v)o(elop)q(e)p Fu(.)i(These)d(\014elds) g(are)913 1081 y(source)865 1138 y(destination)943 1194 y(tag)834 1251 y(comm)o(unicator)166 1325 y(The)c(message)g(source)g (is)h(implicitly)i(determined)f(b)o(y)e(the)g(iden)o(tit)o(y)h(of)f (the)g(message)g(sender.)20 b(The)75 1382 y(other)15 b(\014elds)h(are)f(sp)q(eci\014ed)i(b)o(y)f(argumen)o(ts)e(in)i(the)f (send)h(op)q(eration.)166 1438 y(The)f(message)g(destination)h(is)g(sp) q(eci\014ed)h(b)o(y)e(the)h Fq(dest)g Fu(argumen)o(t.)166 1495 y(The)h(in)o(teger-v)m(alued)h(message)e(tag)f(is)i(sp)q (eci\014ed)i(b)o(y)d(the)g Fq(tag)h Fu(argumen)o(t.)22 b(This)17 b(in)o(teger)g(can)f(b)q(e)75 1551 y(used)21 b(b)o(y)f(the)h(program)e(to)h(distinguish)i(di\013eren)o(t)f(t)o(yp)q (es)f(of)g(messages.)35 b(The)21 b(range)f(of)g(v)m(alid)i(tag)75 1608 y(v)m(alues)17 b(is)f Fq(0,...,UB)p Fu(,)e(where)i(the)g(v)m(alue) h(of)f Fq(UB)g Fu(is)g(implemen)o(tation)h(dep)q(enden)o(t.)24 b(It)15 b(can)h(b)q(e)h(found)f(b)o(y)75 1664 y(querying)g(the)g(v)m (alue)h(of)e(the)h(attribute)f Fh(MPI)p 859 1664 13 2 v 15 w(T)m(A)o(G)p 954 1664 V 14 w(UB)p Fu(,)f(as)h(describ)q(ed)j(in)e (Chapter)g Fp(??)p Fu(.)k Fq(MPI)15 b Fu(requires)75 1721 y(that)f Fq(UB)i Fu(b)q(e)g(no)f(less)h(than)f(32767.)166 1777 y(The)f Fq(comm)f Fu(argumen)o(t)g(sp)q(eci\014es)j(the)e Fp(comm)o(unicator)h Fu(that)e(is)i(used)g(for)e(the)h(send)h(op)q (eration.)75 1833 y(Comm)o(unicators)f(are)h(explained)j(in)e(Chapter)e Fp(??)p Fu(;)h(b)q(elo)o(w)g(is)h(a)f(brief)h(summary)f(of)f(their)i (usage.)166 1890 y(A)g(comm)o(unicator)f(sp)q(eci\014es)j(the)d(comm)o (unication)i(con)o(text)e(for)g(a)h(comm)o(unication)g(op)q(eration.)75 1946 y(Eac)o(h)f(comm)o(unication)h(con)o(text)f(pro)o(vides)g(a)g (separate)g(\\comm)o(unication)h(univ)o(erse:")21 b(messages)14 b(are)75 2003 y(alw)o(a)o(ys)h(receiv)o(ed)j(within)f(the)f(con)o(text) f(they)h(w)o(ere)g(sen)o(t,)g(and)g(messages)g(sen)o(t)f(in)i (di\013eren)o(t)g(con)o(texts)75 2059 y(do)e(not)g(in)o(terfere.)166 2116 y(The)20 b(comm)o(unicator)f(also)g(sp)q(eci\014es)i(the)f(set)f (of)g(pro)q(cesses)g(that)g(share)g(this)h(comm)o(unication)75 2172 y(con)o(text.)i(This)17 b Fp(pro)q(cess)h(group)e Fu(is)g(ordered)h(and)f(pro)q(cesses)g(are)g(iden)o(ti\014ed)i(b)o(y)e (their)h(rank)f(within)75 2229 y(this)g(group.)21 b(Th)o(us,)15 b(the)g(range)h(of)f(v)m(alid)i(v)m(alues)f(for)f Fq(dest)i Fu(is)f Fq(0,)f(...)20 b(,)c(n-1)p Fu(,)f(where)h Fq(n)g Fu(is)g(the)g(n)o(um)o(b)q(er)f(of)75 2285 y(pro)q(cesses)i(in)h(the)e (group.)25 b(\(If)16 b(the)h(comm)o(unicator)f(is)i(an)e(in)o(ter-comm) o(unicator,)h(then)g(destinations)75 2342 y(are)e(iden)o(ti\014ed)i(b)o (y)e(their)h(rank)f(in)h(the)f(remote)g(group.)k(See)d(Chapter)f Fp(??)p Fu(.\))166 2398 y(A)g(prede\014ned)i(comm)o(unicator)d Fh(MPI)p 808 2398 V 15 w(COMM)p 953 2398 V 14 w(W)o(ORLD)h Fu(is)h(pro)o(vided)g(b)o(y)f Fq(MPI)p Fu(.)f(It)h(allo)o(ws)g(comm)o (u-)75 2454 y(nication)22 b(with)f(all)h(pro)q(cesses)f(that)f(are)h (accessible)i(after)d Fq(MPI)g Fu(initialization)k(and)d(pro)q(cesses)g (are)75 2511 y(iden)o(ti\014ed)c(b)o(y)e(their)h(rank)f(in)h(the)f (group)g(of)g Fh(MPI)p 939 2511 V 14 w(COMM)p 1083 2511 V 15 w(W)o(ORLD)p Fu(.)189 2591 y Fj(A)n(dvic)n(e)j(to)i(users.)60 b Fu(Users)18 b(that)g(are)g(comfortable)g(with)h(the)g(notion)g(of)f (a)g(\015at)g(name)h(space)189 2647 y(for)d(pro)q(cesses,)h(and)g(a)g (single)h(comm)o(unication)g(con)o(text,)e(as)h(o\013ered)f(b)o(y)h (most)f(existing)i(com-)189 2704 y(m)o(unication)d(libraries,)h(need)f (only)h(use)e(the)h(prede\014ned)h(v)m(ariable)g Fh(MPI)p 1437 2704 V 15 w(COMM)p 1582 2704 V 14 w(W)o(ORLD)f Fu(as)f(the)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 5 7 5 6 bop 75 -100 a Fm(1.2.)34 b(BLOCKING)17 b(SEND)e(AND)g(RECEIVE)g (OPERA)l(TIONS)620 b Fu(5)189 45 y Fq(comm)16 b Fu(argumen)o(t.)29 b(This)19 b(will)h(allo)o(w)f(comm)o(unication)g(with)g(all)g(the)g (pro)q(cesses)f(a)o(v)m(ailable)j(at)189 102 y(initialization)d(time.) 189 177 y(Users)f(ma)o(y)g(de\014ne)i(new)e(comm)o(unicators,)h(as)f (explained)j(in)e(Chapter)f Fp(??)p Fu(.)27 b(Comm)o(unicators)189 233 y(pro)o(vide)13 b(an)g(imp)q(ortan)o(t)g(encapsulation)h(mec)o (hanism)f(for)g(libraries)h(and)f(mo)q(dules.)21 b(They)13 b(allo)o(w)189 290 y(mo)q(dules)21 b(to)e(ha)o(v)o(e)h(their)g(o)o(wn)g (disjoin)o(t)h(comm)o(unication)f(univ)o(erse)h(and)g(their)f(o)o(wn)g (pro)q(cess)189 346 y(n)o(um)o(b)q(ering)c(sc)o(heme.)k(\()p Fj(End)c(of)g(advic)n(e)g(to)h(users.)p Fu(\))189 452 y Fj(A)n(dvic)n(e)i(to)h(implementors.)65 b Fu(The)20 b(message)f(en)o(v)o(elop)q(e)h(w)o(ould)g(normally)g(b)q(e)g(enco)q (ded)h(b)o(y)e(a)189 509 y(\014xed-length)d(message)e(header.)20 b(Ho)o(w)o(ev)o(er,)13 b(the)i(actual)g(enco)q(ding)h(is)f(implemen)o (tation)g(dep)q(en-)189 565 y(den)o(t.)k(Some)c(of)e(the)i(information) f(\(e.g.,)f(source)h(or)g(destination\))h(ma)o(y)e(b)q(e)i(implicit,)i (and)d(need)189 622 y(not)j(b)q(e)i(explicitly)i(carried)e(b)o(y)f (messages.)28 b(Also,)19 b(pro)q(cesses)f(ma)o(y)f(b)q(e)i(iden)o (ti\014ed)h(b)o(y)e(relativ)o(e)189 678 y(ranks,)c(or)h(absolute)g (ids,)h(etc.)k(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(implementors.)p Fu(\))75 800 y Fl(1.2.4)49 b(Blo)q(cking)18 b(receive)75 886 y Fu(The)d(syn)o(tax)g(of)g(the)g(blo)q(c)o(king)h(receiv)o(e)h(op) q(eration)e(is)h(giv)o(en)f(b)q(elo)o(w.)75 1037 y Fq(MPI)p 160 1037 14 2 v 16 w(RECV)h(\(buf,)f(count,)h(datat)o(yp)q(e,)h (source,)e(tag,)g(comm,)e(status\))117 1114 y Fk(OUT)108 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(receiv)o(e)h(bu\013er)g (\(c)o(hoice\))117 1189 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(receiv)o(e)h(bu\013er)g(\(in)o(teger\))117 1264 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(receiv)o(e)h(bu\013er)g(elemen)o(t)e(\(handle\))117 1339 y(IN)155 b Fq(source)468 b Fk(rank)14 b(of)f(source)j(\(in)o (teger\))117 1414 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1490 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1565 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 1689 y Fo(int)23 b(MPI)p 245 1689 15 2 v 17 w(Recv\(void*)g(buf,)g(int) g(count,)h(MPI)p 979 1689 V 16 w(Datatype)f(datatype,)g(int)g(source,) 393 1746 y(int)h(tag,)f(MPI)p 683 1746 V 17 w(Comm)g(comm,)g(MPI)p 1034 1746 V 17 w(Status)g(*status\))75 1832 y(MPI)p 150 1832 V 17 w(RECV\(BUF,)f(COUNT,)h(DATATYPE,)g(SOURCE,)g(TAG,)g(COMM,)g (STATUS,)g(IERROR\))170 1888 y()g(BUF\(*\))170 1945 y(INTEGER)g(COUNT,)g(DATATYPE,)g(SOURCE,)g(TAG,)g(COMM,)g (STATUS\(MPI)p 1463 1945 V 16 w(STATUS)p 1623 1945 V 17 w(SIZE\),)170 2001 y(IERROR)166 2088 y Fu(The)15 b(blo)q(c)o(king)i (seman)o(tics)e(of)g(this)h(call)g(are)f(describ)q(ed)i(in)f(Sec.)k (1.4.)166 2144 y(The)15 b(receiv)o(e)h(bu\013er)f(consists)h(of)e(the)h (storage)f(con)o(taining)i Fq(count)g Fu(consecutiv)o(e)g(elemen)o(ts)g (of)f(the)75 2201 y(t)o(yp)q(e)e(sp)q(eci\014ed)i(b)o(y)e Fq(datat)o(yp)q(e)p Fu(,)h(starting)e(at)h(address)f Fq(buf)p Fu(.)20 b(The)13 b(length)h(of)e(the)h(receiv)o(ed)h(message)f (m)o(ust)75 2257 y(b)q(e)20 b(less)g(than)f(or)g(equal)h(to)f(the)h (length)g(of)f(the)g(receiv)o(e)h(bu\013er.)33 b(An)20 b(o)o(v)o(er\015o)o(w)e(error)g(o)q(ccurs)i(if)g(all)75 2314 y(incoming)c(data)f(do)q(es)h(not)e(\014t,)h(without)g (truncation,)g(in)o(to)g(the)h(receiv)o(e)g(bu\013er.)166 2370 y(If)i(a)f(message)g(that)f(is)i(shorter)f(than)g(the)h(receiv)o (e)g(bu\013er)f(arriv)o(es,)g(then)h(only)g(those)f(lo)q(cations)75 2427 y(corresp)q(onding)f(to)f(the)g(\(shorter\))f(message)h(are)g(mo)q (di\014ed.)189 2533 y Fj(A)n(dvic)n(e)h(to)i(users.)47 b Fu(The)16 b Fq(MPI)p 733 2533 14 2 v 16 w(PROBE)i Fu(function)f (describ)q(ed)h(in)f(Section)h(1.8)d(can)i(b)q(e)g(used)g(to)189 2589 y(receiv)o(e)f(messages)e(of)h(unkno)o(wn)h(length.)k(\()p Fj(End)c(of)g(advic)n(e)g(to)h(users.)p Fu(\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 6 8 6 7 bop 75 -100 a Fu(6)631 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)189 45 y Fj(A)n(dvic)n(e)f(to)i(implementors.)46 b Fu(Ev)o(en)16 b(though)g(no)h(sp)q(eci\014c)h(b)q(eha)o(vior)f(is)f (mandated)h(b)o(y)f Fq(MPI)g Fu(for)189 102 y(erroneous)f(programs,)f (the)h(recommended)h(handling)h(of)e(o)o(v)o(er\015o)o(w)f(situations)h (is)h(to)f(return)g(in)189 158 y Fq(status)21 b Fu(information)e(ab)q (out)g(the)g(source)g(and)g(tag)f(of)h(the)g(incoming)h(message.)31 b(The)19 b(receiv)o(e)189 214 y(op)q(eration)e(will)j(return)d(an)g (error)g(co)q(de.)28 b(A)17 b(qualit)o(y)h(implemen)o(tation)h(will)g (also)f(ensure)g(that)189 271 y(no)d(memory)f(that)h(is)h(outside)f (the)h(receiv)o(e)g(bu\013er)f(will)i(ev)o(er)e(b)q(e)h(o)o(v)o (erwritten.)189 344 y(In)g(the)f(case)g(of)g(a)g(message)g(shorter)g (than)g(the)g(receiv)o(e)h(bu\013er,)f Fq(MPI)g Fu(is)h(quite)g(strict) f(in)h(that)f(it)189 400 y(allo)o(ws)h(no)g(mo)q(di\014cation)h(of)f (the)g(other)g(lo)q(cations.)23 b(A)16 b(more)g(lenien)o(t)h(statemen)o (t)e(w)o(ould)i(allo)o(w)189 457 y(for)c(some)h(optimizations)g(but)g (this)h(is)f(not)g(allo)o(w)o(ed.)19 b(The)c(implemen)o(tation)g(m)o (ust)e(b)q(e)i(ready)f(to)189 513 y(end)i(a)g(cop)o(y)g(in)o(to)g(the)h (receiv)o(er)f(memory)g(exactly)h(at)e(the)h(end)h(of)f(the)g(receiv)o (e)h(bu\013er,)f(ev)o(en)g(if)189 569 y(it)f(is)h(an)f(o)q(dd)h (address.)k(\()p Fj(End)15 b(of)h(advic)n(e)h(to)f(implementors.)p Fu(\))166 659 y(The)22 b(selection)i(of)d(a)h(message)g(b)o(y)g(a)f (receiv)o(e)i(op)q(eration)g(is)f(go)o(v)o(erned)g(b)o(y)g(the)g(v)m (alue)h(of)f(the)75 715 y(message)13 b(en)o(v)o(elop)q(e.)20 b(A)14 b(message)f(can)g(b)q(e)h(receiv)o(ed)h(b)o(y)e(a)g(receiv)o(e)i (op)q(eration)e(if)h(its)g(en)o(v)o(elop)q(e)g(matc)o(hes)75 772 y(the)e Fq(source)p Fu(,)g Fq(tag)g Fu(and)g Fq(comm)e Fu(v)m(alues)j(sp)q(eci\014ed)h(b)o(y)e(the)f(receiv)o(e)i(op)q (eration.)19 b(The)12 b(receiv)o(er)h(ma)o(y)e(sp)q(ecify)75 828 y(a)18 b(wildcard)h Fh(MPI)p 380 828 13 2 v 15 w(ANY)p 480 828 V 14 w(SOURCE)e Fu(v)m(alue)i(for)f Fq(source)p Fu(,)h(and/or)e(a)h(wildcard)36 b Fh(MPI)p 1491 828 V 14 w(ANY)p 1590 828 V 15 w(T)m(A)o(G)17 b Fu(v)m(alue)j(for)75 885 y Fq(tag)p Fu(,)12 b(indicating)i(that)d(an)o(y)h(source)g(and/or)f (tag)g(are)g(acceptable.)20 b(It)12 b(cannot)g(sp)q(ecify)h(a)f (wildcard)h(v)m(alue)75 941 y(for)h Fq(comm)p Fu(.)k(Th)o(us,)c(a)g (message)g(can)h(b)q(e)g(receiv)o(ed)g(b)o(y)g(a)f(receiv)o(e)h(op)q (eration)g(only)g(if)g(it)g(is)g(addressed)g(to)75 998 y(the)i(receiving)i(pro)q(cess,)e(has)g(a)g(matc)o(hing)g(comm)o (unicator,)f(has)h(matc)o(hing)g(source)g(unless)i(source=)75 1054 y Fh(MPI)p 152 1054 V 14 w(ANY)p 251 1054 V 15 w(SOURCE)13 b Fu(in)j(the)g(pattern,)e(and)i(has)f(a)f(matc)o(hing)i(tag)e(unless)i (tag=)e Fh(MPI)p 1553 1054 V 14 w(ANY)p 1652 1054 V 15 w(T)m(A)o(G)g Fu(in)i(the)75 1110 y(pattern.)166 1167 y(The)24 b(message)g(tag)f(is)i(sp)q(eci\014ed)h(b)o(y)e(the)g Fq(tag)g Fu(argumen)o(t)g(of)g(the)g(receiv)o(e)h(op)q(eration.)47 b(The)75 1223 y(argumen)o(t)24 b Fq(source)p Fu(,)i(if)f(di\013eren)o (t)g(from)e Fh(MPI)p 879 1223 V 14 w(ANY)p 978 1223 V 15 w(SOURCE)p Fu(,)f(is)j(sp)q(eci\014ed)h(as)e(a)g(rank)g(within)i (the)75 1280 y(pro)q(cess)e(group)f(asso)q(ciated)g(with)h(that)e(same) i(comm)o(unicator)e(\(remote)h(pro)q(cess)h(group,)g(for)f(in-)75 1336 y(tercomm)o(unicators\).)37 b(Th)o(us,)23 b(the)e(range)g(of)g(v)m (alid)j(v)m(alues)e(for)f(the)g Fq(source)h Fu(argumen)o(t)f(is)h Fi(f)p Fq(0,...,n-)75 1393 y(1)p Fi(g[f)p Fq(MPI)p 259 1393 14 2 v 15 w(ANY)p 366 1393 V 17 w(SOURCE)p Fi(g)p Fu(,)16 b(where)g Fq(n)g Fu(is)f(the)h(n)o(um)o(b)q(er)f(of)g(pro)q (cesses)g(in)h(this)g(group.)166 1449 y(Note)i(the)i(asymmetry)d(b)q (et)o(w)o(een)j(send)f(and)g(receiv)o(e)h(op)q(erations:)28 b(A)19 b(receiv)o(e)h(op)q(eration)f(ma)o(y)75 1506 y(accept)13 b(messages)f(from)g(an)h(arbitrary)f(sender,)i(on)f(the)g(other)f (hand,)h(a)g(send)g(op)q(eration)g(m)o(ust)g(sp)q(ecify)75 1562 y(a)i(unique)j(receiv)o(er.)k(This)16 b(matc)o(hes)f(a)h(\\push")f (comm)o(unication)i(mec)o(hanism,)f(where)g(data)f(transfer)75 1619 y(is)i(e\013ected)h(b)o(y)f(the)g(sender)g(\(rather)f(than)h(a)g (\\pull")h(mec)o(hanism,)g(where)f(data)f(transfer)g(is)i(e\013ected)75 1675 y(b)o(y)d(the)g(receiv)o(er\).)166 1731 y(Source)g(=)h (destination)g(is)g(allo)o(w)o(ed,)f(that)f(is,)i(a)e(pro)q(cess)i(can) f(send)h(a)f(message)g(to)f(itself.)21 b(\(Ho)o(w-)75 1788 y(ev)o(er,)c(it)h(is)g(unsafe)f(to)g(do)g(so)g(with)h(the)g(blo)q (c)o(king)g(send)g(and)g(receiv)o(e)g(op)q(erations)f(describ)q(ed)j (ab)q(o)o(v)o(e,)75 1844 y(since)c(this)g(ma)o(y)e(lead)i(to)f(deadlo)q (c)o(k.)21 b(See)16 b(Sec.)k(1.5.\))189 1934 y Fj(A)n(dvic)n(e)15 b(to)i(implementors.)43 b Fu(Message)15 b(con)o(text)g(and)h(other)g (comm)o(unicator)f(information)h(can)189 1990 y(b)q(e)k(implemen)o(ted) h(as)e(an)h(additional)h(tag)d(\014eld.)34 b(It)20 b(di\013ers)g(from)f (the)g(regular)h(message)f(tag)189 2047 y(in)i(that)e(wild)j(card)e (matc)o(hing)h(is)f(not)g(allo)o(w)o(ed)h(on)f(this)h(\014eld,)i(and)d (that)g(v)m(alue)h(setting)g(for)189 2103 y(this)e(\014eld)h(is)g(con)o (trolled)g(b)o(y)f(comm)o(unicator)f(manipulation)j(functions.)32 b(\()p Fj(End)19 b(of)h(advic)n(e)g(to)189 2160 y(implementors.)p Fu(\))75 2279 y Fl(1.2.5)49 b(Return)16 b(status)75 2365 y Fu(The)g(source)f(or)g(tag)f(of)h(a)g(receiv)o(ed)h(message)f(ma)o(y) g(not)g(b)q(e)g(kno)o(wn)h(if)f(wildcard)i(v)m(alues)f(w)o(ere)f(used)h (in)75 2421 y(the)d(receiv)o(e)h(op)q(eration.)19 b(Also,)13 b(if)h(m)o(ultiple)g(requests)f(are)g(completed)h(b)o(y)e(a)h(single)h Fq(MPI)e Fu(function)i(\(see)-2035 b Fi(>)75 2478 y Fu(Section)12 b Fp(??)p Fu(\),)f(a)h(distinct)g(error)f(co)q(de)h(ma)o(y)f(need)i(to) e(b)q(e)h(returned)g(for)f(eac)o(h)g(request.)19 b(The)12 b(information)75 2534 y(is)j(returned)f(b)o(y)g(the)g Fq(status)i Fu(argumen)o(t)d(of)h Fq(MPI)p 907 2534 V 16 w(RECV)p Fu(.)g(The)h(t)o(yp)q(e)f(of)f Fq(status)j Fu(is)f Fq(MPI)p Fu(-de\014ned.)20 b(Status)75 2591 y(v)m(ariables)d (need)f(to)e(b)q(e)i(explicitly)i(allo)q(cated)e(b)o(y)f(the)h(user,)f (that)f(is,)h(they)h(are)f(not)f(system)h(ob)s(jects.)166 2647 y(In)22 b(C,)e Fq(status)j Fu(is)f(a)f(structure)f(that)h(con)o (tains)g(three)g(\014elds)h(named)g Fh(MPI)p 1488 2647 13 2 v 14 w(SOURCE)p Fu(,)d Fh(MPI)p 1771 2647 V 14 w(T)m(A)o(G)p Fu(,)75 2704 y(and)g Fh(MPI)p 244 2704 V 14 w(ERROR)p Fu(;)e(the)i(structure)f(ma)o(y)g(con)o(tain)h(additional)h(\014elds.) 31 b(Th)o(us,)19 b Fq(status.MPI)p 1672 2704 14 2 v 18 w(SOURCE)p Fu(,)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 7 9 7 8 bop 75 -100 a Fm(1.2.)34 b(BLOCKING)17 b(SEND)e(AND)g(RECEIVE)g (OPERA)l(TIONS)620 b Fu(7)75 45 y Fq(status.MPI)p 284 45 14 2 v 17 w(T)l(A)o(G)12 b Fu(and)f Fq(status.MPI)p 689 45 V 17 w(ERROR)i Fu(con)o(tain)e(the)g(source,)g(tag,)f(and)h (error)g(co)q(de,)g(resp)q(ectiv)o(ely)l(,)75 102 y(of)k(the)g(receiv)o (ed)h(message.)166 158 y(In)22 b(F)l(ortran,)g Fq(status)i Fu(is)e(an)g(arra)o(y)e(of)i Fo(INTEGER)p Fu(s)f(of)g(size)i Fh(MPI)p 1291 158 13 2 v 14 w(ST)m(A)m(TUS)p 1458 158 V 14 w(SIZE)p Fu(.)e(The)h(constan)o(ts)75 214 y Fh(MPI)p 152 214 V 14 w(SOURCE)p Fu(,)14 b Fh(MPI)p 430 214 V 14 w(T)m(A)o(G)h Fu(and)h Fh(MPI)p 703 214 V 14 w(ERROR)e Fu(are)i(the)g(indices)h(of)f(the)f(en)o(tries)h(that)f(store)g(the)h (source,)75 271 y(tag)11 b(and)i(error)f(\014elds.)20 b(Th)o(us,)12 b Fq(status\(MPI)p 817 271 14 2 v 18 w(SOURCE\))p Fu(,)h Fq(status\(MPI)p 1264 271 V 17 w(T)l(A)o(G\))g Fu(and)f Fq(status\(MPI)p 1694 271 V 18 w(ERROR\))75 327 y Fu(con)o(tain,)j(resp)q(ectiv)o(ely)l(,)i(the)e(source,)g(tag)f (and)i(error)e(co)q(de)i(of)f(the)g(receiv)o(ed)h(message.)166 384 y(In)21 b(general,)g(message)e(passing)i(calls)g(do)f(not)g(mo)q (dify)g(the)g(v)m(alue)h(of)f(the)g(error)f(co)q(de)i(\014eld)g(of)75 440 y(status)c(v)m(ariables.)30 b(This)19 b(\014eld)g(ma)o(y)e(b)q(e)i (up)q(dated)g(only)g(b)o(y)f(the)g(functions)h(in)g(Section)g(1.7.5)d (whic)o(h)75 497 y(return)g(m)o(ultiple)i(statuses.)k(The)17 b(\014eld)g(is)g(up)q(dated)g(if)f(and)h(only)f(if)h(suc)o(h)f (function)h(returns)g(with)f(an)75 553 y(error)e(co)q(de)i(of)f Fh(MPI)p 420 553 13 2 v 14 w(ERR)p 513 553 V 15 w(IN)p 569 553 V 15 w(ST)m(A)m(TUS)p Fu(.)189 659 y Fj(R)n(ationale.)37 b Fu(The)13 b(error)e(\014eld)i(in)g(status)e(is)h(not)g(needed)h(for)f (calls)h(that)e(return)h(only)g(one)g(status,)189 716 y(suc)o(h)k(as)g Fq(MPI)p 434 716 14 2 v 16 w(W)l(AIT)p Fu(,)g(since)i(that)e(w)o(ould)g(only)h(duplicate)i(the)d(information)h (returned)g(b)o(y)f(the)189 772 y(function)d(itself.)20 b(The)13 b(curren)o(t)f(design)i(a)o(v)o(oids)e(the)h(additional)h(o)o (v)o(erhead)e(of)g(setting)h(it,)g(in)h(suc)o(h)189 829 y(cases.)27 b(The)18 b(\014eld)h(is)f(needed)h(for)e(calls)h(that)f (return)h(m)o(ultiple)h(statuses,)e(since)i(eac)o(h)f(request)189 885 y(ma)o(y)c(ha)o(v)o(e)h(had)g(a)g(di\013eren)o(t)h(failure.)21 b(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))1937 946 y Fi(?)166 992 y Fu(The)h(status)e(argumen)o(t)h(also)g(returns)g (information)h(on)f(the)h(length)g(of)f(the)g(message)g(receiv)o(ed.)75 1048 y(Ho)o(w)o(ev)o(er,)12 b(this)i(information)f(is)h(not)f(directly) h(a)o(v)m(ailable)h(as)e(a)g(\014eld)h(of)f(the)h(status)e(v)m(ariable) j(and)e(a)g(call)75 1104 y(to)i Fq(MPI)p 216 1104 V 15 w(GET)p 319 1104 V 17 w(COUNT)h Fu(is)g(required)g(to)f(\\deco)q(de")g (this)h(information.)75 1255 y Fq(MPI)p 160 1255 V 16 w(GET)p 264 1255 V 17 w(COUNT\(status,)h(datat)o(yp)q(e,)f(count\))117 1333 y Fk(IN)155 b Fq(status)476 b Fk(return)15 b(status)g(of)e(receiv) o(e)i(op)q(eration)f(\(Status\))117 1408 y(IN)155 b Fq(datat)o(yp)q(e) 424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(receiv)o(e)h(bu\013er)g(en) o(try)g(\(handle\))117 1483 y(OUT)108 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(receiv)o(ed)h(en)o(tries)g(\(in)o (teger\))1937 1561 y Fi(>)75 1607 y Fo(int)23 b(MPI)p 245 1607 15 2 v 17 w(Get)p 334 1607 V 17 w(count\(MPI)p 567 1607 V 16 w(Status)g(*status,)g(MPI)p 1037 1607 V 17 w(Datatype)f(datatype,)h(int)g(*count\))1937 1647 y Fi(?)75 1694 y Fo(MPI)p 150 1694 V 17 w(GET)p 239 1694 V 17 w(COUNT\(STATUS,)f(DATATYPE,)g(COUNT,)h(IERROR\))170 1750 y(INTEGER)g(STATUS\(MPI)p 604 1750 V 16 w(STATUS)p 764 1750 V 17 w(SIZE\),)g(DATATYPE,)f(COUNT,)h(IERROR)1937 1787 y Fi(>)166 1837 y Fu(Returns)12 b(the)f(n)o(um)o(b)q(er)h(of)f(en) o(tries)g(receiv)o(ed.)20 b(\(Again,)12 b(w)o(e)f(coun)o(t)g Fj(entries)p Fu(,)g(eac)o(h)g(of)g(t)o(yp)q(e)h Fj(datatyp)n(e)p Fu(,)75 1893 y(not)i Fj(bytes)p Fu(.\))k(The)d Fq(datat)o(yp)q(e)g Fu(argumen)o(t)e(should)i(matc)o(h)f(the)g(argumen)o(t)f(pro)o(vided)i (b)o(y)f(the)g(receiv)o(e)h(call)75 1950 y(that)h(set)h(the)g Fq(status)i Fu(v)m(ariable.)26 b(\(W)l(e)17 b(shall)h(later)f(see,)h (in)f(Section)h(1.12.5,)d(that)i Fq(MPI)p 1601 1950 14 2 v 15 w(GET)p 1704 1950 V 17 w(COUNT)75 2006 y Fu(ma)o(y)d(return,)h (in)h(certain)g(situations,)f(the)g(v)m(alue)i Fh(MPI)p 1023 2006 13 2 v 14 w(UNDEFINED)p Fu(.\))638 b Fi(?)189 2112 y Fj(R)n(ationale.)56 b Fu(Some)18 b(message)f(passing)h (libraries)i(use)e Fk(INOUT)h Fq(count)p Fu(,)g Fq(tag)f Fu(and)g Fq(source)g Fu(argu-)189 2169 y(men)o(ts,)f(th)o(us)h(using)g (them)g(b)q(oth)g(to)f(sp)q(ecify)i(the)f(selection)h(criteria)f(for)f (incoming)i(messages)189 2225 y(and)c(return)g(the)h(actual)f(en)o(v)o (elop)q(e)i(v)m(alues)f(of)f(the)g(receiv)o(ed)i(message.)i(The)d(use)g (of)f(a)f(separate)189 2282 y(status)g(argumen)o(t)h(prev)o(en)o(ts)g (errors)g(that)g(are)g(often)g(attac)o(hed)g(with)h Fk(INOUT)g Fu(argumen)o(t)f(\(e.g.,)189 2338 y(using)i(the)g Fh(MPI)p 466 2338 V 14 w(ANY)p 565 2338 V 15 w(T)m(A)o(G)e Fu(constan)o(t)h(as)g (the)g(tag)g(in)h(a)g(send\).)24 b(Some)16 b(libraries)i(use)f(calls)h (that)189 2395 y(refer)d(implicitly)j(to)d(the)g(\\last)g(message)f (receiv)o(ed.")21 b(This)16 b(is)g(not)e(thread)i(safe.)189 2470 y(The)e Fq(datat)o(yp)q(e)i Fu(argumen)o(t)e(is)h(passed)f(to)g Fq(MPI)p 991 2470 14 2 v 16 w(GET)p 1095 2470 V 17 w(COUNT)h Fu(so)f(as)g(to)g(impro)o(v)o(e)g(p)q(erformance.)189 2526 y(A)k(message)g(migh)o(t)g(b)q(e)h(receiv)o(ed)h(without)e(coun)o (ting)h(the)g(n)o(um)o(b)q(er)g(of)e(elemen)o(ts)j(it)e(con)o(tains,) 189 2583 y(and)g(the)h(coun)o(t)f(v)m(alue)h(is)g(often)f(not)g (needed.)31 b(Also,)19 b(this)g(allo)o(ws)g(the)f(same)g(function)i(to) d(b)q(e)189 2639 y(used)e(after)g(a)g(call)h(to)f Fq(MPI)p 662 2639 V 15 w(PROBE)p Fu(.)i(\()p Fj(End)e(of)i(r)n(ationale.)p Fu(\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 8 10 8 9 bop 75 -100 a Fu(8)631 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)166 45 y Fu(All)i(send)g(and)g(receiv)o(e)g(op)q (erations)f(use)h(the)f Fq(buf)p Fu(,)h Fq(count)p Fu(,)h Fq(datat)o(yp)q(e)p Fu(,)g Fq(source)p Fu(,)f Fq(dest)p Fu(,)h Fq(tag)p Fu(,)f Fq(comm)75 102 y Fu(and)12 b Fq(status)i Fu(argumen)o(ts)d(in)h(the)g(same)g(w)o(a)o(y)f(as)g(the)h(blo)q(c)o (king)h Fq(MPI)p 1216 102 14 2 v 16 w(SEND)f Fu(and)g Fq(MPI)p 1528 102 V 16 w(RECV)h Fu(op)q(erations)75 158 y(describ)q(ed)k(in)f(this)g(section.)75 300 y Fr(1.3)59 b(Data)19 b(t)n(yp)r(e)g(matching)f(and)h(data)g(conversion)75 403 y Fl(1.3.1)49 b(T)l(yp)q(e)17 b(matching)f(rules)75 489 y Fu(One)g(can)f(think)h(of)f(message)g(transfer)f(as)h(consisting) h(of)f(the)g(follo)o(wing)h(three)f(phases.)131 578 y(1.)22 b(Data)14 b(is)h(pulled)j(out)d(of)f(the)i(send)f(bu\013er)h(and)f(a)g (message)g(is)g(assem)o(bled.)131 670 y(2.)22 b(A)15 b(message)g(is)g(transferred)g(from)f(sender)i(to)f(receiv)o(er.)131 762 y(3.)22 b(Data)14 b(is)h(pulled)j(from)c(the)h(incoming)i(message)e (and)g(disassem)o(bled)i(in)o(to)e(the)g(receiv)o(e)h(bu\013er.)166 850 y(T)o(yp)q(e)k(matc)o(hing)f(has)h(to)e(b)q(e)j(observ)o(ed)e(at)g (eac)o(h)g(of)h(these)f(three)h(phases:)29 b(The)19 b(t)o(yp)q(e)h(of)f (eac)o(h)75 907 y(v)m(ariable)i(in)f(the)g(sender)g(bu\013er)g(has)g (to)f(matc)o(h)g(the)g(t)o(yp)q(e)h(sp)q(eci\014ed)i(for)d(that)g(en)o (try)g(b)o(y)h(the)f(send)75 963 y(op)q(eration;)d(the)f(t)o(yp)q(e)h (sp)q(eci\014ed)i(b)o(y)e(the)f(send)i(op)q(eration)e(has)h(to)f(matc)o (h)g(the)h(t)o(yp)q(e)f(sp)q(eci\014ed)j(b)o(y)e(the)75 1020 y(receiv)o(e)g(op)q(eration;)e(and)h(the)g(t)o(yp)q(e)f(of)h(eac)o (h)f(v)m(ariable)i(in)g(the)e(receiv)o(e)i(bu\013er)f(has)f(to)g(matc)o (h)g(the)h(t)o(yp)q(e)75 1076 y(sp)q(eci\014ed)f(for)e(that)g(en)o(try) g(b)o(y)g(the)g(receiv)o(e)h(op)q(eration.)20 b(A)12 b(program)f(that)h(fails)h(to)e(observ)o(e)h(these)h(three)75 1133 y(rules)j(is)g(erroneous.)166 1189 y(T)l(o)f(de\014ne)i(t)o(yp)q (e)f(matc)o(hing)g(more)f(precisely)l(,)j(w)o(e)d(need)i(to)e(deal)h (with)g(t)o(w)o(o)f(issues:)22 b(matc)o(hing)15 b(of)75 1246 y(t)o(yp)q(es)e(of)g(the)h(host)f(language)g(with)h(t)o(yp)q(es)g (sp)q(eci\014ed)h(in)f(comm)o(unication)h(op)q(erations;)e(and)h(matc)o (hing)75 1302 y(of)h(t)o(yp)q(es)g(at)g(sender)g(and)h(receiv)o(er.)166 1359 y(The)k(t)o(yp)q(es)f(of)h(a)f(send)h(and)g(receiv)o(e)h(matc)o(h) e(\(phase)g(t)o(w)o(o\))f(if)j(b)q(oth)e(op)q(erations)h(use)g(iden)o (tical)75 1415 y(names.)36 b(That)20 b(is,)i Fq(MPI)p 517 1415 V 16 w(INTEGER)f Fu(matc)o(hes)f Fq(MPI)p 1006 1415 V 16 w(INTEGER)p Fu(,)h Fq(MPI)p 1327 1415 V 16 w(REAL)g Fu(matc)o(hes)f Fq(MPI)p 1738 1415 V 16 w(REAL)p Fu(,)75 1471 y(and)12 b(so)g(on.)18 b(There)12 b(is)h(one)f(exception)h (to)e(this)h(rule,)h(discussed)g(in)g(Sec.)20 b(1.13,)10 b(the)i(t)o(yp)q(e)g Fq(MPI)p 1687 1471 V 16 w(P)l(A)o(CKED)75 1528 y Fu(can)j(matc)o(h)g(an)o(y)g(other)g(t)o(yp)q(e.)166 1584 y(The)k(t)o(yp)q(e)g(of)f(a)g(v)m(ariable)i(in)g(a)e(host)h (program)e(matc)o(hes)h(the)h(t)o(yp)q(e)g(sp)q(eci\014ed)i(in)e(the)g (comm)o(u-)75 1641 y(nication)g(op)q(eration)g(if)f(the)h(datat)o(yp)q (e)f(name)g(used)h(b)o(y)f(that)f(op)q(eration)i(corresp)q(onds)f(to)g (the)g(basic)75 1697 y(t)o(yp)q(e)f(of)g(the)g(host)g(program)f(v)m (ariable.)27 b(F)l(or)17 b(example,)h(an)f(en)o(try)g(with)g(t)o(yp)q (e)g(name)g Fq(MPI)p 1672 1697 V 16 w(INTEGER)75 1754 y Fu(matc)o(hes)c(a)g(F)l(ortran)g(v)m(ariable)i(of)e(t)o(yp)q(e)g Fo(INTEGER)p Fu(.)f(A)i(table)g(giving)g(this)g(corresp)q(ondence)h (for)e(F)l(ortran)75 1810 y(and)20 b(C)f(app)q(ears)h(in)h(Sec.)33 b(1.2.2.)f(There)20 b(are)f(t)o(w)o(o)g(exceptions)h(to)f(this)i(last)e (rule:)30 b(an)19 b(en)o(try)h(with)75 1867 y(t)o(yp)q(e)f(name)g Fq(MPI)p 391 1867 V 16 w(BYTE)h Fu(or)f Fq(MPI)p 687 1867 V 16 w(P)l(A)o(CKED)g Fu(can)g(b)q(e)h(used)g(to)e(matc)o(h)h(an)o (y)g(b)o(yte)g(of)g(storage)e(\(on)i(a)75 1923 y(b)o(yte-addressable)g (mac)o(hine\),)g(irresp)q(ectiv)o(e)h(of)e(the)g(datat)o(yp)q(e)g(of)g (the)g(v)m(ariable)i(that)d(con)o(tains)i(this)75 1980 y(b)o(yte.)f(The)12 b(t)o(yp)q(e)g Fq(MPI)p 466 1980 V 16 w(P)l(A)o(CKED)f Fu(is)h(used)g(to)f(send)i(data)e(that)f(has)i(b) q(een)h(explicitly)h(pac)o(k)o(ed,)e(or)f(receiv)o(e)75 2036 y(data)k(that)g(will)i(b)q(e)g(explicitly)h(unpac)o(k)o(ed,)e(see) g(Section)g(1.13.)k(The)c(t)o(yp)q(e)g Fq(MPI)p 1468 2036 V 16 w(BYTE)g Fu(allo)o(ws)g(one)g(to)75 2092 y(transfer)e(the)i (binary)g(v)m(alue)g(of)f(a)g(b)o(yte)g(in)h(memory)e(unc)o(hanged.)166 2149 y(T)l(o)h(summarize,)g(the)g(t)o(yp)q(e)h(matc)o(hing)f(rules)h (fall)g(in)o(to)f(the)g(three)h(categories)f(b)q(elo)o(w.)143 2238 y Fi(\017)23 b Fu(Comm)o(unication)11 b(of)f(t)o(yp)q(ed)i(v)m (alues)g(\(e.g.,)e(with)h(datat)o(yp)q(e)g(di\013eren)o(t)g(from)21 b Fq(MPI)p 1586 2238 V 16 w(BYTE)p Fu(\),)11 b(where)189 2294 y(the)k(datat)o(yp)q(es)f(of)g(the)h(corresp)q(onding)h(en)o (tries)f(in)h(the)f(sender)g(program,)e(in)j(the)f(send)g(call,)h(in) 189 2351 y(the)f(receiv)o(e)h(call)g(and)g(in)g(the)f(receiv)o(er)h (program)e(m)o(ust)h(all)h(matc)o(h.)143 2442 y Fi(\017)23 b Fu(Comm)o(unication)16 b(of)g(un)o(t)o(yp)q(ed)h(v)m(alues)g(\(e.g.,) e(of)g(datat)o(yp)q(e)h Fq(MPI)p 1330 2442 V 16 w(BYTE)p Fu(\),)g(where)g(b)q(oth)g(sender)189 2499 y(and)g(receiv)o(er)h(use)f (the)g(datat)o(yp)q(e)g Fq(MPI)p 881 2499 V 15 w(BYTE)p Fu(.)h(In)f(this)h(case,)f(there)g(are)g(no)f(requiremen)o(ts)i(on)189 2555 y(the)d(t)o(yp)q(es)h(of)f(the)g(corresp)q(onding)h(en)o(tries)g (in)h(the)e(sender)h(and)g(the)f(receiv)o(er)h(programs,)e(nor)h(is)189 2612 y(it)h(required)h(that)f(they)g(b)q(e)h(the)f(same.)143 2704 y Fi(\017)23 b Fu(Comm)o(unication)15 b(in)o(v)o(olving)i(pac)o(k) o(ed)e(data,)f(where)h Fq(MPI)p 1195 2704 V 16 w(P)l(A)o(CKED)g Fu(is)h(used.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 9 11 9 10 bop 75 -100 a Fm(1.3.)34 b(D)o(A)l(T)l(A)15 b(TYPE)g(MA)l(TCHING)g (AND)g(D)o(A)l(T)l(A)g(CONVERSION)542 b Fu(9)166 45 y(The)15 b(follo)o(wing)h(examples)g(illustrate)h(the)e(\014rst)g(t)o(w)o(o)e (cases.)75 151 y Fp(Example)18 b(1.1)k Fu(Sender)16 b(and)g(receiv)o (er)g(sp)q(ecify)g(matc)o(hing)g(t)o(yp)q(es.)75 245 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 302 y(IF\(rank.EQ.0\))f(THEN)170 358 y(CALL)i(MPI_SEND\(a\(1\),)e(10,)h (MPI_REAL,)g(1,)g(tag,)h(comm,)f(ierr\))75 415 y(ELSE)170 471 y(CALL)h(MPI_RECV\(b\(1\),)e(15,)h(MPI_REAL,)g(0,)g(tag,)h(comm,)f (status,)g(ierr\))75 527 y(END)g(IF)166 621 y Fu(This)16 b(co)q(de)h(is)f(correct)f(if)h(b)q(oth)g Fq(a)g Fu(and)g Fq(b)g Fu(are)f(real)h(arra)o(ys)f(of)g(size)i Fi(\025)d Fu(10.)21 b(\(In)16 b(F)l(ortran,)e(it)i(migh)o(t)75 678 y(b)q(e)e(correct)e(to)h(use)g(this)g(co)q(de)h(ev)o(en)f(if)h Fq(a)f Fu(or)f Fq(b)i Fu(ha)o(v)o(e)e(size)i Fg(<)f Fu(10:)19 b(e.g.,)12 b(when)h Fq(a\(1\))f Fu(can)h(b)q(e)h(equiv)m(alenced)75 734 y(to)h(an)g(arra)o(y)f(with)h(ten)g(reals.\))75 840 y Fp(Example)j(1.2)k Fu(Sender)16 b(and)g(receiv)o(er)g(do)f(not)g(sp)q (ecify)h(matc)o(hing)f(t)o(yp)q(es.)75 947 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 1003 y(IF\(rank.EQ.0\))f (THEN)170 1060 y(CALL)i(MPI_SEND\(a\(1\),)e(10,)h(MPI_REAL,)g(1,)g (tag,)h(comm,)f(ierr\))75 1116 y(ELSE)170 1173 y(CALL)h (MPI_RECV\(b\(1\),)e(40,)h(MPI_BYTE,)g(0,)g(tag,)h(comm,)f(status,)g (ierr\))75 1229 y(END)g(IF)166 1335 y Fu(This)d(co)q(de)g(is)f (erroneous,)h(since)g(sender)g(and)g(receiv)o(er)g(do)f(not)f(pro)o (vide)i(matc)o(hing)f(datat)o(yp)q(e)75 1392 y(argumen)o(ts.)75 1498 y Fp(Example)f(1.3)k Fu(Sender)16 b(and)g(receiv)o(er)g(sp)q (ecify)g(comm)o(unication)g(of)f(un)o(t)o(yp)q(ed)h(v)m(alues.)75 1592 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 1648 y(IF\(rank.EQ.0\))f(THEN)170 1705 y(CALL)i(MPI_SEND\(a\(1\),)e (40,)h(MPI_BYTE,)g(1,)g(tag,)h(comm,)f(ierr\))75 1761 y(ELSE)170 1818 y(CALL)h(MPI_RECV\(b\(1\),)e(60,)h(MPI_BYTE,)g(0,)g (tag,)h(comm,)f(status,)g(ierr\))75 1874 y(END)g(IF)166 1968 y Fu(This)16 b(co)q(de)g(is)g(correct,)e(irresp)q(ectiv)o(e)j(of)e (the)h(t)o(yp)q(e)f(and)h(size)g(of)f Fq(a)g Fu(and)h Fq(b)f Fu(\(unless)i(this)e(results)h(in)75 2024 y(an)f(out)g(of)g(b)q (ound)h(memory)e(access\).)189 2131 y Fj(A)n(dvic)n(e)e(to)i(users.)38 b Fu(If)12 b(a)g(bu\013er)g(of)f(t)o(yp)q(e)h Fh(MPI)p 965 2131 13 2 v 15 w(BYTE)f Fu(is)i(passed)f(as)g(an)g(argumen)o(t)f (to)g Fq(MPI)p 1732 2131 14 2 v 16 w(SEND)p Fu(,)189 2187 y(then)j Fq(MPI)g Fu(will)i(send)f(the)g(data)f(stored)g(at)f(con) o(tiguous)i(lo)q(cations,)g(starting)f(from)f(the)i(address)189 2244 y(indicated)22 b(b)o(y)e(the)h Fq(buf)g Fu(argumen)o(t.)35 b(This)21 b(ma)o(y)f(ha)o(v)o(e)g(unexp)q(ected)i(results)f(when)g(the) g(data)189 2300 y(la)o(y)o(out)f(is)i(not)f(as)f(a)h(casual)h(user)f(w) o(ould)h(exp)q(ect)f(it)h(to)e(b)q(e.)39 b(F)l(or)20 b(example,)j(some)e(F)l(ortran)189 2356 y(compilers)e(implemen)o(t)g(v) m(ariables)g(of)f(t)o(yp)q(e)g Fh(CHARA)o(CTER)e Fu(as)i(a)g(structure) f(that)h(con)o(tains)g(the)189 2413 y(c)o(haracter)c(length)i(and)g(a)f (p)q(oin)o(ter)h(to)f(the)g(actual)h(string.)k(In)c(suc)o(h)g(an)f(en)o (vironmen)o(t,)h(sending)189 2469 y(and)g(receiving)h(a)e(F)l(ortran)g Fh(CHARA)o(CTER)f Fu(v)m(ariable)j(using)g(the)e Fh(MPI)p 1378 2469 13 2 v 15 w(BYTE)g Fu(t)o(yp)q(e)h(will)h(not)e(ha)o(v)o(e) 189 2526 y(the)f(an)o(ticipated)i(result)f(of)f(transferring)h(the)f(c) o(haracter)g(string.)20 b(F)l(or)14 b(this)h(reason,)f(the)h(user)f(is) 189 2582 y(advised)i(to)e(use)i(t)o(yp)q(ed)f(comm)o(unications)h (whenev)o(er)g(p)q(ossible.)21 b(\()p Fj(End)16 b(of)g(advic)n(e)h(to)f (users.)p Fu(\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 10 12 10 11 bop 75 -100 a Fu(10)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(T)l(yp)q(e)f Fh(MPI)p 260 45 13 2 v 15 w(CHARA)o(CTER)75 131 y Fu(The)c(t)o(yp)q(e)g Fq(MPI)p 349 131 14 2 v 16 w(CHARA)o(CTER)h Fu(matc)o(hes)f(one)g(c)o (haracter)f(of)g(a)h(F)l(ortran)f(v)m(ariable)i(of)f(t)o(yp)q(e)g Fo(CHARACTER)p Fu(,)75 187 y(rather)20 b(then)g(the)h(en)o(tire)g(c)o (haracter)e(string)i(stored)f(in)h(the)f(v)m(ariable.)37 b(F)l(ortran)19 b(v)m(ariables)j(of)e(t)o(yp)q(e)75 244 y Fh(CHARA)o(CTER)g Fu(or)i(substrings)g(are)f(transferred)h(as)f(if)i (they)f(w)o(ere)g(arra)o(ys)e(of)i(c)o(haracters.)39 b(This)22 b(is)75 300 y(illustrated)17 b(in)f(the)f(example)h(b)q(elo)o (w.)75 407 y Fp(Example)i(1.4)k Fu(T)l(ransfer)15 b(of)g(F)l(ortran)f Fh(CHARA)o(CTER)p Fu(s.)75 513 y Fo(CHARACTER*10)22 b(a)75 569 y(CHARACTER*10)g(b)75 682 y(CALL)h(MPI_COMM_RANK\(comm,)f(rank,)h (ierr\))75 739 y(IF\(rank.EQ.0\))f(THEN)170 795 y(CALL)i(MPI_SEND\(a,)e (5,)i(MPI_CHARACTER,)e(1,)h(tag,)h(comm,)f(ierr\))75 852 y(ELSE)170 908 y(CALL)h(MPI_RECV\(b\(6:10\),)d(5,)j(MPI_CHARACTER,) e(0,)h(tag,)h(comm,)f(status,)g(ierr\))75 964 y(END)g(IF)166 1071 y Fu(The)14 b(last)h(\014v)o(e)f(c)o(haracters)g(of)f(string)i Fh(b)f Fu(at)g(pro)q(cess)g(1)g(are)g(replaced)i(b)o(y)e(the)g(\014rst) g(\014v)o(e)h(c)o(haracters)75 1127 y(of)g(string)g Fh(a)g Fu(at)g(pro)q(cess)g(0.)189 1233 y Fj(R)n(ationale.)45 b Fu(The)16 b(alternativ)o(e)h(c)o(hoice)g(w)o(ould)f(b)q(e)h(for)e Fq(MPI)p 1246 1233 V 16 w(CHARA)o(CTER)i Fu(to)f(matc)o(h)f(a)h(c)o (har-)189 1290 y(acter)e(of)h(arbitrary)g(length.)20 b(This)c(runs)f(in)o(to)h(problems.)189 1365 y(A)g(F)l(ortran)e(c)o (haracter)h(v)m(ariable)j(is)e(a)g(constan)o(t)f(length)h(string,)g (with)g(no)g(sp)q(ecial)i(termination)189 1421 y(sym)o(b)q(ol.)h(There) 12 b(is)h(no)g(\014xed)f(con)o(v)o(en)o(tion)h(on)f(ho)o(w)g(to)g (represen)o(t)g(c)o(haracters,)g(and)g(ho)o(w)g(to)g(store)189 1478 y(their)h(length.)20 b(Some)13 b(compilers)h(pass)e(a)h(c)o (haracter)f(argumen)o(t)g(to)g(a)h(routine)g(as)f(a)h(pair)g(of)f (argu-)189 1534 y(men)o(ts,)g(one)g(holding)h(the)f(address)h(of)e(the) h(string)g(and)h(the)f(other)f(holding)j(the)e(length)h(of)e(string.) 189 1591 y(Consider)h(the)f(case)h(of)f(an)g Fq(MPI)g Fu(comm)o(unication)h(call)h(that)e(is)h(passed)g(a)f(comm)o(unication) h(bu\013er)189 1647 y(with)17 b(t)o(yp)q(e)f(de\014ned)i(b)o(y)f(a)f (deriv)o(ed)h(datat)o(yp)q(e)f(\(Section)i(1.12\).)k(If)17 b(this)g(comm)o(unicator)f(bu\013er)189 1704 y(con)o(tains)e(v)m (ariables)h(of)e(t)o(yp)q(e)h Fo(CHARACTER)f Fu(then)h(the)g (information)g(on)g(their)h(length)f(will)i(not)d(b)q(e)189 1760 y(passed)i(to)g(the)g Fq(MPI)g Fu(routine.)189 1835 y(This)j(problem)g(forces)f(us)h(to)f(pro)o(vide)h(explicit)i (information)d(on)h(c)o(haracter)f(length)h(with)g(the)189 1892 y Fq(MPI)d Fu(call.)21 b(One)c(could)f(add)g(a)f(length)h (parameter)f(to)g(the)g(t)o(yp)q(e)h Fq(MPI)p 1411 1892 V 15 w(CHARA)o(CTER)p Fu(,)h(but)f(this)189 1948 y(do)q(es)11 b(not)g(add)h(m)o(uc)o(h)f(con)o(v)o(enience)i(and)e(the)h(same)f (functionalit)o(y)h(can)g(b)q(e)g(ac)o(hiev)o(ed)g(b)o(y)f(de\014ning) 189 2005 y(a)k(suitable)h(deriv)o(ed)g(datat)o(yp)q(e.)k(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))189 2111 y Fj(A)n(dvic)n(e)f(to) i(implementors.)48 b Fu(Some)16 b(compilers)i(pass)e(F)l(ortran)g Fh(CHARA)o(CTER)e Fu(argumen)o(ts)i(as)g(a)189 2167 y(structure)g(with) i(a)f(length)g(and)h(a)e(p)q(oin)o(ter)i(to)e(the)h(actual)h(string.)25 b(In)18 b(suc)o(h)f(an)g(en)o(vironmen)o(t,)189 2224 y(the)h Fq(MPI)g Fu(call)h(needs)h(to)d(dereference)j(the)e(p)q(oin)o (ter)h(in)g(order)g(to)e(reac)o(h)h(the)h(string.)29 b(\()p Fj(End)19 b(of)189 2280 y(advic)n(e)d(to)g(implementors.)p Fu(\))75 2402 y Fl(1.3.2)49 b(Data)17 b(conversion)75 2488 y Fu(One)g(of)e(the)h(goals)f(of)h Fq(MPI)f Fu(is)h(to)f(supp)q (ort)h(parallel)i(computations)d(across)g(heterogeneous)h(en)o(viron-) 75 2544 y(men)o(ts.)j(Comm)o(unication)d(in)g(a)f(heterogeneous)g(en)o (vironmen)o(t)g(ma)o(y)g(require)h(data)e(con)o(v)o(ersions.)20 b(W)l(e)75 2601 y(use)c(the)f(follo)o(wing)h(terminology)l(.)75 2695 y Fp(t)o(yp)q(e)h(con)o(v)o(ersion)22 b Fu(c)o(hanges)12 b(the)h(datat)o(yp)q(e)f(of)g(a)g(v)m(alue,)i(e.g.,)e(b)o(y)g(rounding) h(a)f Fo(REAL)g Fu(to)g(an)g Fo(INTEGER)p Fu(.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 11 13 11 12 bop 75 -100 a Fm(1.3.)34 b(D)o(A)l(T)l(A)15 b(TYPE)g(MA)l(TCHING) g(AND)g(D)o(A)l(T)l(A)g(CONVERSION)520 b Fu(11)75 45 y Fp(represen)o(tation)17 b(con)o(v)o(ersion)22 b Fu(c)o(hanges)16 b(the)g(binary)g(represen)o(tation)g(of)f(a)g(v)m(alue,)i(e.g.,)e(from) g(Hex)189 102 y(\015oating)g(p)q(oin)o(t)g(to)g(IEEE)g(\015oating)h(p)q (oin)o(t.)166 178 y(The)e(t)o(yp)q(e)f(matc)o(hing)h(rules)g(imply)h (that)e Fq(MPI)g Fu(comm)o(unication)h(nev)o(er)f(en)o(tails)i(t)o(yp)q (e)e(con)o(v)o(ersion.)75 235 y(On)20 b(the)g(other)f(hand,)i Fq(MPI)e Fu(requires)h(that)f(a)g(represen)o(tation)h(con)o(v)o(ersion) f(b)q(e)h(p)q(erformed)g(when)g(a)75 291 y(t)o(yp)q(ed)h(v)m(alue)h(is) f(transferred)f(across)g(en)o(vironmen)o(ts)h(that)f(use)h(di\013eren)o (t)f(represen)o(tations)h(for)f(the)75 348 y(datat)o(yp)q(e)h(of)f (this)i(v)m(alue.)38 b Fq(MPI)21 b Fu(do)q(es)g(not)g(sp)q(ecify)h (rules)g(for)f(represen)o(tation)g(con)o(v)o(ersion.)37 b(Suc)o(h)75 404 y(con)o(v)o(ersion)21 b(is)g(exp)q(ected)i(to)d (preserv)o(e)h(in)o(teger,)h(logical)g(or)e(c)o(haracter)h(v)m(alues,)i (and)e(to)f(con)o(v)o(ert)g(a)75 461 y(\015oating)15 b(p)q(oin)o(t)h(v)m(alue)g(to)f(the)g(nearest)g(v)m(alue)h(that)f(can)g (b)q(e)h(represen)o(ted)g(on)f(the)g(target)f(system.)166 517 y(Ov)o(er\015o)o(w)h(and)g(under\015o)o(w)g(exceptions)h(ma)o(y)f (o)q(ccur)g(during)h(\015oating)f(p)q(oin)o(t)h(con)o(v)o(ersions.)k (Con-)75 574 y(v)o(ersion)h(of)g(in)o(tegers)g(or)g(c)o(haracters)f(ma) o(y)g(also)i(lead)f(to)g(exceptions)h(when)g(a)e(v)m(alue)j(that)d(can) h(b)q(e)75 630 y(represen)o(ted)16 b(in)g(one)f(system)g(cannot)g(b)q (e)h(represen)o(ted)f(in)h(the)f(other)g(system.)20 b(An)15 b(exception)h(o)q(ccur-)75 686 y(ring)i(during)g(represen)o(tation)g (con)o(v)o(ersion)f(results)h(in)h(a)e(failure)i(of)e(the)g(comm)o (unication.)28 b(An)18 b(error)75 743 y(o)q(ccurs)e(either)f(in)h(the)g (send)g(op)q(eration,)f(or)f(the)i(receiv)o(e)g(op)q(eration,)f(or)f(b) q(oth.)166 799 y(If)22 b(a)f(v)m(alue)i(sen)o(t)e(in)h(a)f(message)g (is)h(un)o(t)o(yp)q(ed)h(\(i.e.,)f(of)f(t)o(yp)q(e)h Fq(MPI)p 1370 799 14 2 v 15 w(BYTE)p Fu(\),)g(then)g(the)f(binary)75 856 y(represen)o(tation)e(of)f(the)h(b)o(yte)g(stored)f(at)g(the)h (receiv)o(er)h(is)f(iden)o(tical)i(to)d(the)h(binary)g(represen)o (tation)75 912 y(of)d(the)h(b)o(yte)g(loaded)g(at)g(the)f(sender.)26 b(This)17 b(holds)h(true,)e(whether)h(sender)h(and)f(receiv)o(er)g(run) g(in)h(the)75 969 y(same)i(or)f(in)i(distinct)g(en)o(vironmen)o(ts.)35 b(No)20 b(represen)o(tation)g(con)o(v)o(ersion)g(is)h(required.)35 b(\(Note)20 b(that)75 1025 y(represen)o(tation)15 b(con)o(v)o(ersion)g (ma)o(y)g(o)q(ccur)g(when)h(v)m(alues)g(of)e(t)o(yp)q(e)i Fq(MPI)p 1307 1025 V 15 w(CHARA)o(CTER)h Fu(or)d Fq(MPI)p 1741 1025 V 16 w(CHAR)75 1082 y Fu(are)h(transferred,)f(for)h(example,) g(from)g(an)g(EBCDIC)g(enco)q(ding)i(to)d(an)h(ASCI)q(I)i(enco)q (ding.\))166 1138 y(No)g(con)o(v)o(ersion)h(need)g(o)q(ccur)g(when)h (an)e Fq(MPI)g Fu(program)f(executes)j(in)f(a)f(homogeneous)h(system,) 75 1195 y(where)d(all)i(pro)q(cesses)e(run)h(in)g(the)f(same)g(en)o (vironmen)o(t.)166 1251 y(Consider)d(the)g(three)g(examples,)h (1.1{1.3.)j(The)c(\014rst)g(program)e(is)j(correct,)e(assuming)h(that)f Fq(a)h Fu(and)75 1307 y Fq(b)i Fu(are)g Fo(REAL)f Fu(arra)o(ys)g(of)g (size)i Fi(\025)e Fu(10.)19 b(If)14 b(the)g(sender)g(and)g(receiv)o(er) h(execute)f(in)h(di\013eren)o(t)f(en)o(vironmen)o(ts,)75 1364 y(then)21 b(the)g(ten)h(real)f(v)m(alues)h(that)e(are)h(fetc)o (hed)g(from)g(the)g(send)g(bu\013er)g(will)i(b)q(e)f(con)o(v)o(erted)e (to)h(the)75 1420 y(represen)o(tation)g(for)f(reals)g(on)h(the)g (receiv)o(er)g(site)g(b)q(efore)g(they)f(are)h(stored)f(in)h(the)g (receiv)o(e)g(bu\013er.)75 1477 y(While)e(the)e(n)o(um)o(b)q(er)h(of)f (real)g(elemen)o(ts)h(fetc)o(hed)g(from)f(the)g(send)h(bu\013er)f (equal)i(the)e(n)o(um)o(b)q(er)h(of)f(real)75 1533 y(elemen)o(ts)d (stored)e(in)i(the)f(receiv)o(e)h(bu\013er,)f(the)g(n)o(um)o(b)q(er)g (of)g(b)o(ytes)g(stored)f(need)i(not)f(equal)h(the)f(n)o(um)o(b)q(er)75 1590 y(of)e(b)o(ytes)g(loaded.)20 b(F)l(or)11 b(example,)i(the)e (sender)h(ma)o(y)f(use)h(a)g(four)f(b)o(yte)g(represen)o(tation)h(and)g (the)f(receiv)o(er)75 1646 y(an)k(eigh)o(t)h(b)o(yte)f(represen)o (tation)g(for)f(reals.)166 1703 y(The)h(second)h(program)e(is)i (erroneous,)f(and)g(its)g(b)q(eha)o(vior)h(is)g(unde\014ned.)166 1759 y(The)e(third)g(program)e(is)i(correct.)19 b(The)13 b(exact)g(same)g(sequence)i(of)e(fort)o(y)f(b)o(ytes)h(that)g(w)o(ere)g (loaded)75 1816 y(from)i(the)h(send)g(bu\013er)g(will)h(b)q(e)g(stored) e(in)h(the)g(receiv)o(e)h(bu\013er,)e(ev)o(en)h(if)g(sender)h(and)f (receiv)o(er)g(run)g(in)75 1872 y(a)g(di\013eren)o(t)g(en)o(vironmen)o (t.)22 b(The)17 b(message)e(sen)o(t)h(has)g(exactly)g(the)g(same)g (length)h(\(in)f(b)o(ytes\))g(and)g(the)75 1928 y(same)g(binary)g (represen)o(tation)g(as)g(the)g(message)f(receiv)o(ed.)24 b(If)16 b Fq(a)f Fu(and)i Fq(b)f Fu(are)g(of)f(di\013eren)o(t)h(t)o(yp) q(es,)g(or)f(if)75 1985 y(they)h(are)f(of)h(the)g(same)f(t)o(yp)q(e)h (but)g(di\013eren)o(t)g(data)f(represen)o(tations)h(are)g(used,)g(then) g(the)g(bits)g(stored)75 2041 y(in)h(the)f(receiv)o(e)h(bu\013er)g(ma)o (y)e(enco)q(de)i(v)m(alues)h(that)d(are)h(di\013eren)o(t)g(from)g(the)g (v)m(alues)h(they)g(enco)q(ded)g(in)75 2098 y(the)e(send)h(bu\013er.) 166 2154 y(Data)e(represen)o(tation)i(con)o(v)o(ersion)f(also)h (applies)h(to)e(the)g(en)o(v)o(elop)q(e)i(of)e(a)g(message:)20 b(source,)15 b(des-)75 2211 y(tination)h(and)f(tag)f(are)h(all)h(in)o (tegers)g(that)e(ma)o(y)h(need)h(to)e(b)q(e)i(con)o(v)o(erted.)189 2293 y Fj(A)n(dvic)n(e)g(to)i(implementors.)50 b Fu(The)17 b(curren)o(t)f(de\014nition)j(do)q(es)e(not)g(require)g(messages)f(to)g (carry)189 2350 y(data)h(t)o(yp)q(e)i(information.)29 b(Both)18 b(sender)h(and)f(receiv)o(er)h(pro)o(vide)g(complete)g(data)e (t)o(yp)q(e)i(infor-)189 2406 y(mation.)24 b(In)17 b(a)g(heterogeneous) f(en)o(vironmen)o(t,)h(one)g(can)g(either)h(use)f(a)f(mac)o(hine)i (indep)q(enden)o(t)189 2462 y(enco)q(ding)h(suc)o(h)f(as)g(XDR,)f(or)h (ha)o(v)o(e)f(the)h(receiv)o(er)g(con)o(v)o(ert)g(from)f(the)h(sender)g (represen)o(tation)189 2519 y(to)c(its)i(o)o(wn,)e(or)h(ev)o(en)g(ha)o (v)o(e)g(the)g(sender)h(do)f(the)g(con)o(v)o(ersion.)189 2591 y(Additional)20 b(t)o(yp)q(e)e(information)g(migh)o(t)g(b)q(e)h (added)g(to)f(messages)g(in)h(order)f(to)f(allo)o(w)i(the)f(sys-)189 2647 y(tem)g(to)f(detect)i(mismatc)o(hes)f(b)q(et)o(w)o(een)g(datat)o (yp)q(e)g(at)g(sender)g(and)h(receiv)o(er.)29 b(This)19 b(migh)o(t)f(b)q(e)189 2704 y(particularly)13 b(useful)g(in)f(a)g(slo)o (w)o(er)f(but)h(safer)g(debug)g(mo)q(de.)19 b(\()p Fj(End)13 b(of)g(advic)n(e)g(to)h(implementors.)p Fu(\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 12 14 12 13 bop 75 -100 a Fu(12)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)166 45 y Fq(MPI)i Fu(do)q(es)g(not)g(require)h(supp)q(ort)g(for)e(in)o(ter-language)i (comm)o(unication.)33 b(The)20 b(b)q(eha)o(vior)f(of)g(a)75 102 y(program)12 b(is)i(unde\014ned)h(if)e(messages)g(are)g(sen)o(t)g (b)o(y)g(a)g(C)g(pro)q(cess)g(and)h(receiv)o(ed)g(b)o(y)f(a)g(F)l (ortran)f(pro)q(cess,)75 158 y(or)j(vice-v)o(ersa.)189 264 y Fj(R)n(ationale.)39 b Fq(MPI)15 b Fu(do)q(es)g(not)f(handle)i(in) o(ter-language)f(comm)o(unication)h(b)q(ecause)g(there)f(are)f(no)189 321 y(agreed)h(standards)g(for)g(the)g(corresp)q(ondence)i(b)q(et)o(w)o (een)f(C)f(t)o(yp)q(es)g(and)h(F)l(ortran)e(t)o(yp)q(es.)21 b(There-)189 377 y(fore,)14 b Fq(MPI)h Fu(programs)f(that)g(mix)i (languages)f(w)o(ould)h(not)e(p)q(ort.)20 b(\()p Fj(End)c(of)g(r)n (ationale.)p Fu(\))189 483 y Fj(A)n(dvic)n(e)k(to)h(implementors.)71 b Fq(MPI)20 b Fu(implemen)o(tors)h(ma)o(y)f(w)o(an)o(t)f(to)h(supp)q (ort)g(in)o(ter-language)189 540 y(comm)o(unication)13 b(b)o(y)g(allo)o(wing)g(F)l(ortran)f(programs)f(to)h(use)h(\\C)f(MPI)h (t)o(yp)q(es,")g(suc)o(h)g(as)f Fh(MPI)p 1782 540 13 2 v 14 w(INT,)189 596 y(MPI)p 266 596 V 14 w(CHAR)p Fu(,)19 b(etc.,)h(and)f(allo)o(wing)i(C)e(programs)g(to)g(use)h(F)l(ortran)e(t) o(yp)q(es.)33 b(\()p Fj(End)20 b(of)h(advic)n(e)f(to)189 653 y(implementors.)p Fu(\))75 796 y Fr(1.4)59 b(Communication)18 b(Mo)r(des)75 898 y Fu(The)e(send)h(call)h(describ)q(ed)g(in)f(Section) g(1.2.1)d(is)j Fp(blo)q(c)o(king)p Fu(:)23 b(it)16 b(do)q(es)h(not)f (return)g(un)o(til)h(the)f(message)75 954 y(data)j(and)g(en)o(v)o(elop) q(e)h(ha)o(v)o(e)f(b)q(een)h(safely)g(stored)f(a)o(w)o(a)o(y)e(so)i (that)g(the)g(sender)h(is)g(free)f(to)f(access)i(and)75 1010 y(o)o(v)o(erwrite)15 b(the)g(send)h(bu\013er.)k(The)c(message)f (migh)o(t)g(b)q(e)h(copied)g(directly)h(in)o(to)e(the)h(matc)o(hing)f (receiv)o(e)75 1067 y(bu\013er,)g(or)f(it)i(migh)o(t)f(b)q(e)h(copied)g (in)o(to)f(a)g(temp)q(orary)g(system)g(bu\013er.)166 1123 y(Message)c(bu\013ering)i(decouples)g(the)f(send)h(and)f(receiv)o (e)h(op)q(erations.)19 b(A)12 b(blo)q(c)o(king)h(send)g(can)f(com-)75 1180 y(plete)i(as)e(so)q(on)h(as)g(the)f(message)h(w)o(as)f (bu\013ered,)h(ev)o(en)h(if)f(no)g(matc)o(hing)g(receiv)o(e)g(has)g(b)q (een)h(executed)g(b)o(y)75 1236 y(the)f(receiv)o(er.)19 b(On)14 b(the)e(other)g(hand,)i(message)e(bu\013ering)h(can)g(b)q(e)g (exp)q(ensiv)o(e,)h(as)e(it)h(en)o(tails)h(additional)75 1293 y(memory-to-memory)j(cop)o(ying,)h(and)g(it)g(requires)h(the)f (allo)q(cation)h(of)e(memory)h(for)f(bu\013ering.)29 b Fq(MPI)75 1349 y Fu(o\013ers)12 b(the)i(c)o(hoice)g(of)f(sev)o(eral)g (comm)o(unication)i(mo)q(des)e(that)g(allo)o(w)g(one)h(to)e(con)o(trol) h(the)h(c)o(hoice)g(of)f(the)75 1406 y(comm)o(unication)j(proto)q(col.) 166 1462 y(The)g(send)h(call)g(describ)q(ed)h(in)e(Section)h(1.2.1)d (used)j(the)f Fp(standard)g Fu(comm)o(unication)h(mo)q(de.)22 b(In)75 1519 y(this)16 b(mo)q(de,)e(it)i(is)f(up)h(to)e Fq(MPI)h Fu(to)f(decide)j(whether)e(outgoing)g(messages)f(will)j(b)q(e) f(bu\013ered.)k Fq(MPI)15 b Fu(ma)o(y)75 1575 y(bu\013er)j(outgoing)h (messages.)29 b(In)19 b(suc)o(h)g(a)f(case,)h(the)f(send)h(call)h(ma)o (y)e(complete)h(b)q(efore)g(a)f(matc)o(hing)75 1631 y(receiv)o(e)d(is)f (in)o(v)o(ok)o(ed.)20 b(On)14 b(the)g(other)g(hand,)g(bu\013er)g(space) g(ma)o(y)f(b)q(e)h(una)o(v)m(ailable,)i(or)e Fq(MPI)f Fu(ma)o(y)g(c)o(ho)q(ose)75 1688 y(not)k(to)h(bu\013er)f(outgoing)h (messages,)g(for)f(p)q(erformance)h(reasons.)27 b(In)19 b(this)f(case,)g(the)g(send)g(call)h(will)75 1744 y(not)13 b(complete)h(un)o(til)g(a)f(matc)o(hing)g(receiv)o(e)h(has)f(b)q(een)i (p)q(osted,)e(and)g(the)h(data)e(has)h(b)q(een)i(mo)o(v)o(ed)d(to)h (the)75 1801 y(receiv)o(er.)166 1857 y(Th)o(us,)j(a)f(send)i(in)g (standard)f(mo)q(de)g(can)g(b)q(e)h(started)e(whether)h(or)g(not)f(a)h (matc)o(hing)g(receiv)o(e)h(has)75 1914 y(b)q(een)d(p)q(osted.)19 b(It)12 b(ma)o(y)g(complete)h(b)q(efore)g(a)f(matc)o(hing)g(receiv)o(e) i(is)f(p)q(osted.)19 b(The)13 b(standard)f(mo)q(de)g(send)75 1970 y(is)18 b Fp(non-lo)q(cal)p Fu(:)27 b(successful)19 b(completion)g(of)e(the)g(send)h(op)q(eration)g(ma)o(y)f(dep)q(end)i (on)e(the)h(o)q(ccurrence)75 2027 y(of)d(a)g(matc)o(hing)g(receiv)o(e.) 189 2133 y Fj(R)n(ationale.)42 b Fu(The)15 b(reluctance)i(of)e Fq(MPI)g Fu(to)g(mandate)g(whether)h(standard)f(sends)h(are)f (bu\013ering)189 2189 y(or)e(not)h(stems)g(from)f(the)i(desire)g(to)f (ac)o(hiev)o(e)g(p)q(ortable)h(programs.)j(Since)e(an)o(y)e(system)g (will)i(run)189 2246 y(out)d(of)g(bu\013er)g(resources)h(as)f(message)g (sizes)h(are)f(increased,)i(and)f(some)f(implemen)o(tations)i(ma)o(y) 189 2302 y(w)o(an)o(t)i(to)g(pro)o(vide)i(little)h(bu\013ering,)f Fq(MPI)e Fu(tak)o(es)h(the)g(p)q(osition)h(that)f(correct)g(\(and)g (therefore,)189 2359 y(p)q(ortable\))c(programs)e(do)i(not)g(rely)g(on) g(system)g(bu\013ering)g(in)h(standard)e(mo)q(de.)20 b(Bu\013ering)15 b(ma)o(y)189 2415 y(impro)o(v)o(e)g(the)h(p)q (erformance)g(of)g(a)f(correct)h(program,)e(but)i(it)g(do)q(esn't)g (a\013ect)f(the)h(result)g(of)g(the)189 2472 y(program.)33 b(If)21 b(the)f(user)g(wishes)h(to)f(guaran)o(tee)f(a)h(certain)h (amoun)o(t)e(of)h(bu\013ering,)h(the)g(user-)189 2528 y(pro)o(vided)13 b(bu\013er)g(system)f(of)g(Sec.)20 b(1.6)12 b(should)i(b)q(e)f(used,)g(along)g(with)g(the)g(bu\013ered-mo)q(de)h (send.)189 2585 y(\()p Fj(End)h(of)i(r)n(ationale.)p Fu(\))166 2691 y(There)e(are)g(three)h(additional)g(comm)o(unication)g (mo)q(des.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 13 15 13 14 bop 75 -100 a Fm(1.4.)34 b(COMMUNICA)l(TION)16 b(MODES)1048 b Fu(13)166 45 y(A)19 b Fp(bu\013ered)f Fu(mo)q(de)h(send)g(op)q(eration)g(can)g(b)q(e)h(started)e(whether)h (or)f(not)h(a)f(matc)o(hing)h(receiv)o(e)75 102 y(has)g(b)q(een)h(p)q (osted.)31 b(It)19 b(ma)o(y)f(complete)i(b)q(efore)f(a)f(matc)o(hing)h (receiv)o(e)h(is)g(p)q(osted.)31 b(Ho)o(w)o(ev)o(er,)18 b(unlik)o(e)75 158 y(the)k(standard)f(send,)i(this)f(op)q(eration)g(is) g Fp(lo)q(cal)p Fu(,)j(and)d(its)g(completion)h(do)q(es)f(not)f(dep)q (end)i(on)f(the)75 214 y(o)q(ccurrence)d(of)e(a)h(matc)o(hing)g(receiv) o(e.)28 b(Th)o(us,)18 b(if)g(a)g(send)g(is)g(executed)h(and)f(no)g (matc)o(hing)g(receiv)o(e)g(is)75 271 y(p)q(osted,)13 b(then)f Fq(MPI)g Fu(m)o(ust)f(bu\013er)h(the)g(outgoing)g(message,)g (so)g(as)f(to)h(allo)o(w)g(the)g(send)h(call)g(to)f(complete.)75 327 y(An)h(error)g(will)i(o)q(ccur)e(if)h(there)f(is)g(insu\016cien)o (t)i(bu\013er)e(space.)20 b(The)13 b(amoun)o(t)f(of)h(a)o(v)m(ailable)i (bu\013er)e(space)75 384 y(is)k(con)o(trolled)f(b)o(y)g(the)g(user)h(|) f(see)g(Section)h(1.6.)22 b(Bu\013er)16 b(allo)q(cation)h(b)o(y)f(the)g (user)g(ma)o(y)f(b)q(e)i(required)75 440 y(for)e(the)g(bu\013ered)g(mo) q(de)h(to)f(b)q(e)g(e\013ectiv)o(e.)166 497 y(A)j(send)g(that)f(uses)g (the)h Fp(sync)o(hronous)e Fu(mo)q(de)i(can)g(b)q(e)g(started)f (whether)g(or)g(not)h(a)f(matc)o(hing)75 553 y(receiv)o(e)k(w)o(as)e(p) q(osted.)34 b(Ho)o(w)o(ev)o(er,)19 b(the)h(send)h(will)g(complete)g (successfully)h(only)e(if)g(a)g(matc)o(hing)g(re-)75 610 y(ceiv)o(e)f(is)h(p)q(osted,)f(and)g(the)f(receiv)o(e)i(op)q (eration)f(has)f(started)g(to)g(receiv)o(e)h(the)g(message)f(sen)o(t)g (b)o(y)h(the)75 666 y(sync)o(hronous)c(send.)21 b(Th)o(us,)14 b(the)h(completion)i(of)d(a)h(sync)o(hronous)g(send)h(not)e(only)i (indicates)h(that)d(the)75 723 y(send)g(bu\013er)f(can)g(b)q(e)h (reused,)f(but)g(also)g(indicates)i(that)d(the)h(receiv)o(er)h(has)f (reac)o(hed)g(a)g(certain)h(p)q(oin)o(t)f(in)75 779 y(its)i(execution,) g(namely)g(that)e(it)i(has)f(started)g(executing)h(the)g(matc)o(hing)f (receiv)o(e.)21 b(If)14 b(b)q(oth)h(sends)g(and)75 835 y(receiv)o(es)e(are)e(blo)q(c)o(king)j(op)q(erations)e(then)g(the)g (use)h(of)e(the)h(sync)o(hronous)g(mo)q(de)g(pro)o(vides)h(sync)o (hronous)75 892 y(comm)o(unication)18 b(seman)o(tics:)25 b(a)18 b(comm)o(unication)g(do)q(es)g(not)g(complete)g(at)f(either)h (end)h(b)q(efore)f(b)q(oth)75 948 y(pro)q(cesses)e(rendezv)o(ous)f(at)g (the)g(comm)o(unication.)21 b(A)15 b(send)h(executed)g(in)g(this)g(mo)q (de)f(is)h Fp(non-lo)q(cal)p Fu(.)166 1005 y(A)e(send)h(that)e(uses)i (the)f Fp(ready)g Fu(comm)o(unication)g(mo)q(de)h(ma)o(y)e(b)q(e)i (started)e Fj(only)h Fu(if)h(the)f(matc)o(hing)75 1061 y(receiv)o(e)k(is)g(already)f(p)q(osted.)27 b(Otherwise,)18 b(the)f(op)q(eration)h(is)f(erroneous)g(and)h(its)f(outcome)g(is)h (unde-)75 1118 y(\014ned.)i(On)13 b(some)f(systems,)h(this)g(allo)o(ws) g(the)f(remo)o(v)m(al)h(of)f(a)h(hand-shak)o(e)g(op)q(eration)g(that)f (is)h(otherwise)75 1174 y(required)k(and)f(results)g(in)h(impro)o(v)o (ed)f(p)q(erformance.)22 b(The)16 b(completion)h(of)e(the)h(send)h(op)q (eration)f(do)q(es)75 1231 y(not)g(dep)q(end)i(on)e(the)g(status)f(of)h (a)g(matc)o(hing)g(receiv)o(e,)h(and)f(merely)h(indicates)h(that)d(the) h(send)h(bu\013er)75 1287 y(can)i(b)q(e)g(reused.)30 b(A)19 b(send)g(op)q(eration)g(that)f(uses)g(the)h(ready)f(mo)q(de)h (has)g(the)f(same)g(seman)o(tics)h(as)f(a)75 1344 y(standard)i(send)i (op)q(eration,)g(or)e(a)g(sync)o(hronous)h(send)g(op)q(eration;)j(it)d (is)g(merely)g(that)g(the)f(sender)75 1400 y(pro)o(vides)e(additional)g (information)g(to)e(the)i(system)f(\(namely)g(that)g(a)f(matc)o(hing)i (receiv)o(e)g(is)g(already)75 1456 y(p)q(osted\),)d(that)g(can)h(sa)o (v)o(e)e(some)i(o)o(v)o(erhead.)k(In)c(a)f(correct)g(program,)f (therefore,)h(a)g(ready)h(send)g(could)75 1513 y(b)q(e)i(replaced)g(b)o (y)f(a)f(standard)h(send)h(with)f(no)g(e\013ect)g(on)f(the)i(b)q(eha)o (vior)f(of)g(the)g(program)e(other)i(than)75 1569 y(p)q(erformance.)166 1626 y(Three)g(additional)i(send)f(functions)g(are)f(pro)o(vided)h(for) e(the)h(three)h(additional)g(comm)o(unication)75 1682 y(mo)q(des.)23 b(The)16 b(comm)o(unication)h(mo)q(de)g(is)f(indicated)i (b)o(y)e(a)g(one)g(letter)h(pre\014x:)22 b Fq(B)16 b Fu(for)g(bu\013ered,)g Fq(S)h Fu(for)75 1739 y(sync)o(hronous,)e(and)g Fq(R)h Fu(for)e(ready)l(.)75 1890 y Fq(MPI)p 160 1890 14 2 v 16 w(BSEND)i(\(buf,)f(count,)h(datat)o(yp)q(e,)h(dest,)f(tag,)f (comm\))117 1967 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 2042 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 2117 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e(\(handle\))117 2192 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o (teger\))117 2267 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 2343 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))75 2467 y Fo(int)23 b(MPI)p 245 2467 15 2 v 17 w(Bsend\(void*)g(buf,)g(int)g(count,)g(MPI)p 1002 2467 V 17 w(Datatype)g(datatype,)g(int)g(dest,)393 2523 y(int)h(tag,)f(MPI)p 683 2523 V 17 w(Comm)g(comm\))75 2610 y(MPI)p 150 2610 V 17 w(BSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g (TAG,)g(COMM,)h(IERROR\))170 2666 y()f(BUF\(*\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 14 16 14 15 bop 75 -100 a Fu(14)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)170 45 y Fo(INTEGER)23 b(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(IERROR)166 132 y Fu(Send)16 b(in)g(bu\013ered)g(mo)q(de.)75 283 y Fq(MPI)p 160 283 14 2 v 16 w(SSEND)g(\(buf,)f(count,)h(datat)o(yp)q (e,)g(dest,)h(tag,)e(comm\))117 360 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 435 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts) f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 510 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h (bu\013er)g(elemen)o(t)e(\(handle\))117 585 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 660 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 735 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))75 860 y Fo(int)23 b(MPI)p 245 860 15 2 v 17 w(Ssend\(void*)g(buf,)g(int)g (count,)g(MPI)p 1002 860 V 17 w(Datatype)g(datatype,)g(int)g(dest,)393 916 y(int)h(tag,)f(MPI)p 683 916 V 17 w(Comm)g(comm\))75 1003 y(MPI)p 150 1003 V 17 w(SSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g (TAG,)g(COMM,)h(IERROR\))170 1059 y()f(BUF\(*\))170 1116 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(IERROR)166 1202 y Fu(Send)16 b(in)g(sync)o(hronous)f(mo)q(de.)75 1353 y Fq(MPI)p 160 1353 14 2 v 16 w(RSEND)h(\(buf,)f(count,)h(datat)o (yp)q(e,)h(dest,)f(tag,)f(comm\))117 1430 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o (hoice\))117 1505 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 1581 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e(\(handle\))117 1656 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o (teger\))117 1731 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1806 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))75 1930 y Fo(int)23 b(MPI)p 245 1930 15 2 v 17 w(Rsend\(void*)g(buf,)g(int)g(count,)g(MPI)p 1002 1930 V 17 w(Datatype)g(datatype,)g(int)g(dest,)393 1987 y(int)h(tag,)f(MPI)p 683 1987 V 17 w(Comm)g(comm\))75 2073 y(MPI)p 150 2073 V 17 w(RSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g (TAG,)g(COMM,)h(IERROR\))170 2130 y()f(BUF\(*\))170 2186 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(IERROR)166 2273 y Fu(Send)16 b(in)g(ready)f(mo)q(de.)166 2329 y(There)20 b(is)g(only)h(one)f(receiv)o(e)h(op)q(eration,)g(whic)o(h)g(can)f(matc) o(h)f(an)o(y)g(of)h(the)g(send)g(mo)q(des.)35 b(The)75 2386 y(receiv)o(e)15 b(op)q(eration)g(describ)q(ed)h(in)f(the)f(last)g (section)h(is)g Fp(blo)q(c)o(king)p Fu(:)20 b(it)15 b(returns)f(only)g (after)g(the)g(receiv)o(e)75 2442 y(bu\013er)k(con)o(tains)h(the)f (newly)i(receiv)o(ed)f(message.)29 b(A)19 b(receiv)o(e)g(can)g (complete)g(b)q(efore)f(the)h(matc)o(hing)75 2498 y(send)d(has)f (completed)h(\(of)e(course,)h(it)h(can)f(complete)h(only)g(after)e(the) i(matc)o(hing)f(send)h(has)f(started\).)166 2555 y(In)f(a)g(m)o (ulti-threaded)h(implemen)o(tation)h(of)d Fq(MPI)p Fu(,)g(the)h(system) g(ma)o(y)f(de-sc)o(hedule)j(a)e(thread)g(that)75 2611 y(is)h(blo)q(c)o(k)o(ed)h(on)f(a)g(send)g(or)f(receiv)o(e)i(op)q (eration,)f(and)g(sc)o(hedule)i(another)d(thread)h(for)f(execution)i (in)g(the)75 2668 y(same)g(address)g(space.)22 b(In)16 b(suc)o(h)h(a)e(case)h(it)g(is)h(the)f(user's)f(resp)q(onsibilit)o(y)k (not)c(to)g(access)h(or)g(mo)q(dify)g(a)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 15 17 15 16 bop 75 -100 a Fm(1.5.)34 b(SEMANTICS)16 b(OF)f(POINT-TO-POINT)i (COMMUNICA)l(TION)450 b Fu(15)75 45 y(comm)o(unication)18 b(bu\013er)e(un)o(til)i(the)f(comm)o(unication)h(completes.)25 b(Otherwise,)18 b(the)f(outcome)f(of)h(the)75 102 y(computation)e(is)h (unde\014ned.)189 201 y Fj(R)n(ationale.)56 b Fu(W)l(e)18 b(prohibit)i(read)d(accesses)i(to)e(a)h(send)g(bu\013er)g(while)i(it)e (is)g(b)q(eing)i(used,)f(ev)o(en)189 258 y(though)f(the)g(send)g(op)q (eration)h(is)f(not)g(supp)q(osed)h(to)e(alter)h(the)g(con)o(ten)o(t)g (of)f(this)i(bu\013er.)28 b(This)189 314 y(ma)o(y)17 b(seem)h(more)f(stringen)o(t)g(than)h(necessary)l(,)g(but)g(the)g (additional)h(restriction)g(causes)f(little)189 370 y(loss)e(of)g (functionalit)o(y)i(and)f(allo)o(ws)g(b)q(etter)f(p)q(erformance)h(on)f (some)g(systems)g(|)h(consider)h(the)189 427 y(case)13 b(where)g(data)f(transfer)g(is)i(done)f(b)o(y)g(a)g(DMA)f(engine)j (that)d(is)h(not)g(cac)o(he-coheren)o(t)h(with)f(the)189 483 y(main)i(pro)q(cessor.)20 b(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))189 583 y Fj(A)n(dvic)n(e)10 b(to)j(implementors.)36 b Fu(Since)12 b(a)e(sync)o(hronous)g(send)h(cannot)f(complete)h(b)q (efore)g(a)f(matc)o(hing)189 639 y(receiv)o(e)16 b(is)f(p)q(osted,)h (one)f(will)i(not)e(normally)g(bu\013er)h(messages)e(sen)o(t)h(b)o(y)g (suc)o(h)h(an)f(op)q(eration.)189 713 y(It)j(is)h(recommended)g(to)e(c) o(ho)q(ose)i(bu\013ering)f(o)o(v)o(er)g(blo)q(c)o(king)h(the)g(sender,) g(whenev)o(er)g(p)q(ossible,)189 770 y(for)13 b(standard)h(sends.)20 b(The)15 b(programmer)e(can)i(signal)g(his)g(or)f(her)g(preference)h (for)f(blo)q(c)o(king)i(the)189 826 y(sender)f(un)o(til)i(a)e(matc)o (hing)g(receiv)o(e)h(o)q(ccurs)g(b)o(y)f(using)h(the)f(sync)o(hronous)g (send)h(mo)q(de.)189 901 y(A)f(p)q(ossible)i(comm)o(unication)g(proto)q (col)e(for)g(the)h(v)m(arious)f(comm)o(unication)i(mo)q(des)e(is)h (outlined)189 957 y(b)q(elo)o(w.)189 1031 y Fq(ready)f(send)p Fu(:)21 b(The)16 b(message)e(is)i(sen)o(t)f(as)g(so)q(on)g(as)g(p)q (ossible.)189 1105 y Fq(synchronous)20 b(send:)28 b Fu(The)19 b(sender)g(sends)g(a)f(request-to-send)h(message.)30 b(The)18 b(receiv)o(er)i(stores)189 1162 y(this)12 b(request.)19 b(When)13 b(a)e(matc)o(hing)i(receiv)o(e)g(is)f(p)q(osted,)h(the)f (receiv)o(er)h(sends)g(bac)o(k)f(a)f(p)q(ermission-)189 1218 y(to-send)k(message,)f(and)i(the)f(sender)h(no)o(w)f(sends)g(the)h (message.)189 1292 y Fq(standa)o(rd)e(send:)21 b Fu(First)13 b(proto)q(col)h(ma)o(y)e(b)q(e)j(used)f(for)f(short)f(messages,)h(and)h (second)g(proto)q(col)g(for)189 1349 y(long)h(messages.)189 1423 y Fq(bu\013ered)j(send:)25 b Fu(The)18 b(sender)g(copies)g(the)f (message)g(in)o(to)g(a)g(bu\013er)g(and)h(then)f(sends)h(it)g(with)f(a) 189 1479 y(non)o(blo)q(c)o(king)f(send)g(\(using)g(the)f(same)g(proto)q (col)g(as)g(for)f(standard)h(send\).)189 1554 y(Additional)i(con)o (trol)f(messages)g(migh)o(t)g(b)q(e)g(needed)i(for)d(\015o)o(w)h(con)o (trol)f(and)i(error)e(reco)o(v)o(ery)l(.)22 b(Of)189 1610 y(course,)15 b(there)g(are)g(man)o(y)f(other)h(p)q(ossible)i (proto)q(cols.)189 1684 y(Ready)i(send)h(can)g(b)q(e)g(implemen)o(ted)h (as)e(a)f(standard)h(send.)33 b(In)20 b(this)g(case)f(there)g(will)i(b) q(e)f(no)189 1741 y(p)q(erformance)15 b(adv)m(an)o(tage)g(\(or)f (disadv)m(an)o(tage\))h(for)g(the)g(use)h(of)e(ready)h(send.)189 1815 y(A)g(standard)f(send)i(can)f(b)q(e)h(implemen)o(ted)h(as)e(a)f (sync)o(hronous)i(send.)k(In)c(suc)o(h)f(a)g(case,)g(no)g(data)189 1871 y(bu\013ering)g(is)h(needed.)21 b(Ho)o(w)o(ev)o(er,)14 b(man)o(y)h(\(most?\))k(users)c(exp)q(ect)h(some)f(bu\013ering.)189 1945 y(In)h(a)g(m)o(ulti-threaded)i(en)o(vironmen)o(t,)e(the)h (execution)g(of)f(a)f(blo)q(c)o(king)j(comm)o(unication)f(should)189 2002 y(blo)q(c)o(k)k(only)g(the)f(executing)i(thread,)f(allo)o(wing)g (the)g(thread)f(sc)o(heduler)i(to)e(de-sc)o(hedule)j(this)189 2058 y(thread)15 b(and)g(sc)o(hedule)i(another)e(thread)g(for)f (execution.)21 b(\()p Fj(End)16 b(of)g(advic)n(e)g(to)h(implementors.)p Fu(\))75 2201 y Fr(1.5)59 b(Semantics)18 b(of)i(p)r(oint-to-p)r(oint)e (communication)75 2302 y Fu(A)g(v)m(alid)i Fq(MPI)e Fu(implemen)o (tation)h(guaran)o(tees)f(certain)h(general)f(prop)q(erties)h(of)f(p)q (oin)o(t-to-p)q(oin)o(t)h(com-)75 2359 y(m)o(unication,)d(whic)o(h)g (are)f(describ)q(ed)i(in)f(this)f(section.)75 2478 y Fq(Order)46 b Fu(Messages)17 b(are)g Fj(non-overtaking)p Fu(:)25 b(If)18 b(a)f(sender)i(sends)f(t)o(w)o(o)f(messages)g(in)i (succession)g(to)e(the)75 2534 y(same)d(destination,)i(and)f(b)q(oth)g (matc)o(h)f(the)h(same)f(receiv)o(e,)h(then)h(this)f(op)q(eration)g (cannot)f(receiv)o(e)i(the)75 2591 y(second)e(message)e(if)i(the)f (\014rst)g(one)h(is)f(still)i(p)q(ending.)21 b(If)13 b(a)g(receiv)o(er)h(p)q(osts)f(t)o(w)o(o)f(receiv)o(es)i(in)g (succession,)75 2647 y(and)k(b)q(oth)g(matc)o(h)f(the)h(same)g (message,)g(then)g(the)g(second)g(receiv)o(e)h(op)q(eration)f(cannot)g (b)q(e)g(satis\014ed)75 2704 y(b)o(y)g(this)g(message,)f(if)i(the)e (\014rst)h(one)g(is)g(still)h(p)q(ending.)29 b(This)19 b(requiremen)o(t)f(facilitates)h(matc)o(hing)e(of)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 16 18 16 17 bop 75 -100 a Fu(16)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(sends)k(to)f(receiv)o (es.)36 b(It)21 b(guaran)o(tees)f(that)f(message-passing)i(co)q(de)g (is)g(deterministic,)j(if)d(pro)q(cesses)75 102 y(are)d (single-threaded)j(and)e(the)g(wildcard)h Fh(MPI)p 913 102 13 2 v 14 w(ANY)p 1012 102 V 15 w(SOURCE)c Fu(is)k(not)e(used)h(in) h(receiv)o(es.)31 b(\(Some)18 b(of)75 158 y(the)c(calls)i(describ)q(ed) g(later,)e(suc)o(h)h(as)f Fq(MPI)p 813 158 14 2 v 15 w(CANCEL)h Fu(or)f Fq(MPI)p 1152 158 V 16 w(W)l(AIT)l(ANY)p Fu(,)g(are)g(additional)i(sources)e(of)75 214 y(nondeterminism.\))166 271 y(If)j(a)g(pro)q(cess)h(has)f(a)g(single)h(thread)f(of)g (execution,)i(then)e(an)o(y)g(t)o(w)o(o)f(comm)o(unications)i(executed) 75 327 y(b)o(y)e(this)h(pro)q(cess)g(are)f(ordered.)23 b(On)17 b(the)f(other)g(hand,)h(if)g(the)f(pro)q(cess)h(is)g(m)o (ulti-threaded,)g(then)g(the)75 384 y(seman)o(tics)e(of)f(thread)h (execution)h(ma)o(y)e(not)g(de\014ne)i(a)e(relativ)o(e)i(order)e(b)q (et)o(w)o(een)h(t)o(w)o(o)e(send)j(op)q(erations)75 440 y(executed)23 b(b)o(y)f(t)o(w)o(o)f(distinct)i(threads.)40 b(The)23 b(op)q(erations)f(are)g(logically)h(concurren)o(t,)h(ev)o(en)e (if)h(one)75 497 y(ph)o(ysically)f(precedes)e(the)g(other.)33 b(In)20 b(suc)o(h)g(a)f(case,)i(the)e(t)o(w)o(o)g(messages)g(sen)o(t)g (can)h(b)q(e)g(receiv)o(ed)h(in)75 553 y(an)o(y)f(order.)37 b(Similarly)l(,)24 b(if)d(t)o(w)o(o)e(receiv)o(e)j(op)q(erations)f (that)f(are)g(logically)j(concurren)o(t)e(receiv)o(e)g(t)o(w)o(o)75 610 y(successiv)o(ely)i(sen)o(t)d(messages,)h(then)g(the)g(t)o(w)o(o)f (messages)g(can)h(matc)o(h)f(the)h(t)o(w)o(o)e(receiv)o(es)j(in)f (either)75 666 y(order.)75 772 y Fp(Example)d(1.5)k Fu(An)16 b(example)g(of)f(non-o)o(v)o(ertaking)f(messages.)75 879 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 935 y(IF)h(\(rank.EQ.0\))e(THEN)170 992 y(CALL)i(MPI_BSEND\(buf1,)e (count,)h(MPI_REAL,)f(1,)i(tag,)f(comm,)g(ierr\))170 1048 y(CALL)h(MPI_BSEND\(buf2,)e(count,)h(MPI_REAL,)f(1,)i(tag,)f (comm,)g(ierr\))75 1104 y(ELSE)95 b(!)24 b(rank.EQ.1)170 1161 y(CALL)g(MPI_RECV\(buf1,)e(count,)h(MPI_REAL,)f(0,)i(MPI_ANY_TAG,) e(comm,)h(status,)g(ierr\))170 1217 y(CALL)h(MPI_RECV\(buf2,)e(count,)h (MPI_REAL,)f(0,)i(tag,)f(comm,)g(status,)g(ierr\))75 1274 y(END)g(IF)75 1380 y Fu(The)17 b(message)f(sen)o(t)h(b)o(y)g(the)f (\014rst)h(send)g(m)o(ust)f(b)q(e)i(receiv)o(ed)g(b)o(y)f(the)f (\014rst)h(receiv)o(e,)h(and)f(the)f(message)75 1437 y(sen)o(t)f(b)o(y)g(the)g(second)h(send)g(m)o(ust)e(b)q(e)i(receiv)o (ed)h(b)o(y)e(the)g(second)h(receiv)o(e.)75 1557 y Fq(Progress)45 b Fu(If)13 b(a)g(pair)g(of)f(matc)o(hing)h(send)h(and)f(receiv)o(es)g (ha)o(v)o(e)g(b)q(een)h(initiated)g(on)f(t)o(w)o(o)e(pro)q(cesses,)j (then)75 1613 y(at)k(least)h(one)h(of)e(these)h(t)o(w)o(o)f(op)q (erations)h(will)i(complete,)f(indep)q(enden)o(tly)i(of)c(other)h (actions)g(in)h(the)75 1670 y(system:)e(the)13 b(send)h(op)q(eration)f (will)h(complete,)g(unless)g(the)f(receiv)o(e)h(is)f(satis\014ed)h(b)o (y)e(another)h(message,)75 1726 y(and)h(completes;)g(the)g(receiv)o(e)h (op)q(eration)f(will)h(complete,)g(unless)g(the)f(message)f(sen)o(t)g (is)i(consumed)f(b)o(y)75 1782 y(another)h(matc)o(hing)g(receiv)o(e)h (that)f(w)o(as)f(p)q(osted)h(at)g(the)g(same)g(destination)h(pro)q (cess.)75 1889 y Fp(Example)i(1.6)k Fu(An)16 b(example)g(of)f(t)o(w)o (o,)e(in)o(tert)o(wined)j(matc)o(hing)f(pairs.)75 1983 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 2039 y(IF)h(\(rank.EQ.0\))e(THEN)170 2095 y(CALL)i(MPI_BSEND\(buf1,)e (count,)h(MPI_REAL,)f(1,)i(tag1,)f(comm,)g(ierr\))170 2152 y(CALL)h(MPI_SSEND\(buf2,)e(count,)h(MPI_REAL,)f(1,)i(tag2,)f (comm,)g(ierr\))75 2208 y(ELSE)95 b(!)24 b(rank.EQ.1)170 2265 y(CALL)g(MPI_RECV\(buf1,)e(count,)h(MPI_REAL,)f(0,)i(tag2,)f (comm,)g(status,)g(ierr\))170 2321 y(CALL)h(MPI_RECV\(buf2,)e(count,)h (MPI_REAL,)f(0,)i(tag1,)f(comm,)g(status,)g(ierr\))75 2378 y(END)g(IF)75 2472 y Fu(Both)18 b(pro)q(cesses)g(in)o(v)o(ok)o(e)h (their)f(\014rst)g(comm)o(unication)h(call.)30 b(Since)19 b(the)f(\014rst)g(send)h(of)f(pro)q(cess)g(zero)75 2528 y(uses)h(the)f(bu\013ered)h(mo)q(de,)g(it)g(m)o(ust)f(complete,)i (irresp)q(ectiv)o(e)g(of)e(the)g(state)g(of)g(pro)q(cess)h(one.)29 b(Since)75 2584 y(no)15 b(matc)o(hing)h(receiv)o(e)g(is)g(p)q(osted,)g (the)g(message)f(will)i(b)q(e)f(copied)h(in)o(to)e(bu\013er)h(space.)21 b(\(If)15 b(insu\016cien)o(t)75 2641 y(bu\013er)h(space)g(is)h(a)o(v)m (ailable,)g(then)f(the)g(program)f(will)j(fail.\))k(The)16 b(second)h(send)f(is)h(then)f(in)o(v)o(ok)o(ed.)22 b(A)o(t)75 2697 y(that)16 b(p)q(oin)o(t,)g(a)h(matc)o(hing)f(pair)h(of)f(send)h (and)f(receiv)o(e)h(op)q(eration)g(is)g(enabled,)h(and)e(b)q(oth)h(op)q (erations)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 17 19 17 18 bop 75 -100 a Fm(1.5.)29 b(SEMANTICS)16 b(OF)f(POINT-TO-POINT)i (COMMUNICA)l(TION)455 b Fu(17)75 45 y(m)o(ust)16 b(complete.)23 b(Pro)q(cess)16 b(one)g(next)g(in)o(v)o(ok)o(es)g(its)g(second)h (receiv)o(e)g(call,)g(whic)o(h)g(will)h(b)q(e)e(satis\014ed)h(b)o(y)75 102 y(the)c(bu\013ered)g(message.)19 b(Note)12 b(that)h(pro)q(cess)g (one)g(receiv)o(ed)h(the)f(messages)f(in)i(the)f(rev)o(erse)f(order)h (they)75 158 y(w)o(ere)i(sen)o(t.)75 278 y Fq(F)o(airness)46 b(MPI)15 b Fu(mak)o(es)h(no)f(guaran)o(tee)h(of)f Fj(fairness)g Fu(in)i(the)f(handling)h(of)f(comm)o(unication.)23 b(Supp)q(ose)75 335 y(that)17 b(a)g(send)h(is)g(p)q(osted.)26 b(Then)18 b(it)g(is)g(p)q(ossible)h(that)d(the)i(destination)g(pro)q(cess)g(rep)q (eatedly)g(p)q(osts)f(a)75 391 y(receiv)o(e)i(that)e(matc)o(hes)g(this) h(send,)h(y)o(et)e(the)h(message)f(is)h(nev)o(er)g(receiv)o(ed,)h(b)q (ecause)g(it)f(is)g(eac)o(h)g(time)75 447 y(o)o(v)o(ertak)o(en)c(b)o(y) i(another)f(message,)g(sen)o(t)h(from)f(another)g(source.)21 b(Similarly)l(,)d(supp)q(ose)f(that)e(a)g(receiv)o(e)75 504 y(w)o(as)f(p)q(osted)i(b)o(y)f(a)g(m)o(ulti-threaded)h(pro)q(cess.) k(Then)c(it)f(is)h(p)q(ossible)h(that)d(messages)h(that)f(matc)o(h)h (this)75 560 y(receiv)o(e)20 b(are)g(rep)q(eatedly)g(receiv)o(ed,)i(y)o (et)d(the)g(receiv)o(e)i(is)f(nev)o(er)f(satis\014ed,)i(b)q(ecause)f (it)g(is)g(o)o(v)o(ertak)o(en)75 617 y(b)o(y)15 b(other)h(receiv)o(es)g (p)q(osted)g(at)e(this)i(no)q(de)h(\(b)o(y)e(other)g(executing)h (threads\).)21 b(It)15 b(is)h(the)g(programmer's)75 673 y(resp)q(onsibilit)o(y)i(to)c(prev)o(en)o(t)h(starv)m(ation)g(in)h(suc) o(h)g(situations.)75 793 y Fq(Resource)23 b(limitations)46 b Fu(An)o(y)22 b(p)q(ending)i(comm)o(unication)e(op)q(eration)h (consumes)f(system)g(resources)75 850 y(that)14 b(are)g(limited.)22 b(Errors)14 b(ma)o(y)g(o)q(ccur)h(when)g(lac)o(k)g(of)f(resources)h (prev)o(en)o(t)f(the)h(execution)h(of)e(an)h Fq(MPI)75 906 y Fu(call.)20 b(A)13 b(qualit)o(y)g(implemen)o(tation)h(will)g(use) f(a)f(\(small\))g(\014xed)h(amoun)o(t)f(of)g(resources)h(for)f(eac)o(h) g(p)q(ending)75 963 y(send)i(in)f(the)g(ready)g(or)g(sync)o(hronous)g (mo)q(de)g(and)g(for)g(eac)o(h)g(p)q(ending)i(receiv)o(e.)20 b(Ho)o(w)o(ev)o(er,)12 b(bu\013er)h(space)75 1019 y(ma)o(y)g(b)q(e)h (consumed)g(to)e(store)h(messages)g(sen)o(t)g(in)h(standard)f(mo)q(de,) h(and)f(m)o(ust)g(b)q(e)h(consumed)g(to)f(store)75 1076 y(messages)e(sen)o(t)g(in)i(bu\013ered)f(mo)q(de,)g(when)g(no)f(matc)o (hing)h(receiv)o(e)h(is)f(a)o(v)m(ailable.)20 b(The)12 b(amoun)o(t)f(of)g(space)75 1132 y(a)o(v)m(ailable)17 b(for)e(bu\013ering)i(will)g(b)q(e)f(m)o(uc)o(h)g(smaller)h(than)e (program)g(data)g(memory)g(on)h(man)o(y)f(systems.)75 1189 y(Then,)g(it)h(will)h(b)q(e)e(easy)g(to)g(write)g(programs)f(that) h(o)o(v)o(errun)f(a)o(v)m(ailable)j(bu\013er)f(space.)166 1245 y Fq(MPI)e Fu(allo)o(ws)h(the)g(user)g(to)f(pro)o(vide)i(bu\013er) f(memory)f(for)g(messages)g(sen)o(t)h(in)h(the)f(bu\013ered)g(mo)q(de.) 75 1301 y(F)l(urthermore,)f Fq(MPI)g Fu(sp)q(eci\014es)j(a)e(detailed)h (op)q(erational)g(mo)q(del)g(for)e(the)h(use)h(of)e(this)i(bu\013er.)j (An)d Fq(MPI)75 1358 y Fu(implemen)o(tation)f(is)f(required)h(to)e(do)h (no)f(w)o(orse)g(than)h(implied)i(b)o(y)d(this)h(mo)q(del.)21 b(This)14 b(allo)o(ws)g(users)g(to)75 1414 y(a)o(v)o(oid)h(bu\013er)g (o)o(v)o(er\015o)o(ws)e(when)i(they)g(use)h(bu\013ered)f(sends.)20 b(Bu\013er)15 b(allo)q(cation)h(and)f(use)h(is)f(describ)q(ed)75 1471 y(in)h(Section)g(1.6.)166 1527 y(A)j(bu\013ered)g(send)h(op)q (eration)f(that)f(cannot)h(complete)h(b)q(ecause)f(of)g(a)g(lac)o(k)g (of)f(bu\013er)h(space)g(is)75 1584 y(erroneous.)36 b(When)20 b(suc)o(h)h(a)f(situation)h(is)g(detected,)h(an)f(error)e(is)i (signalled)i(that)c(ma)o(y)h(cause)h(the)75 1640 y(program)f(to)h (terminate)g(abnormally)l(.)38 b(On)22 b(the)f(other)g(hand,)i(a)e (standard)g(send)g(op)q(eration)h(that)75 1697 y(cannot)16 b(complete)g(b)q(ecause)h(of)f(lac)o(k)g(of)f(bu\013er)h(space)g(will)i (merely)e(blo)q(c)o(k,)h(w)o(aiting)f(for)f(bu\013er)h(space)75 1753 y(to)g(b)q(ecome)h(a)o(v)m(ailable)h(or)e(for)f(a)h(matc)o(hing)h (receiv)o(e)g(to)f(b)q(e)h(p)q(osted.)23 b(This)17 b(b)q(eha)o(vior)g (is)g(preferable)g(in)75 1810 y(man)o(y)h(situations.)31 b(Consider)20 b(a)e(situation)h(where)g(a)g(pro)q(ducer)g(rep)q (eatedly)h(pro)q(duces)g(new)f(v)m(alues)75 1866 y(and)j(sends)g(them)f (to)g(a)g(consumer.)39 b(Assume)22 b(that)e(the)i(pro)q(ducer)g(pro)q (duces)g(new)g(v)m(alues)h(faster)75 1922 y(than)18 b(the)g(consumer)g (can)g(consume)g(them.)28 b(If)18 b(bu\013ered)g(sends)g(are)g(used,)h (then)f(a)f(bu\013er)h(o)o(v)o(er\015o)o(w)75 1979 y(will)i(result.)31 b(Additional)20 b(sync)o(hronization)g(has)e(to)g(b)q(e)h(added)h(to)e (the)g(program)g(so)g(as)g(to)g(prev)o(en)o(t)75 2035 y(this)h(from)e(o)q(ccurring.)29 b(If)19 b(standard)e(sends)i(are)f (used,)h(then)f(the)g(pro)q(ducer)h(will)h(b)q(e)f(automatically)75 2092 y(throttled,)c(as)f(its)i(send)g(op)q(erations)f(will)i(blo)q(c)o (k)f(when)f(bu\013er)h(space)f(is)h(una)o(v)m(ailable.)166 2148 y(In)c(some)f(situations,)h(a)f(lac)o(k)g(of)g(bu\013er)h(space)f (leads)h(to)f(deadlo)q(c)o(k)h(situations.)19 b(This)12 b(is)g(illustrated)75 2205 y(b)o(y)j(the)g(examples)h(b)q(elo)o(w.)75 2311 y Fp(Example)i(1.7)k Fu(An)16 b(exc)o(hange)f(of)g(messages.)75 2417 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 2474 y(IF)h(\(rank.EQ.0\))e(THEN)170 2530 y(CALL)i(MPI_SEND\(sendbuf,)d (count,)i(MPI_REAL,)g(1,)h(tag,)f(comm,)g(ierr\))170 2587 y(CALL)h(MPI_RECV\(recvbuf,)d(count,)i(MPI_REAL,)g(1,)h(tag,)f (comm,)g(status,)g(ierr\))75 2643 y(ELSE)95 b(!)24 b(rank.EQ.1)170 2700 y(CALL)g(MPI_RECV\(recvbuf,)d(count,)i(MPI_REAL,)g(0,)h(tag,)f (comm,)g(status,)g(ierr\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 18 20 18 19 bop 75 -100 a Fu(18)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)170 45 y Fo(CALL)24 b(MPI_SEND\(sendbuf,)d(count,)i(MPI_REAL,)g(0,)h(tag,)f(comm,)g(ierr\)) 75 102 y(END)g(IF)75 204 y Fu(This)16 b(program)f(will)i(succeed)g(ev)o (en)f(if)g(no)g(bu\013er)g(space)g(for)f(data)g(is)h(a)o(v)m(ailable.) 23 b(The)16 b(standard)f(send)75 261 y(op)q(eration)g(can)h(b)q(e)g (replaced,)g(in)g(this)f(example,)h(with)g(a)e(sync)o(hronous)i(send.) 75 364 y Fp(Example)i(1.8)k Fu(An)16 b(attempt)e(to)h(exc)o(hange)g (messages.)75 455 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\)) 75 512 y(IF)h(\(rank.EQ.0\))e(THEN)170 568 y(CALL)i(MPI_RECV\(recvbuf,) d(count,)i(MPI_REAL,)g(1,)h(tag,)f(comm,)g(status,)g(ierr\))170 625 y(CALL)h(MPI_SEND\(sendbuf,)d(count,)i(MPI_REAL,)g(1,)h(tag,)f (comm,)g(ierr\))75 681 y(ELSE)95 b(!)24 b(rank.EQ.1)170 738 y(CALL)g(MPI_RECV\(recvbuf,)d(count,)i(MPI_REAL,)g(0,)h(tag,)f (comm,)g(status,)g(ierr\))170 794 y(CALL)h(MPI_SEND\(sendbuf,)d(count,) i(MPI_REAL,)g(0,)h(tag,)f(comm,)g(ierr\))75 850 y(END)g(IF)75 942 y Fu(The)16 b(receiv)o(e)g(op)q(eration)f(of)g(the)h(\014rst)f(pro) q(cess)g(m)o(ust)g(complete)h(b)q(efore)g(its)g(send,)f(and)h(can)f (complete)75 998 y(only)g(if)g(the)g(matc)o(hing)f(send)h(of)f(the)h (second)g(pro)q(cessor)f(is)h(executed.)21 b(The)15 b(receiv)o(e)g(op)q (eration)g(of)f(the)75 1055 y(second)j(pro)q(cess)g(m)o(ust)e(complete) i(b)q(efore)g(its)g(send)g(and)f(can)h(complete)g(only)g(if)g(the)f (matc)o(hing)g(send)75 1111 y(of)d(the)h(\014rst)f(pro)q(cess)g(is)h (executed.)21 b(This)14 b(program)e(will)j(alw)o(a)o(ys)e(deadlo)q(c)o (k.)20 b(The)14 b(same)f(holds)h(for)f(an)o(y)75 1168 y(other)i(send)h(mo)q(de.)75 1271 y Fp(Example)i(1.9)k Fu(An)16 b(exc)o(hange)f(that)g(relies)h(on)f(bu\013ering.)75 1362 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 1418 y(IF)h(\(rank.EQ.0\))e(THEN)170 1475 y(CALL)i(MPI_SEND\(sendbuf,)d (count,)i(MPI_REAL,)g(1,)h(tag,)f(comm,)g(ierr\))170 1531 y(CALL)h(MPI_RECV\(recvbuf,)d(count,)i(MPI_REAL,)g(1,)h(tag,)f (comm,)g(status,)g(ierr\))75 1588 y(ELSE)95 b(!)24 b(rank.EQ.1)170 1644 y(CALL)g(MPI_SEND\(sendbuf,)d(count,)i(MPI_REAL,)g(0,)h(tag,)f (comm,)g(ierr\))170 1701 y(CALL)h(MPI_RECV\(recvbuf,)d(count,)i (MPI_REAL,)g(0,)h(tag,)f(comm,)g(status,)g(ierr\))75 1757 y(END)g(IF)75 1849 y Fu(The)17 b(message)g(sen)o(t)g(b)o(y)g(eac)o (h)g(pro)q(cess)g(has)g(to)g(b)q(e)h(copied)g(out)f(b)q(efore)g(the)g (send)h(op)q(eration)f(returns)75 1905 y(and)e(the)g(receiv)o(e)h(op)q (eration)f(starts.)k(F)l(or)14 b(the)h(program)f(to)g(complete,)h(it)h (is)f(necessary)g(that)g(at)f(least)75 1961 y(one)22 b(of)f(the)g(t)o(w)o(o)f(messages)h(sen)o(t)g(b)q(e)h(bu\013ered.)39 b(Th)o(us,)23 b(this)f(program)e(can)h(succeed)i(only)f(if)g(the)75 2018 y(comm)o(unication)16 b(system)f(can)g(bu\013er)g(at)g(least)g Fq(count)i Fu(w)o(ords)d(of)h(data.)189 2121 y Fj(A)n(dvic)n(e)f(to)h (users.)40 b Fu(When)14 b(standard)g(send)g(op)q(erations)g(are)g (used,)g(then)h(a)f(deadlo)q(c)o(k)h(situation)189 2177 y(ma)o(y)c(o)q(ccur)h(where)h(b)q(oth)f(pro)q(cesses)g(are)g(blo)q(c)o (k)o(ed)h(b)q(ecause)g(bu\013er)f(space)g(is)h(not)e(a)o(v)m(ailable.) 21 b(The)189 2234 y(same)15 b(will)i(certainly)g(happ)q(en,)f(if)g(the) g(sync)o(hronous)f(mo)q(de)h(is)g(used.)21 b(If)16 b(the)g(bu\013ered)g (mo)q(de)f(is)189 2290 y(used,)k(and)f(not)g(enough)g(bu\013er)h(space) f(is)h(a)o(v)m(ailable,)h(then)e(the)h(program)e(will)i(not)f(complete) 189 2347 y(either.)34 b(Ho)o(w)o(ev)o(er,)19 b(rather)g(than)h(a)f (deadlo)q(c)o(k)i(situation,)g(w)o(e)e(shall)i(ha)o(v)o(e)e(a)h (bu\013er)f(o)o(v)o(er\015o)o(w)189 2403 y(error.)189 2478 y(A)c(program)g(is)h(\\safe")e(if)i(no)g(message)f(bu\013ering)h (is)g(required)h(for)e(the)g(program)g(to)g(complete.)189 2534 y(One)22 b(can)g(replace)h(all)f(sends)h(in)f(suc)o(h)g(program)f (with)h(sync)o(hronous)g(sends,)h(and)f(the)g(pro-)189 2591 y(gram)16 b(will)i(still)h(run)e(correctly)l(.)25 b(This)18 b(conserv)m(ativ)o(e)f(programming)f(st)o(yle)h(pro)o(vides)h (the)f(b)q(est)189 2647 y(p)q(ortabilit)o(y)l(,)e(since)g(program)f (completion)h(do)q(es)g(not)e(dep)q(end)j(on)f(the)f(amoun)o(t)g(of)f (bu\013er)i(space)189 2704 y(a)o(v)m(ailable)i(or)d(in)i(the)g(comm)o (unication)f(proto)q(col)h(used.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 19 21 19 20 bop 75 -100 a Fm(1.6.)34 b(BUFFER)15 b(ALLOCA)l(TION)i(AND)f(USA) o(GE)843 b Fu(19)189 45 y(Man)o(y)15 b(programmers)f(prefer)i(to)f(ha)o (v)o(e)h(more)f(leew)o(a)o(y)h(and)g(b)q(e)g(able)h(to)e(use)h(the)g (\\unsafe")f(pro-)189 102 y(gramming)c(st)o(yle)g(sho)o(wn)h(in)g (example)h(1.9.)k(In)12 b(suc)o(h)g(cases,)g(the)g(use)g(of)f(standard) g(sends)h(is)g(lik)o(ely)189 158 y(to)i(pro)o(vide)i(the)g(b)q(est)f (compromise)h(b)q(et)o(w)o(een)f(p)q(erformance)h(and)f(robustness:)20 b(qualit)o(y)c(imple-)189 214 y(men)o(tations)e(will)j(pro)o(vide)f (su\016cien)o(t)g(bu\013ering)f(so)g(that)f(\\common)h(practice")g (programs)f(will)189 271 y(not)j(deadlo)q(c)o(k.)28 b(The)18 b(bu\013ered)g(send)g(mo)q(de)g(can)f(b)q(e)i(used)f(for)f(programs)f (that)h(require)h(more)189 327 y(bu\013ering,)k(or)e(in)i(situations)f (where)g(the)g(programmer)f(w)o(an)o(ts)f(more)i(con)o(trol.)36 b(This)22 b(mo)q(de)189 384 y(migh)o(t)14 b(also)g(b)q(e)h(used)g(for)e (debugging)j(purp)q(oses,)e(as)g(bu\013er)g(o)o(v)o(er\015o)o(w)f (conditions)j(are)e(easier)h(to)189 440 y(diagnose)g(than)g(deadlo)q(c) o(k)h(conditions.)189 515 y(Non)o(blo)q(c)o(king)h(message-passing)f (op)q(erations,)h(as)f(describ)q(ed)i(in)f(Section)g(1.7,)e(can)i(b)q (e)g(used)g(to)189 572 y(a)o(v)o(oid)f(the)g(need)h(for)f(bu\013ering)g (outgoing)g(messages.)23 b(This)16 b(prev)o(en)o(ts)g(deadlo)q(c)o(ks)h (due)g(to)f(lac)o(k)189 628 y(of)h(bu\013er)h(space,)g(and)g(impro)o(v) o(es)f(p)q(erformance,)h(b)o(y)g(allo)o(wing)g(o)o(v)o(erlap)g(of)f (computation)h(and)189 685 y(comm)o(unication,)12 b(and)f(a)o(v)o (oiding)h(the)f(o)o(v)o(erheads)g(of)f(allo)q(cating)j(bu\013ers)e(and) g(cop)o(ying)g(messages)189 741 y(in)o(to)k(bu\013ers.)20 b(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(users.)p Fu(\))75 884 y Fr(1.6)59 b(Bu\013er)20 b(allo)r(cation)e(and)i(usage)75 986 y Fu(A)13 b(user)g(ma)o(y)f(sp)q(ecify)i(a)e(bu\013er)h(to)f(b)q(e) h(used)h(for)e(bu\013ering)h(messages)f(sen)o(t)h(in)g(bu\013ered)h(mo) q(de.)19 b(Bu\013er-)75 1042 y(ing)d(is)f(done)h(b)o(y)f(the)g(sender.) 75 1193 y Fq(MPI)p 160 1193 14 2 v 16 w(BUFFER)p 345 1193 V 17 w(A)l(TT)l(A)o(CH\()h(bu\013er,)f(size\))117 1271 y Fk(IN)155 b Fq(bu\013er)478 b Fk(initial)12 b(bu\013er)j (address)g(\(c)o(hoice\))117 1346 y(IN)155 b Fq(size)519 b Fk(bu\013er)15 b(size,)f(in)g(b)o(ytes)g(\(in)o(teger\))75 1470 y Fo(int)23 b(MPI)p 245 1470 15 2 v 17 w(Buffer)p 406 1470 V 17 w(attach\()f(void*)i(buffer,)f(int)g(size\))75 1557 y(MPI)p 150 1557 V 17 w(BUFFER)p 311 1557 V 16 w(ATTACH\()g (BUFFER,)g(SIZE,)g(IERROR\))170 1613 y()g(BUFFER\(*\))170 1669 y(INTEGER)g(SIZE,)h(IERROR)166 1756 y Fu(Pro)o(vides)16 b(to)f Fq(MPI)g Fu(a)h(bu\013er)g(in)h(the)e(user's)h(memory)f(to)h(b)q (e)g(used)h(for)e(bu\013ering)h(outgoing)g(mes-)75 1812 y(sages.)22 b(The)16 b(bu\013er)g(is)h(used)g(only)f(b)o(y)g(messages)g (sen)o(t)f(in)i(bu\013ered)g(mo)q(de.)23 b(Only)17 b(one)f(bu\013er)g (can)g(b)q(e)75 1869 y(attac)o(hed)f(to)f(a)h(pro)q(cess)h(at)e(a)h (time.)1230 b Fi(>)75 2020 y Fq(MPI)p 160 2020 14 2 v 16 w(BUFFER)p 345 2020 V 17 w(DET)l(A)o(CH\()15 b(bu\013er)p 681 2020 V 17 w(addr,)g(size\))117 2097 y Fk(OUT)108 b Fq(bu\013er)p 430 2097 V 17 w(addr)377 b Fk(initial)12 b(bu\013er)j(address)g(\(c)o(hoice\))117 2172 y(OUT)108 b Fq(size)519 b Fk(bu\013er)15 b(size,)f(in)g(b)o(ytes)g(\(in)o (teger\))75 2297 y Fo(int)23 b(MPI)p 245 2297 15 2 v 17 w(Buffer)p 406 2297 V 17 w(detach\()f(void*)i(buffer)p 901 2297 V 16 w(addr,)f(int*)h(size\))75 2383 y(MPI)p 150 2383 V 17 w(BUFFER)p 311 2383 V 16 w(DETACH\()f(BUFFER)p 662 2383 V 16 w(ADDR,)h(SIZE,)f(IERROR\))170 2440 y()g(BUFFER)p 484 2440 V 17 w(ADDR\(*\))170 2496 y(INTEGER)g(SIZE,)h(IERROR)166 2582 y Fu(Detac)o(h)14 b(the)h(bu\013er)g(curren)o(tly)h(asso)q(ciated) f(with)g Fq(MPI)p Fu(.)f(The)h(call)h(returns)f(the)g(address)g(and)g (the)75 2639 y(size)20 b(of)e(the)h(detac)o(hed)g(bu\013er.)31 b(This)20 b(op)q(eration)f(will)h(blo)q(c)o(k)g(un)o(til)g(all)g (messages)e(curren)o(tly)h(in)h(the)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 20 22 20 21 bop 75 -100 a Fu(20)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(bu\013er)12 b(ha)o(v)o(e)f(b)q(een)i(transmitted.)18 b(Up)q(on)13 b(return)e(of)h(this)g(function,)h(the)f(user)f(ma)o(y)g(reuse)i(or)e (deallo)q(cate)75 102 y(the)k(space)h(tak)o(en)e(b)o(y)i(the)f (bu\013er.)75 206 y Fp(Example)j(1.10)23 b Fu(Calls)15 b(to)g(attac)o(h)f(and)h(detac)o(h)h(bu\013ers.)75 299 y Fo(#define)23 b(BUFFSIZE)g(10000)75 355 y(int)g(size)75 411 y(char)g(*buff;)75 468 y(MPI_Buffer_attach\()e(malloc\(BUFFSIZE\),) h(BUFFSIZE\);)75 524 y(/*)i(a)f(buffer)g(of)h(10000)f(bytes)g(can)h (now)f(be)h(used)f(by)h(MPI_Bsend)e(*/)75 581 y(MPI_Buffer_detach\()f (&buff,)i(&size\);)75 637 y(/*)h(Buffer)f(size)g(reduced)g(to)g(zero)h (*/)75 694 y(MPI_Buffer_attach\()d(buff,)j(size\);)75 750 y(/*)g(Buffer)f(of)g(10000)g(bytes)h(available)e(again)h(*/)189 855 y Fj(A)n(dvic)n(e)10 b(to)i(users.)37 b Fu(Ev)o(en)10 b(though)g(the)g(C)g(functions)h Fq(MPI)p 1182 855 14 2 v 16 w(Bu\013er)p 1314 855 V 16 w(attach)h Fu(and)e Fq(MPI)p 1626 855 V 16 w(Bu\013er)p 1758 855 V 16 w(detach)189 911 y Fu(b)q(oth)21 b(ha)o(v)o(e)f(a)g(\014rst)h(argumen)o(t)f(of)g(t)o (yp)q(e)h Fh(void*)p Fu(,)h(these)f(argumen)o(ts)f(are)h(used)g (di\013eren)o(tly:)32 b(A)189 968 y(p)q(oin)o(ter)22 b(to)e(the)i(bu\013er)f(is)h(passed)g(to)f Fq(MPI)p 984 968 V 15 w(Bu\013er)p 1115 968 V 17 w(attach)p Fu(;)k(the)d(address)f (of)g(the)h(p)q(oin)o(ter)f(is)189 1024 y(passed)13 b(to)g Fq(MPI)p 470 1024 V 16 w(Bu\013er)p 602 1024 V 16 w(detach)p Fu(,)i(so)f(that)e(this)i(call)h(return)e(the)h(p)q(oin)o(ter)g(v)m (alue.)20 b(\()p Fj(End)14 b(of)h(advic)n(e)189 1080 y(to)h(users.)p Fu(\))189 1185 y Fj(R)n(ationale.)59 b Fu(Both)18 b(argumen)o(ts)g(are)g(de\014ned)i(to)e(b)q(e)h(of)f(t)o (yp)q(e)g Fh(void*)h Fu(\(rather)e(than)h Fh(void*)h Fu(and)189 1241 y Fh(void**)p Fu(,)h(resp)q(ectiv)o(ely\),)i(so)d(as)g (to)g(a)o(v)o(oid)h(complex)g(t)o(yp)q(e)g(casts.)33 b(E.g.,)19 b(in)i(the)f(last)f(example,)189 1298 y Fq(&bu\013)p Fu(,)14 b(whic)o(h)g(is)g(of)f(t)o(yp)q(e)g Fh(int**)p Fu(,)g(can)g(b)q(e)h(passed)g(as)f(argumen)o(t)f(to)h Fq(MPI)p 1437 1298 V 16 w(Bu\013er)p 1569 1298 V 16 w(detach)i Fu(without)189 1354 y(t)o(yp)q(e)f(casting.)19 b(If)14 b(the)g(formal)g(parameter)f(had)h(t)o(yp)q(e)g Fh(void**)g Fu(then)g(w)o(e)g(w)o(ould)g(need)h(a)e(t)o(yp)q(e)h(cast)189 1411 y(b)q(efore)h(and)h(after)e(the)h(call.)21 b(\()p Fj(End)16 b(of)g(r)n(ationale.)p Fu(\))-160 1470 y Fi(?)166 1515 y Fu(The)i(statemen)o(ts)f(made)g(in)i(this)f(section)h(describ)q (e)g(the)f(b)q(eha)o(vior)g(of)g Fq(MPI)f Fu(for)g(bu\013ered-mo)q(de) 75 1572 y(sends.)38 b(When)22 b(no)f(bu\013er)g(is)g(curren)o(tly)h (asso)q(ciated,)g Fq(MPI)f Fu(b)q(eha)o(v)o(es)g(as)g(if)g(a)g (zero-sized)h(bu\013er)f(is)75 1628 y(asso)q(ciated)15 b(with)h(the)f(pro)q(cess.)166 1685 y Fq(MPI)20 b Fu(m)o(ust)g(pro)o (vide)h(as)f(m)o(uc)o(h)h(bu\013ering)g(for)f(outgoing)g(messages)g Fj(as)h(if)30 b Fu(outgoing)20 b(message)75 1741 y(data)d(w)o(ere)h (bu\013ered)h(b)o(y)f(the)g(sending)h(pro)q(cess,)g(in)g(the)f(sp)q (eci\014ed)i(bu\013er)e(space,)h(using)f(a)g(circular,)75 1797 y(con)o(tiguous-space)e(allo)q(cation)h(p)q(olicy)l(.)24 b(W)l(e)16 b(outline)h(b)q(elo)o(w)f(a)g(mo)q(del)h(implemen)o(tation)g (that)e(de\014nes)75 1854 y(this)i(p)q(olicy)l(.)24 b Fq(MPI)16 b Fu(ma)o(y)g(pro)o(vide)g(more)g(bu\013ering,)h(and)f(ma)o (y)g(use)g(a)g(b)q(etter)g(bu\013er)h(allo)q(cation)g(algo-)75 1910 y(rithm)i(than)g(describ)q(ed)i(b)q(elo)o(w.)31 b(On)19 b(the)g(other)g(hand,)h Fq(MPI)e Fu(ma)o(y)g(signal)i(an)e (error)h(whenev)o(er)g(the)75 1967 y(simple)14 b(bu\013ering)f(allo)q (cator)f(describ)q(ed)i(b)q(elo)o(w)f(w)o(ould)g(run)g(out)f(of)g (space.)19 b(In)13 b(particular,)g(if)g(no)f(bu\013er)75 2023 y(is)k(explicitly)i(asso)q(ciated)d(with)h(the)f(pro)q(cess,)g (then)h(an)o(y)e(bu\013ered)i(send)g(ma)o(y)e(cause)i(an)f(error.)166 2080 y Fq(MPI)10 b Fu(do)q(es)g(not)g(pro)o(vide)h(mec)o(hanisms)f(for) g(querying)h(or)f(con)o(trolling)h(bu\013ering)g(done)f(b)o(y)g (standard)75 2136 y(mo)q(de)16 b(sends.)22 b(It)15 b(is)h(exp)q(ected)h (that)e(v)o(endors)h(will)h(pro)o(vide)f(suc)o(h)g(information)g(for)f (their)h(implemen-)75 2193 y(tations.)189 2297 y Fj(R)n(ationale.)53 b Fu(There)18 b(is)g(a)f(wide)h(sp)q(ectrum)g(of)f(p)q(ossible)i (implemen)o(tations)g(of)e(bu\013ered)h(com-)189 2353 y(m)o(unication:)32 b(bu\013ering)22 b(can)f(b)q(e)h(done)g(at)e (sender,)j(at)d(receiv)o(er,)j(or)e(b)q(oth;)j(bu\013ers)d(can)g(b)q(e) 189 2410 y(dedicated)d(to)e(one)g(sender-receiv)o(er)i(pair,)f(or)g(b)q (e)g(shared)g(b)o(y)f(all)i(comm)o(unications;)f(bu\013ering)189 2466 y(can)g(b)q(e)h(done)g(in)g(real)g(or)e(in)j(virtual)f(memory;)f (it)h(can)f(use)h(dedicated)h(memory)l(,)e(or)g(memory)189 2523 y(shared)d(b)o(y)h(other)f(pro)q(cesses;)h(bu\013er)f(space)h(ma)o (y)f(b)q(e)h(allo)q(cated)h(statically)f(or)f(b)q(e)i(c)o(hanged)f(dy-) 189 2579 y(namically;)f(etc.)19 b(It)12 b(do)q(es)g(not)g(seem)g (feasible)h(to)f(pro)o(vide)g(a)g(p)q(ortable)g(mec)o(hanism)h(for)e (querying)189 2636 y(or)16 b(con)o(trolling)h(bu\013ering)h(that)d(w)o (ould)i(b)q(e)h(compatible)f(with)g(all)h(these)f(c)o(hoices,)g(y)o(et) f(pro)o(vide)189 2692 y(meaningful)g(information.)k(\()p Fj(End)c(of)g(r)n(ationale.)p Fu(\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 21 23 21 22 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(21)75 45 y Fl(1.6.1)49 b(Mo)q(del)18 b(implementation)e(of)g (bu\013ered)g(mo)q(de)75 131 y Fu(The)22 b(mo)q(del)g(implemen)o (tation)h(uses)f(the)f(pac)o(king)h(and)g(unpac)o(king)g(functions)g (describ)q(ed)i(in)e(Sec-)75 187 y(tion)15 b(1.13)f(and)i(the)f(non)o (blo)q(c)o(king)i(comm)o(unication)f(functions)f(describ)q(ed)j(in)e (Section)g(1.7.)166 244 y(W)l(e)21 b(assume)f(that)g(a)g(circular)i (queue)f(of)f(p)q(ending)j(message)d(en)o(tries)h(\(PME\))e(is)i(main)o (tained.)75 300 y(Eac)o(h)14 b(en)o(try)h(con)o(tains)f(a)g(comm)o (unication)i(request)e(handle)i(that)e(iden)o(ti\014es)i(a)e(p)q (ending)j(non)o(blo)q(c)o(king)75 357 y(send,)h(a)e(p)q(oin)o(ter)i(to) e(the)h(next)g(en)o(try)f(and)i(the)f(pac)o(k)o(ed)g(message)f(data.)25 b(The)17 b(en)o(tries)g(are)g(stored)f(in)75 413 y(successiv)o(e)j(lo)q (cations)h(in)f(the)f(bu\013er.)29 b(F)l(ree)19 b(space)f(is)h(a)o(v)m (ailable)h(b)q(et)o(w)o(een)f(the)f(queue)h(tail)g(and)g(the)75 470 y(queue)d(head.)166 526 y(A)f(bu\013ered)h(send)g(call)g(results)f (in)i(the)e(execution)h(of)f(the)g(follo)o(wing)h(co)q(de.)143 620 y Fi(\017)23 b Fu(T)l(ra)o(v)o(erse)14 b(sequen)o(tially)k(the)e (PME)f(queue)h(from)f(head)h(to)o(w)o(ards)e(the)i(tail,)g(deleting)h (all)g(en)o(tries)189 676 y(for)f(comm)o(unications)h(that)f(ha)o(v)o (e)g(completed,)i(up)f(to)f(the)g(\014rst)h(en)o(try)f(with)h(an)f (uncompleted)189 733 y(request;)e(up)q(date)i(queue)g(head)g(to)e(p)q (oin)o(t)i(to)f(that)f(en)o(try)l(.)143 827 y Fi(\017)23 b Fu(Compute)16 b(the)h(n)o(um)o(b)q(er,)h Fq(n)p Fu(,)f(of)g(b)o(ytes) f(needed)j(to)d(store)g(en)o(try)h(for)f(new)h(message.)25 b(An)17 b(upp)q(er)63 b Fi(>)189 883 y Fu(b)q(ound)49 b(on)g Fq(n)h Fu(can)f(b)q(e)g(computed)g(as)g(follo)o(ws:)87 b(A)49 b(call)h(to)e(the)h(function)189 940 y Fq(MPI)p 274 940 14 2 v 15 w(P)l(A)o(CK)p 404 940 V 17 w(SIZE\(count,)19 b(datat)o(yp)q(e,)h(comm,)c(size\))p Fu(,)i(with)g(the)h Fo(count,)k(datatype)16 b Fu(and)j Fo(comm)189 996 y Fu(argumen)o(ts)i(used)j(in)f(the)g Fq(MPI)p 760 996 V 16 w(BSEND)g Fu(call,)i(returns)e(an)f(upp)q(er)i(b)q(ound)f(on)g (the)g(amoun)o(t)189 1052 y(of)c(space)h(needed)i(to)d(bu\013er)h(the)g (message)g(data)f(\(see)h(Section)h(1.13\).)33 b(The)20 b(MPI)g(constan)o(t)189 1109 y Fh(MPI)p 266 1109 13 2 v 14 w(BSEND)p 415 1109 V 15 w(O)o(VERHEAD)c Fu(pro)o(vides)j(an)f(upp) q(er)h(b)q(ound)g(on)f(the)g(additional)i(space)e(consumed)189 1165 y(b)o(y)d(the)g(en)o(try)g(\(e.g.,)f(for)g(p)q(oin)o(ters)i(or)e (en)o(v)o(elop)q(e)j(information\).)628 b Fi(?)143 1259 y(\017)23 b Fu(Find)14 b(the)g(next)g(con)o(tiguous)f(empt)o(y)h(space) g(of)f Fq(n)h Fu(b)o(ytes)g(in)g(bu\013er)g(\(space)g(follo)o(wing)g (queue)h(tail,)189 1316 y(or)d(space)h(at)f(start)g(of)g(bu\013er)h(if) h(queue)f(tail)h(is)f(to)q(o)f(close)i(to)e(end)i(of)e(bu\013er\).)19 b(If)13 b(space)g(not)g(found)189 1372 y(then)i(raise)h(bu\013er)f(o)o (v)o(er\015o)o(w)f(error.)143 1466 y Fi(\017)23 b Fu(App)q(end)14 b(to)d(end)j(of)e(PME)g(queue)h(in)g(con)o(tiguous)g(space)f(the)h(new) g(en)o(try)f(that)f(con)o(tains)i(request)189 1522 y(handle,)j(next)f (p)q(oin)o(ter)h(and)f(pac)o(k)o(ed)g(message)g(data;)f Fq(MPI)p 1221 1522 14 2 v 16 w(P)l(A)o(CK)h Fu(is)h(used)g(to)e(pac)o (k)h(data.)143 1616 y Fi(\017)23 b Fu(P)o(ost)14 b(non)o(blo)q(c)o (king)i(send)g(\(standard)f(mo)q(de\))g(for)f(pac)o(k)o(ed)i(data.)143 1710 y Fi(\017)23 b Fu(Return)75 1853 y Fr(1.7)59 b(Nonblo)r(cking)20 b(communication)75 1955 y Fu(One)e(can)g(impro)o(v)o(e)f(p)q (erformance)g(on)h(man)o(y)e(systems)h(b)o(y)h(o)o(v)o(erlapping)f (comm)o(unication)i(and)e(com-)75 2011 y(putation.)35 b(This)21 b(is)g(esp)q(ecially)i(true)d(on)g(systems)g(where)g(comm)o (unication)h(can)g(b)q(e)g(executed)g(au-)75 2068 y(tonomously)12 b(b)o(y)h(an)g(in)o(telligen)o(t)h(comm)o(unication)g(con)o(troller.)19 b(Ligh)o(t-w)o(eigh)o(t)13 b(threads)f(are)h(one)g(mec)o(h-)75 2124 y(anism)21 b(for)g(ac)o(hieving)h(suc)o(h)g(o)o(v)o(erlap.)37 b(An)21 b(alternativ)o(e)h(mec)o(hanism)g(that)e(often)h(leads)g(to)g (b)q(etter)75 2180 y(p)q(erformance)15 b(is)g(to)g(use)g Fp(non)o(blo)q(c)o(king)j(comm)o(unication)p Fu(.)j(A)15 b(non)o(blo)q(c)o(king)h Fp(send)g(start)f Fu(call)h(ini-)75 2237 y(tiates)g(the)h(send)g(op)q(eration,)f(but)h(do)q(es)f(not)g (complete)h(it.)24 b(The)17 b(send)g(start)e(call)i(will)h(return)f(b)q (efore)75 2293 y(the)g(message)f(w)o(as)f(copied)j(out)e(of)g(the)g (send)h(bu\013er.)24 b(A)17 b(separate)e Fp(send)k(complete)e Fu(call)h(is)f(needed)75 2350 y(to)12 b(complete)i(the)f(comm)o (unication,)h(i.e.,)g(to)e(v)o(erify)h(that)g(the)g(data)f(has)h(b)q (een)h(copied)h(out)e(of)f(the)h(send)75 2406 y(bu\013er.)19 b(With)13 b(suitable)i(hardw)o(are,)d(the)h(transfer)g(of)f(data)h(out) g(of)f(the)h(sender)h(memory)f(ma)o(y)f(pro)q(ceed)75 2463 y(concurren)o(tly)g(with)h(computations)e(done)h(at)g(the)g (sender)g(after)f(the)h(send)g(w)o(as)f(initiated)j(and)e(b)q(efore)g (it)75 2519 y(completed.)21 b(Similarly)l(,)16 b(a)e(non)o(blo)q(c)o (king)i Fp(receiv)o(e)g(start)h(call)f Fu(initiates)g(the)f(receiv)o(e) g(op)q(eration,)g(but)75 2576 y(do)q(es)f(not)g(complete)h(it.)k(The)14 b(call)i(will)f(return)f(b)q(efore)g(a)g(message)g(is)g(stored)f(in)o (to)h(the)g(receiv)o(e)h(bu\013er.)75 2632 y(A)i(separate)f Fp(receiv)o(e)i(complete)f Fu(call)h(is)f(needed)h(to)e(complete)h(the) g(receiv)o(e)g(op)q(eration)g(and)g(v)o(erify)75 2689 y(that)11 b(the)i(data)e(has)h(b)q(een)h(receiv)o(ed)h(in)o(to)e(the)g (receiv)o(e)h(bu\013er.)19 b(With)12 b(suitable)i(hardw)o(are,)d(the)i (transfer)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 22 24 22 23 bop 75 -100 a Fu(22)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(of)f(data)g(in)o(to)g (the)h(receiv)o(er)g(memory)f(ma)o(y)f(pro)q(ceed)j(concurren)o(tly)f (with)g(computations)f(done)h(after)75 102 y(the)d(receiv)o(e)g(w)o(as) f(initiated)j(and)e(b)q(efore)g(it)g(completed.)20 b(The)14 b(use)g(of)f(non)o(blo)q(c)o(king)i(receiv)o(es)g(ma)o(y)e(also)75 158 y(a)o(v)o(oid)18 b(system)g(bu\013ering)h(and)f(memory-to-memory)f (cop)o(ying,)i(as)f(information)h(is)g(pro)o(vided)g(early)75 214 y(on)c(the)g(lo)q(cation)h(of)f(the)g(receiv)o(e)i(bu\013er.)166 271 y(Non)o(blo)q(c)o(king)f(send)f(start)f(calls)h(can)g(use)g(the)g (same)f(four)h(mo)q(des)g(as)f(blo)q(c)o(king)i(sends:)k Fq(standa)o(rd)p Fu(,)75 327 y Fq(bu\013ered)p Fu(,)c Fq(synchronous)i Fu(and)e Fq(ready)p Fu(.)22 b(These)16 b(carry)f(the)h(same)f(meaning.)23 b(Sends)16 b(of)g(all)g(mo)q(des,)g Fq(ready)75 384 y Fu(excepted,)f(can)f(b)q(e)g(started)f(whether)h(a)g (matc)o(hing)g(receiv)o(e)g(has)g(b)q(een)h(p)q(osted)f(or)g(not;)f(a)h (non)o(blo)q(c)o(king)75 440 y Fq(ready)e Fu(send)g(can)f(b)q(e)i (started)d(only)j(if)f(a)f(matc)o(hing)h(receiv)o(e)g(is)g(p)q(osted.) 19 b(In)12 b(all)h(cases,)f(the)f(send)h(start)f(call)75 497 y(is)g(lo)q(cal:)19 b(it)11 b(returns)f(immediately)l(,)j(irresp)q (ectiv)o(e)f(of)e(the)h(status)f(of)g(other)g(pro)q(cesses.)19 b(If)10 b(the)h(call)h(causes)75 553 y(some)17 b(system)f(resource)h (to)f(b)q(e)i(exhausted,)f(then)g(it)g(will)i(fail)f(and)f(return)g(an) f(error)h(co)q(de.)25 b(Qualit)o(y)75 610 y(implemen)o(tations)14 b(of)f Fq(MPI)f Fu(should)i(ensure)f(that)g(this)g(happ)q(ens)h(only)f (in)h(\\pathological")f(cases.)20 b(That)75 666 y(is,)13 b(an)f Fq(MPI)f Fu(implemen)o(tation)i(should)g(b)q(e)g(able)f(to)g (supp)q(ort)g(a)f(large)h(n)o(um)o(b)q(er)g(of)g(p)q(ending)i(non)o (blo)q(c)o(king)75 723 y(op)q(erations.)166 779 y(The)j(send-complete)i (call)f(returns)f(when)h(data)e(has)h(b)q(een)i(copied)f(out)f(of)f (the)i(send)f(bu\013er.)26 b(It)75 835 y(ma)o(y)14 b(carry)h (additional)i(meaning,)e(dep)q(ending)j(on)d(the)g(send)h(mo)q(de.)166 892 y(If)e(the)g(send)h(mo)q(de)f(is)h Fq(synchronous)p Fu(,)g(then)g(the)f(send)g(can)h(complete)f(only)h(if)f(a)g(matc)o (hing)g(receiv)o(e)75 948 y(has)j(started.)24 b(That)17 b(is,)g(a)g(receiv)o(e)h(has)f(b)q(een)h(p)q(osted,)f(and)g(has)g(b)q (een)h(matc)o(hed)f(with)g(the)h(send.)25 b(In)75 1005 y(this)18 b(case,)f(the)g(send-complete)i(call)f(is)g(non-lo)q(cal.)27 b(Note)16 b(that)h(a)g(sync)o(hronous,)g(non)o(blo)q(c)o(king)h(send)75 1061 y(ma)o(y)13 b(complete,)h(if)g(matc)o(hed)g(b)o(y)f(a)g(non)o(blo) q(c)o(king)i(receiv)o(e,)g(b)q(efore)f(the)f(receiv)o(e)i(complete)f (call)h(o)q(ccurs.)75 1118 y(\(It)h(can)h(complete)g(as)f(so)q(on)g(as) g(the)h(sender)g(\\kno)o(ws")e(the)i(transfer)e(will)j(complete,)g(but) e(b)q(efore)h(the)75 1174 y(receiv)o(er)f(\\kno)o(ws")e(the)h(transfer) g(will)i(complete.\))166 1231 y(If)f(the)g(send)h(mo)q(de)f(is)h Fq(bu\013ered)g Fu(then)f(the)g(message)g(m)o(ust)g(b)q(e)g(bu\013ered) h(if)f(there)h(is)f(no)g(p)q(ending)75 1287 y(receiv)o(e.)27 b(In)18 b(this)g(case,)f(the)g(send-complete)i(call)f(is)g(lo)q(cal,)h (and)e(m)o(ust)g(succeed)h(irresp)q(ectiv)o(e)h(of)e(the)75 1344 y(status)d(of)h(a)g(matc)o(hing)g(receiv)o(e.)166 1400 y(If)f(the)g(send)g(mo)q(de)g(is)g Fq(standa)o(rd)h Fu(then)g(the)e(send-complete)j(call)f(ma)o(y)e(return)g(b)q(efore)h(a) g(matc)o(hing)75 1456 y(receiv)o(e)h(o)q(ccurred,)f(if)g(the)g(message) f(is)i(bu\013ered.)20 b(On)14 b(the)g(other)f(hand,)h(the)g (send-complete)h(ma)o(y)e(not)75 1513 y(complete)19 b(un)o(til)h(a)e (matc)o(hing)g(receiv)o(e)h(o)q(ccurred,)h(and)f(the)f(message)g(w)o (as)g(copied)h(in)o(to)g(the)f(receiv)o(e)75 1569 y(bu\013er.)166 1626 y(Non)o(blo)q(c)o(king)e(sends)g(can)f(b)q(e)h(matc)o(hed)f(with)h (blo)q(c)o(king)g(receiv)o(es,)g(and)f(vice-v)o(ersa.)189 1732 y Fj(A)n(dvic)n(e)h(to)i(users.)50 b Fu(The)17 b(completion)g(of)g (a)f(send)h(op)q(eration)g(ma)o(y)f(b)q(e)i(dela)o(y)o(ed,)f(for)f (standard)189 1789 y(mo)q(de,)d(and)g(m)o(ust)f(b)q(e)h(dela)o(y)o(ed,) h(for)e(sync)o(hronous)g(mo)q(de,)h(un)o(til)h(a)f(matc)o(hing)f (receiv)o(e)i(is)f(p)q(osted.)189 1845 y(The)k(use)g(of)f(non)o(blo)q (c)o(king)j(sends)e(in)h(these)f(t)o(w)o(o)e(cases)i(allo)o(ws)g(the)g (sender)h(to)e(pro)q(ceed)i(ahead)189 1901 y(of)c(the)g(receiv)o(er,)h (so)f(that)g(the)h(computation)f(is)h(more)f(toleran)o(t)g(of)g (\015uctuations)h(in)g(the)g(sp)q(eeds)189 1958 y(of)f(the)i(t)o(w)o(o) e(pro)q(cesses.)189 2033 y(Non)o(blo)q(c)o(king)k(sends)g(in)f(the)h (bu\013ered)f(and)h(ready)f(mo)q(des)g(ha)o(v)o(e)g(a)f(more)h(limited) i(impact.)26 b(A)189 2090 y(non)o(blo)q(c)o(king)16 b(send)g(will)h (return)e(as)g(so)q(on)g(as)g(p)q(ossible,)i(whereas)e(a)g(blo)q(c)o (king)h(send)g(will)h(return)189 2146 y(after)h(the)h(data)g(has)g(b)q (een)h(copied)h(out)e(of)f(the)i(sender)f(memory)l(.)32 b(The)19 b(use)h(of)f(non)o(blo)q(c)o(king)189 2202 y(sends)j(is)g(adv) m(an)o(tageous)f(in)h(these)g(cases)g(only)g(if)g(data)f(cop)o(ying)h (can)g(b)q(e)g(concurren)o(t)g(with)189 2259 y(computation.)189 2334 y(The)e(message-passing)g(mo)q(del)g(implies)i(that)d(comm)o (unication)i(is)f(initiated)h(b)o(y)f(the)g(sender.)189 2390 y(The)d(comm)o(unication)g(will)h(generally)g(ha)o(v)o(e)e(lo)o(w) o(er)g(o)o(v)o(erhead)h(if)g(a)f(receiv)o(e)i(is)f(already)g(p)q(osted) 189 2447 y(when)22 b(the)h(sender)g(initiates)g(the)f(comm)o(unication) h(\(data)f(can)g(b)q(e)h(mo)o(v)o(ed)f(directly)h(to)f(the)189 2503 y(receiv)o(e)e(bu\013er,)f(and)g(there)g(is)h(no)f(need)h(to)e (queue)i(a)e(p)q(ending)j(send)f(request\).)31 b(Ho)o(w)o(ev)o(er,)18 b(a)189 2560 y(receiv)o(e)g(op)q(eration)f(can)h(complete)g(only)g (after)e(the)i(matc)o(hing)f(send)h(has)f(o)q(ccurred.)27 b(The)18 b(use)189 2616 y(of)13 b(non)o(blo)q(c)o(king)i(receiv)o(es)f (allo)o(ws)g(one)g(to)f(ac)o(hiev)o(e)h(lo)o(w)o(er)f(comm)o(unication) i(o)o(v)o(erheads)e(without)189 2673 y(blo)q(c)o(king)j(the)f(receiv)o (er)h(while)h(it)f(w)o(aits)e(for)h(the)g(send.)21 b(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(users.)p Fu(\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 23 25 23 24 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(23)75 45 y Fl(1.7.1)49 b(Communication)17 b(Objects)75 131 y Fu(Non)o(blo)q(c)o(king)i(comm)o(unications)f(use)g(opaque)g Fq(request)h Fu(ob)s(jects)e(to)g(iden)o(tify)i(comm)o(unication)g(op)q (er-)75 187 y(ations)e(and)g(matc)o(h)f(the)i(op)q(eration)f(that)f (initiates)i(the)f(comm)o(unication)h(with)f(the)g(op)q(eration)h(that) 75 244 y(terminates)f(it.)27 b(These)17 b(are)g(system)g(ob)s(jects)g (that)f(are)h(accessed)h(via)g(a)f(handle.)27 b(A)17 b(request)h(ob)s(ject)75 300 y(iden)o(ti\014es)c(v)m(arious)f(prop)q (erties)h(of)e(a)g(comm)o(unication)h(op)q(eration,)g(suc)o(h)g(as)f (the)h(send)g(mo)q(de,)g(the)g(com-)75 357 y(m)o(unication)i(bu\013er)f (that)g(is)h(asso)q(ciated)f(with)h(it,)f(its)g(con)o(text,)g(the)g (tag)f(and)i(destination)g(argumen)o(ts)75 413 y(to)e(b)q(e)h(used)f (for)g(a)g(send,)h(or)e(the)i(tag)e(and)i(source)f(argumen)o(ts)f(to)h (b)q(e)h(used)g(for)e(a)h(receiv)o(e.)20 b(In)14 b(addition,)75 470 y(this)i(ob)s(ject)e(stores)h(information)g(ab)q(out)g(the)g (status)g(of)f(the)i(p)q(ending)h(comm)o(unication)f(op)q(eration.)75 591 y Fl(1.7.2)49 b(Communication)17 b(initiation)75 677 y Fu(W)l(e)g(use)h(the)g(same)f(naming)g(con)o(v)o(en)o(tions)h(as) f(for)g(blo)q(c)o(king)h(comm)o(unication:)25 b(a)17 b(pre\014x)h(of)f Fq(B)p Fu(,)g Fq(S)p Fu(,)g(or)75 734 y Fq(R)f Fu(is)h(used)f(for)g Fq(bu\013ered)p Fu(,)g Fq(synchronous)i Fu(or)e Fq(ready)g Fu(mo)q(de.)22 b(In)17 b(addition)g(a)f(pre\014x)g(of)g Fq(I)f Fu(\(for)g Fq(immediate)p Fu(\))75 790 y(indicates)i(that)d(the)h(call)i(is)e(non)o(blo)q(c)o (king.)75 941 y Fq(MPI)p 160 941 14 2 v 16 w(ISEND\(buf,)g(count,)h (datat)o(yp)q(e,)h(dest,)f(tag,)f(comm,)e(request\))117 1018 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g (bu\013er)h(\(c)o(hoice\))117 1093 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f (\(in)o(teger\))117 1169 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e (\(handle\))117 1244 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 1319 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1394 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1469 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1593 y Fo(int)23 b(MPI)p 245 1593 15 2 v 17 w(Isend\(void*)g(buf,)g(int)g(count,)g(MPI)p 1002 1593 V 17 w(Datatype)g(datatype,)g(int)g(dest,)393 1650 y(int)h(tag,)f(MPI)p 683 1650 V 17 w(Comm)g(comm,)g(MPI)p 1034 1650 V 17 w(Request)g(*request\))75 1736 y(MPI)p 150 1736 V 17 w(ISEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g(TAG,)g (COMM,)h(REQUEST,)e(IERROR\))170 1793 y()h(BUF\(*\))170 1849 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(REQUEST,)f (IERROR)166 1936 y Fu(Start)14 b(a)h(standard)g(mo)q(de,)g(non)o(blo)q (c)o(king)h(send.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 24 26 24 25 bop 75 -100 a Fu(24)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(IBSEND\(buf,)e(count,)i(datat)o(yp)q(e,)f(dest,)g (tag,)f(comm,)e(request\))117 122 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 197 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts) f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 273 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h (bu\013er)g(elemen)o(t)e(\(handle\))117 348 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 423 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 498 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 573 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 698 y Fo(int)23 b(MPI)p 245 698 15 2 v 17 w(Ibsend\(void*)f(buf,)i(int)f(count,)g(MPI)p 1026 698 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 754 y(int)g(tag,)f(MPI)p 683 754 V 17 w(Comm)g(comm,)g(MPI)p 1034 754 V 17 w(Request)g(*request\))75 840 y(MPI)p 150 840 V 17 w(IBSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g (REQUEST,)g(IERROR\))170 897 y()g(BUF\(*\))170 953 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(REQUEST,)f (IERROR)166 1040 y Fu(Start)14 b(a)h(bu\013ered)h(mo)q(de,)f(non)o(blo) q(c)o(king)h(send.)75 1191 y Fq(MPI)p 160 1191 14 2 v 16 w(ISSEND\(buf,)f(count,)i(datat)o(yp)q(e,)f(dest,)g(tag,)f(comm,)e (request\))117 1268 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 1343 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 1418 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e(\(handle\))117 1493 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o (teger\))117 1569 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1644 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1719 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1843 y Fo(int)23 b(MPI)p 245 1843 15 2 v 17 w(Issend\(void*)f(buf,)i (int)f(count,)g(MPI)p 1026 1843 V 17 w(Datatype)g(datatype,)f(int)i (dest,)393 1900 y(int)g(tag,)f(MPI)p 683 1900 V 17 w(Comm)g(comm,)g (MPI)p 1034 1900 V 17 w(Request)g(*request\))75 1986 y(MPI)p 150 1986 V 17 w(ISSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g (TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 2043 y()g(BUF\(*\))170 2099 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(REQUEST,)f (IERROR)166 2186 y Fu(Start)14 b(a)h(sync)o(hronous)g(mo)q(de,)g(non)o (blo)q(c)o(king)i(send.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 25 27 25 26 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(25)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(IRSEND\(buf,)16 b(count,)g(datat)o(yp)q(e,)g(dest,)g(tag,)f(comm,)e(request\))117 122 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g (bu\013er)h(\(c)o(hoice\))117 197 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f (\(in)o(teger\))117 273 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(send)h(bu\013er)g(elemen)o(t)e (\(handle\))117 348 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 423 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 498 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 573 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 698 y Fo(int)23 b(MPI)p 245 698 15 2 v 17 w(Irsend\(void*)f(buf,)i(int)f(count,)g(MPI)p 1026 698 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 754 y(int)g(tag,)f(MPI)p 683 754 V 17 w(Comm)g(comm,)g(MPI)p 1034 754 V 17 w(Request)g(*request\))75 840 y(MPI)p 150 840 V 17 w(IRSEND\(BUF,)f(COUNT,)h(DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g (REQUEST,)g(IERROR\))170 897 y()g(BUF\(*\))170 953 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h(COMM,)f(REQUEST,)f (IERROR)166 1040 y Fu(Start)14 b(a)h(ready)g(mo)q(de)h(non)o(blo)q(c)o (king)g(send.)75 1191 y Fq(MPI)p 160 1191 14 2 v 16 w(IRECV)f(\(buf,)h (count,)g(datat)o(yp)q(e,)g(source,)g(tag,)e(comm,)f(request\))117 1268 y Fk(OUT)108 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(receiv) o(e)h(bu\013er)g(\(c)o(hoice\))117 1343 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(receiv)o(e)h (bu\013er)g(\(in)o(teger\))117 1418 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(receiv)o(e)h(bu\013er)g(elemen) o(t)e(\(handle\))117 1493 y(IN)155 b Fq(source)468 b Fk(rank)14 b(of)f(source)j(\(in)o(teger\))117 1569 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 1644 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1719 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1843 y Fo(int)23 b(MPI)p 245 1843 15 2 v 17 w(Irecv\(void*)g(buf,)g(int)g(count,)g(MPI)p 1002 1843 V 17 w(Datatype)g(datatype,)g(int)g(source,)393 1900 y(int)h(tag,)f(MPI)p 683 1900 V 17 w(Comm)g(comm,)g(MPI)p 1034 1900 V 17 w(Request)g(*request\))75 1986 y(MPI)p 150 1986 V 17 w(IRECV\(BUF,)f(COUNT,)h(DATATYPE,)g(SOURCE,)g(TAG,)g (COMM,)g(REQUEST,)g(IERROR\))170 2043 y()g(BUF\(*\))170 2099 y(INTEGER)g(COUNT,)g(DATATYPE,)g(SOURCE,)g(TAG,)g(COMM,)g (REQUEST,)g(IERROR)166 2186 y Fu(Start)14 b(a)h(non)o(blo)q(c)o(king)i (receiv)o(e.)166 2242 y(These)f(calls)h(allo)q(cate)g(a)e(comm)o (unication)i(request)f(ob)s(ject)f(and)h(asso)q(ciate)g(it)g(with)g (the)g(request)75 2298 y(handle)j(\(the)f(argumen)o(t)g Fq(request)p Fu(\).)30 b(The)18 b(request)h(can)f(b)q(e)h(used)f(later) h(to)e(query)i(the)f(status)f(of)h(the)75 2355 y(comm)o(unication)e(or) f(w)o(ait)f(for)h(its)g(completion.)166 2411 y(A)i(non)o(blo)q(c)o (king)i(send)f(call)g(indicates)h(that)e(the)g(system)g(ma)o(y)g(start) f(cop)o(ying)h(data)g(out)g(of)g(the)75 2468 y(send)g(bu\013er.)24 b(The)17 b(sender)g(should)g(not)g(access)f(an)o(y)g(part)g(of)g(the)h (send)g(bu\013er)g(after)e(a)i(non)o(blo)q(c)o(king)75 2524 y(send)f(op)q(eration)f(is)h(called,)g(un)o(til)h(the)e(send)h (completes.)166 2581 y(A)d(non)o(blo)q(c)o(king)h(receiv)o(e)g(call)g (indicates)g(that)e(the)h(system)f(ma)o(y)g(start)g(writing)h(data)f (in)o(to)h(the)g(re-)75 2637 y(ceiv)o(e)f(bu\013er.)19 b(The)11 b(receiv)o(er)h(should)h(not)e(access)g(an)o(y)g(part)g(of)g (the)g(receiv)o(e)i(bu\013er)e(after)g(a)g(non)o(blo)q(c)o(king)75 2694 y(receiv)o(e)16 b(op)q(eration)g(is)f(called,)i(un)o(til)f(the)f (receiv)o(e)h(completes.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 26 28 26 27 bop 75 -100 a Fu(26)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fl(1.7.3)49 b(Communication)17 b(Completion)75 131 y Fu(The)g(functions)g Fq(MPI)p 452 131 14 2 v 16 w(W)l(AIT)f Fu(and)g Fq(MPI)p 768 131 V 16 w(TEST)h Fu(are)f(used)h(to)f(complete)h(a)f(non)o(blo)q (c)o(king)h(comm)o(unica-)75 187 y(tion.)i(The)13 b(completion)h(of)e (a)g(send)h(op)q(eration)g(indicates)h(that)e(the)g(sender)h(is)g(no)o (w)f(free)h(to)f(up)q(date)h(the)75 244 y(lo)q(cations)k(in)f(the)h (send)f(bu\013er)g(\(the)g(send)g(op)q(eration)g(itself)h(lea)o(v)o(es) f(the)g(con)o(ten)o(t)g(of)f(the)h(send)h(bu\013er)75 300 y(unc)o(hanged\).)25 b(It)17 b(do)q(es)g(not)f(indicate)i(that)e (the)h(message)f(has)h(b)q(een)g(receiv)o(ed,)h(rather,)e(it)h(ma)o(y)f (ha)o(v)o(e)75 357 y(b)q(een)g(bu\013ered)g(b)o(y)f(the)h(comm)o (unication)g(subsystem.)k(Ho)o(w)o(ev)o(er,)14 b(if)i(a)f Fq(synchronous)i Fu(mo)q(de)f(send)g(w)o(as)75 413 y(used,)f(the)g (completion)h(of)f(the)f(send)i(op)q(eration)f(indicates)h(that)e(a)h (matc)o(hing)g(receiv)o(e)h(w)o(as)e(initiated,)75 470 y(and)h(that)g(the)g(message)g(will)i(ev)o(en)o(tually)f(b)q(e)g (receiv)o(ed)g(b)o(y)f(this)h(matc)o(hing)f(receiv)o(e.)166 526 y(The)20 b(completion)h(of)e(a)g(receiv)o(e)i(op)q(eration)f (indicates)h(that)e(the)h(receiv)o(e)g(bu\013er)g(con)o(tains)g(the)75 583 y(receiv)o(ed)d(message,)e(the)h(receiv)o(er)h(is)f(no)o(w)f(free)h (to)f(access)h(it,)g(and)g(that)f(the)h(status)f(ob)s(ject)g(is)h(set.) 22 b(It)75 639 y(do)q(es)13 b(not)g(indicate)i(that)d(the)h(matc)o (hing)g(send)h(op)q(eration)f(has)g(completed)h(\(but)f(indicates,)i (of)d(course,)75 695 y(that)i(the)i(send)g(w)o(as)e(initiated\).)166 752 y(W)l(e)28 b(shall)g(use)g(the)g(follo)o(wing)g(terminology:)45 b(A)28 b Fp(n)o(ull)g Fu(handle)h(is)f(a)g(handle)h(with)f(v)m(alue)75 808 y Fh(MPI)p 152 808 13 2 v 14 w(REQUEST)p 354 808 V 14 w(NULL)p Fu(.)17 b(A)g(p)q(ersisten)o(t)g(request)f(and)h(the)g (handle)h(to)e(it)g(are)h Fp(inactiv)o(e)g Fu(if)g(the)g(request)75 865 y(is)i(not)f(asso)q(ciated)g(with)h(an)o(y)f(ongoing)h(comm)o (unication)g(\(see)f(Section)h(1.9\).)28 b(A)19 b(handle)h(is)e Fp(activ)o(e)75 921 y Fu(if)g(it)f(is)h(neither)g(n)o(ull)h(nor)e (inactiv)o(e.)27 b(A)17 b Fp(empt)o(y)f Fu(status)h(is)h(a)e(status)h (whic)o(h)h(is)g(set)f(to)f(return)h Fq(tag)h(=)-2035 b Fi(>)75 978 y Fq(MPI)p 160 978 14 2 v 16 w(ANY)p 268 978 V 17 w(T)l(A)o(G)p Fu(,)15 b Fq(source)g(=)g(MPI)p 665 978 V 15 w(ANY)p 772 978 V 18 w(SOURCE)p Fu(,)g(and)g(is)g(also)g (in)o(ternally)h(con\014gured)f(so)f(that)g(calls)75 1034 y(to)f Fq(MPI)p 214 1034 V 16 w(GET)p 318 1034 V 17 w(COUNT)i Fu(and)f Fq(MPI)p 675 1034 V 16 w(GET)p 779 1034 V 16 w(ELEMENTS)g Fu(return)g Fq(count)i(=)e(0)p Fu(.)19 b(W)l(e)14 b(set)g(a)f(status)h(v)m(ariable)75 1091 y(to)g(empt)o(y)h(when)g(the)g(v)m(alue)h(returned)f(b)o(y)g(it)g (is)h(not)e(signi\014can)o(t.)21 b(Status)14 b(is)h(set)g(in)h(this)f (w)o(a)o(y)f(so)g(as)h(to)75 1147 y(prev)o(en)o(t)g(errors)f(due)i(to)f (accesses)g(of)g(stale)g(information.)-1243 b Fi(?)75 1298 y Fq(MPI)p 160 1298 V 16 w(W)l(AIT\(request,)16 b(status\))117 1375 y Fk(INOUT)62 b Fq(request)452 b Fk(request)16 b(\(handle\))117 1450 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 1575 y Fo(int)23 b(MPI)p 245 1575 15 2 v 17 w(Wait\(MPI)p 454 1575 V 16 w(Request)g(*request,)g(MPI)p 972 1575 V 17 w(Status)g(*status\))75 1661 y(MPI)p 150 1661 V 17 w(WAIT\(REQUEST,)f(STATUS,)h(IERROR\))170 1718 y(INTEGER)g(REQUEST,)g(STATUS\(MPI)p 819 1718 V 16 w(STATUS)p 979 1718 V 16 w(SIZE\),)g(IERROR)166 1804 y Fu(A)12 b(call)i(to)d Fq(MPI)p 430 1804 14 2 v 16 w(W)l(AIT)h Fu(returns)g(when)h(the)f(op)q(eration)h(iden)o(ti\014ed)h(b)o(y)e Fq(request)i Fu(is)f(complete.)19 b(If)13 b(the)75 1861 y(comm)o(unication)19 b(ob)s(ject)e(asso)q(ciated)i(with)f(this)g (request)g(w)o(as)g(created)g(b)o(y)g(a)f(non)o(blo)q(c)o(king)j(send)e (or)75 1917 y(receiv)o(e)d(call,)h(then)e(the)h(ob)s(ject)f(is)h (deallo)q(cated)h(b)o(y)e(the)h(call)g(to)f Fq(MPI)p 1281 1917 V 16 w(W)l(AIT)g Fu(and)h(the)f(request)h(handle)75 1974 y(is)h(set)f(to)f Fh(MPI)p 324 1974 13 2 v 15 w(REQUEST)p 527 1974 V 13 w(NULL)p Fu(.)i Fq(MPI)p 754 1974 14 2 v 16 w(W)l(AIT)f Fu(is)h(a)f(non-lo)q(cal)h(op)q(eration.)166 2030 y(The)j(call)h(returns,)f(in)g Fq(status)p Fu(,)j(information)c (on)h(the)g(completed)h(op)q(eration.)30 b(The)19 b(con)o(ten)o(t)f(of) 75 2086 y(the)d(status)f(ob)s(ject)h(for)f(a)h(receiv)o(e)h(op)q (eration)f(can)h(b)q(e)f(accessed)h(as)f(describ)q(ed)i(in)f(section)f (1.2.5.)k(The)75 2143 y(status)13 b(ob)s(ject)g(for)f(a)i(send)g(op)q (eration)f(ma)o(y)g(b)q(e)h(queried)h(b)o(y)f(a)f(call)h(to)f Fq(MPI)p 1385 2143 V 16 w(TEST)p 1515 2143 V 17 w(CANCELLED)g Fu(\(see)75 2199 y(Section)j(1.8\).)-484 b Fi(>)166 2256 y Fu(One)15 b(is)g(allo)o(w)o(ed)f(to)g(call)h Fq(MPI)p 688 2256 V 16 w(W)l(AIT)f Fu(with)h(a)e(n)o(ull)j(or)e(inactiv)o(e)h Fq(request)h Fu(argumen)o(t.)j(In)14 b(this)h(case)75 2312 y(the)g(op)q(eration)h(returns)f(immediately)i(with)e(a)g(empt)o (y)g Fq(status)p Fu(.)-1337 b Fi(?)189 2419 y Fj(A)n(dvic)n(e)17 b(to)j(users.)56 b Fu(Successful)20 b(return)e(of)f Fq(MPI)p 1064 2419 V 16 w(W)l(AIT)h Fu(after)f(a)h Fq(MPI)p 1444 2419 V 15 w(IBSEND)h Fu(implies)h(that)189 2475 y(the)f(user)g(send)g (bu\013er)g(can)g(b)q(e)h(reused)f(|)h(i.e.,)f(data)g(has)f(b)q(een)j (sen)o(t)d(out)h(or)f(copied)i(in)o(to)f(a)189 2531 y(bu\013er)10 b(attac)o(hed)h(with)g Fq(MPI)p 680 2531 V 16 w(BUFFER)p 865 2531 V 17 w(A)l(TT)l(A)o(CH)p Fu(.)g(Note)g(that,)f(at)g(this)i(p)q (oin)o(t,)f(w)o(e)g(can)g(no)g(longer)189 2588 y(cancel)17 b(the)f(send)h(\(see)f(Sec.)23 b(1.8\).)e(If)16 b(a)g(matc)o(hing)g (receiv)o(e)h(is)g(nev)o(er)f(p)q(osted,)g(then)h(the)f(bu\013er)189 2644 y(cannot)k(b)q(e)h(freed.)37 b(This)21 b(runs)g(somewhat)f(coun)o (ter)g(to)g(the)h(stated)f(goal)h(of)f Fq(MPI)p 1690 2644 V 16 w(CANCEL)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 27 29 27 28 bop 75 -100 a Fm(1.7.)29 b(NONBLOCKING)17 b(COMMUNICA)l(TION)868 b Fu(27)189 45 y(\(alw)o(a)o(ys)15 b(b)q(eing)i(able)g(to)e(free)h (program)f(space)h(that)g(w)o(as)f(committed)h(to)f(the)h(comm)o (unication)189 102 y(subsystem\).)j(\()p Fj(End)d(of)g(advic)n(e)g(to)h (users.)p Fu(\))189 208 y Fj(A)n(dvic)n(e)j(to)h(implementors.)72 b Fu(In)21 b(a)f(m)o(ulti-threaded)i(en)o(vironmen)o(t,)f(a)f(call)i (to)40 b Fq(MPI)p 1749 208 14 2 v 16 w(W)l(AIT)189 264 y Fu(should)12 b(blo)q(c)o(k)g(only)g(the)g(calling)h(thread,)f(allo)o (wing)g(the)g(thread)f(sc)o(heduler)i(to)e(sc)o(hedule)i(another)189 321 y(thread)i(for)f(execution.)21 b(\()p Fj(End)16 b(of)g(advic)n(e)g (to)h(implementors.)p Fu(\))75 521 y Fq(MPI)p 160 521 V 16 w(TEST\(request,)f(\015ag,)f(status\))117 599 y Fk(INOUT)62 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))117 674 y(OUT)108 b Fq(\015ag)518 b Fh(true)15 b Fk(if)e(op)q(eration)h(completed)f(\(logical\))117 749 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\)) 75 873 y Fo(int)23 b(MPI)p 245 873 15 2 v 17 w(Test\(MPI)p 454 873 V 16 w(Request)g(*request,)g(int)g(*flag,)g(MPI)p 1234 873 V 17 w(Status)g(*status\))75 960 y(MPI)p 150 960 V 17 w(TEST\(REQUEST,)f(FLAG,)h(STATUS,)g(IERROR\))170 1016 y(LOGICAL)g(FLAG)170 1073 y(INTEGER)g(REQUEST,)g(STATUS\(MPI)p 819 1073 V 16 w(STATUS)p 979 1073 V 16 w(SIZE\),)g(IERROR)166 1159 y Fu(A)17 b(call)i(to)e Fq(MPI)p 446 1159 14 2 v 15 w(TEST)h Fu(returns)f Fq(\015ag)h(=)f(true)h Fu(if)g(the)g(op)q (eration)f(iden)o(ti\014ed)j(b)o(y)d Fq(request)i Fu(is)f(com-)75 1216 y(plete.)37 b(In)21 b(suc)o(h)g(a)f(case,)i(the)e(status)g(ob)s (ject)g(is)h(set)f(to)g(con)o(tain)h(information)g(on)f(the)h (completed)75 1272 y(op)q(eration;)15 b(if)h(the)f(comm)o(unication)h (ob)s(ject)e(w)o(as)h(created)g(b)o(y)g(a)g(non)o(blo)q(c)o(king)h (send)g(or)f(receiv)o(e,)h(then)75 1329 y(it)g(is)f(deallo)q(cated)i (and)f(the)f(request)h(handle)g(is)g(set)f(to)g Fh(MPI)p 1127 1329 13 2 v 14 w(REQUEST)p 1329 1329 V 14 w(NULL)p Fu(.)h(The)f(call)i(returns)e Fq(\015ag)75 1385 y(=)g(false)p Fu(,)g(otherwise.)20 b(In)c(this)g(case,)f(the)g(v)m(alue)h(of)f(the)g (status)f(ob)s(ject)h(is)h(unde\014ned.)21 b Fq(MPI)p 1664 1385 14 2 v 16 w(TEST)16 b Fu(is)f(a)75 1442 y(lo)q(cal)h(op)q (eration.)166 1498 y(The)11 b(return)g(status)f(ob)s(ject)h(for)f(a)h (receiv)o(e)h(op)q(eration)f(carries)g(information)g(that)g(can)g(b)q (e)g(accessed)75 1554 y(as)19 b(describ)q(ed)h(in)g(section)g(1.2.5.)29 b(The)19 b(status)g(ob)s(ject)f(for)g(a)h(send)g(op)q(eration)h (carries)f(information)75 1611 y(that)14 b(can)i(b)q(e)g(accessed)f(b)o (y)h(a)e(call)j(to)d Fq(MPI)p 823 1611 V 16 w(TEST)p 953 1611 V 17 w(CANCELLED)h Fu(\(see)g(Section)h(1.8\).)358 b Fi(>)166 1667 y Fu(One)18 b(is)f(allo)o(w)o(ed)g(to)g(call)h Fq(MPI)p 702 1667 V 15 w(TEST)f Fu(with)h(a)e(n)o(ull)j(or)d(inactiv)o (e)i Fq(request)g Fu(argumen)o(t.)25 b(In)17 b(suc)o(h)g(a)75 1724 y(case)e(the)g(op)q(eration)h(returns)f(with)h Fq(\015ag)f(=)g (true)h Fu(and)f(empt)o(y)g Fq(status)p Fu(.)647 b Fi(?)166 1780 y Fu(The)22 b(functions)h Fq(MPI)p 554 1780 V 15 w(W)l(AIT)f Fu(and)g Fq(MPI)p 881 1780 V 16 w(TEST)g Fu(can)g(b)q(e)g(used)h(to)e(complete)h(b)q(oth)g(sends)h(and)75 1837 y(receiv)o(es.)189 1943 y Fj(A)n(dvic)n(e)e(to)h(users.)79 b Fu(The)22 b(use)g(of)f(the)h(non)o(blo)q(c)o(king)h Fq(MPI)p 1267 1943 V 16 w(TEST)f Fu(call)g(allo)o(ws)g(the)g(user)g(to) 189 1999 y(sc)o(hedule)e(alternativ)o(e)f(activities)h(within)g(a)f (single)h(thread)f(of)f(execution.)32 b(An)19 b(ev)o(en)o(t-driv)o(en) 189 2056 y(thread)14 b(sc)o(heduler)h(can)f(b)q(e)h(em)o(ulated)g(with) f(p)q(erio)q(dic)i(calls)f(to)f Fq(MPI)p 1382 2056 V 16 w(TEST)p Fu(.)g(\()p Fj(End)g(of)i(advic)n(e)f(to)189 2112 y(users.)p Fu(\))1937 2174 y Fi(>)189 2268 y Fj(R)n(ationale.)55 b Fu(The)18 b(function)g Fq(MPI)p 807 2268 V 16 w(TEST)g Fu(returns)f(with)h Fq(\015ag)g(=)g(true)g Fu(exactly)g(in)h(those)e (situ-)189 2325 y(ations)f(where)g(the)g(function)h Fq(MPI)p 799 2325 V 16 w(W)l(AIT)f Fu(returns;)g(b)q(oth)g(functions)h(return)f (in)h(suc)o(h)g(case)f(the)189 2381 y(same)f(v)m(alue)i(in)g Fq(status)p Fu(.)24 b(Th)o(us,)15 b(a)h(blo)q(c)o(king)h(W)l(ait)f(can) g(b)q(e)g(easily)h(replaced)g(b)o(y)f(a)g(non)o(blo)q(c)o(king)189 2438 y(T)l(est.)j(\()p Fj(End)d(of)g(r)n(ationale.)p Fu(\))1937 2499 y Fi(?)75 2594 y Fp(Example)i(1.11)23 b Fu(Simple)16 b(usage)f(of)g(non)o(blo)q(c)o(king)i(op)q(erations)e (and)g Fq(MPI)p 1378 2594 V 16 w(W)l(AIT)p Fu(.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 28 30 28 29 bop 75 -100 a Fu(28)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 102 y(IF\(rank.EQ.0\))f (THEN)170 158 y(CALL)i(MPI_ISEND\(a\(1\),)e(10,)h(MPI_REAL,)g(1,)g (tag,)h(comm,)f(request,)g(ierr\))170 214 y(****)h(do)f(some)h (computation)e(to)i(mask)f(latency)g(****)170 271 y(CALL)h (MPI_WAIT\(request,)d(status,)i(ierr\))75 327 y(ELSE)170 384 y(CALL)h(MPI_IRECV\(a\(1\),)e(15,)h(MPI_REAL,)g(0,)g(tag,)h(comm,)f (request,)g(ierr\))170 440 y(****)h(do)f(some)h(computation)e(to)i (mask)f(latency)g(****)170 497 y(CALL)h(MPI_WAIT\(request,)d(status,)i (ierr\))75 553 y(END)g(IF)166 659 y Fu(A)14 b(request)g(ob)s(ject)f (can)h(b)q(e)g(deallo)q(cated)h(without)f(w)o(aiting)g(for)f(the)h (asso)q(ciated)g(comm)o(unication)75 716 y(to)h(complete,)g(b)o(y)g (using)h(the)f(follo)o(wing)h(op)q(eration.)75 867 y Fq(MPI)p 160 867 14 2 v 16 w(REQUEST)p 379 867 V 18 w(FREE\(request\)) 117 944 y Fk(INOUT)62 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1069 y Fo(int)23 b(MPI)p 245 1069 15 2 v 17 w(Request)p 430 1069 V 16 w(free\(MPI)p 638 1069 V 17 w(Request)f(*request\))75 1155 y(MPI)p 150 1155 V 17 w(REQUEST)p 335 1155 V 16 w(FREE\(REQUEST,)g(IERROR\))170 1211 y(INTEGER)h(REQUEST,)g(IERROR)166 1298 y Fu(Mark)18 b(the)h(request)g(ob)s(ject)g(for)f(deallo)q(cation)j(and)e(set)g Fq(request)i Fu(to)d Fh(MPI)p 1467 1298 13 2 v 14 w(REQUEST)p 1669 1298 V 14 w(NULL)p Fu(.)i(An)75 1354 y(ongoing)g(comm)o(unication) h(that)e(is)i(asso)q(ciated)f(with)h(the)f(request)g(will)i(b)q(e)f (allo)o(w)o(ed)f(to)g(complete.)75 1411 y(The)15 b(request)h(will)h(b)q (e)e(deallo)q(cated)i(only)f(after)e(its)i(completion.)189 1517 y Fj(R)n(ationale.)51 b Fu(The)17 b Fq(MPI)p 622 1517 14 2 v 16 w(REQUEST)p 841 1517 V 18 w(FREE)g Fu(mec)o(hanism)h(is) f(pro)o(vided)h(for)f(reasons)f(of)h(p)q(erfor-)189 1574 y(mance)e(and)g(con)o(v)o(enience)i(on)e(the)h(sending)g(side.)21 b(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))189 1680 y Fj(A)n(dvic)n(e)i(to)i(users.)68 b Fu(Once)21 b(a)f(request)f(is)i (freed)f(b)o(y)g(a)f(call)i(to)f Fq(MPI)p 1419 1680 V 15 w(REQUEST)p 1637 1680 V 18 w(FREE)p Fu(,)g(it)g(is)189 1736 y(not)c(p)q(ossible)j(to)e(c)o(hec)o(k)g(for)g(the)g(successful)i (completion)f(of)f(the)g(asso)q(ciated)g(comm)o(unication)189 1793 y(with)h(calls)h(to)e Fq(MPI)p 542 1793 V 16 w(W)l(AIT)h Fu(or)g Fq(MPI)p 830 1793 V 15 w(TEST)p Fu(.)g(Also,)h(if)f(an)g(error) g(o)q(ccurs)g(subsequen)o(tly)h(during)189 1849 y(the)f(comm)o (unication,)i(an)f(error)f(co)q(de)i(cannot)e(b)q(e)i(returned)f(to)f (the)h(user)g(|)g(suc)o(h)g(an)g(error)189 1906 y(m)o(ust)d(b)q(e)i (treated)f(as)f(fatal.)26 b(Questions)18 b(arise)f(as)g(to)f(ho)o(w)h (one)g(kno)o(ws)g(when)h(the)f(op)q(erations)189 1962 y(ha)o(v)o(e)f(completed)i(when)g(using)f Fq(MPI)p 840 1962 V 16 w(REQUEST)p 1059 1962 V 18 w(FREE)p Fu(.)g(Dep)q(ending)i(on) e(the)g(program)e(logic,)189 2019 y(there)j(ma)o(y)g(b)q(e)g(other)g(w) o(a)o(ys)f(in)j(whic)o(h)f(the)f(program)f(kno)o(ws)h(that)f(certain)i (op)q(erations)f(ha)o(v)o(e)189 2075 y(completed)f(and)f(this)h(mak)o (es)e(usage)h(of)g Fq(MPI)p 986 2075 V 16 w(REQUEST)p 1205 2075 V 18 w(FREE)g Fu(practical.)24 b(F)l(or)15 b(example,)i(an)189 2131 y(activ)o(e)j(send)g(request)g(could)h(b)q(e)g (freed)g(when)f(the)g(logic)h(of)f(the)g(program)f(is)h(suc)o(h)h(that) e(the)189 2188 y(receiv)o(er)i(sends)h(a)f(reply)h(to)e(the)h(message)g (sen)o(t)g(|)g(the)g(arriv)m(al)h(of)f(the)g(reply)h(informs)f(the)189 2244 y(sender)f(that)f(the)g(send)h(has)g(completed)g(and)g(the)g(send) g(bu\013er)f(can)h(b)q(e)g(reused.)34 b(An)20 b(activ)o(e)189 2301 y(receiv)o(e)e(request)f(should)h(nev)o(er)f(b)q(e)g(freed)h(as)e (the)h(receiv)o(er)h(will)h(ha)o(v)o(e)d(no)h(w)o(a)o(y)f(to)g(v)o (erify)i(that)189 2357 y(the)h(receiv)o(e)i(has)e(completed)h(and)g (the)g(receiv)o(e)g(bu\013er)g(can)f(b)q(e)h(reused.)34 b(\()p Fj(End)19 b(of)i(advic)n(e)f(to)189 2414 y(users.)p Fu(\))75 2520 y Fp(Example)e(1.12)23 b Fu(An)15 b(example)h(using)g Fq(MPI)p 863 2520 V 16 w(REQUEST)p 1082 2520 V 18 w(FREE)p Fu(.)75 2626 y Fo(CALL)23 b(MPI_COMM_RANK\(MPI_COMM_WORLD)o(,)e(rank\)) 75 2683 y(IF\(rank.EQ.0\))h(THEN)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 29 31 29 30 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(29)170 45 y Fo(DO)24 b(i=1,)f(n)218 102 y(CALL)g (MPI_ISEND\(outval,)f(1,)i(MPI_REAL,)e(1,)i(0,)f(req,)h(ierr\))218 158 y(CALL)f(MPI_REQUEST_FREE\(req,)e(ierr\))218 214 y(CALL)i(MPI_IRECV\(inval,)f(1,)i(MPI_REAL,)e(1,)i(0,)g(req,)f(ierr\)) 218 271 y(CALL)g(MPI_WAIT\(req,)g(status,)f(ierr\))170 327 y(END)i(DO)75 384 y(ELSE)95 b(!)24 b(rank.EQ.1)170 440 y(CALL)g(MPI_IRECV\(inval,)d(1,)j(MPI_REAL,)f(0,)g(0,)h(req,)f (ierr\))170 497 y(CALL)h(MPI_WAIT\(req,)e(status\))170 553 y(DO)i(I=1,)f(n-1)242 610 y(CALL)g(MPI_ISEND\(outval,)f(1,)h (MPI_REAL,)g(0,)h(0,)f(req,)h(ierr\))242 666 y(CALL)f (MPI_REQUEST_FREE\(req,)e(ierr\))242 723 y(CALL)i(MPI_IRECV\(inval,)f (1,)i(MPI_REAL,)e(0,)i(0,)f(req,)h(ierr\))242 779 y(CALL)f (MPI_WAIT\(req,)f(status,)h(ierr\))170 835 y(END)h(DO)170 892 y(CALL)g(MPI_ISEND\(outval,)d(1,)j(MPI_REAL,)f(0,)g(0,)h(req,)f (ierr\))170 948 y(CALL)h(MPI_WAIT\(req,)e(status\))75 1005 y(END)h(IF)75 1124 y Fl(1.7.4)49 b(Semantics)15 b(of)i(Nonblo)q(cking)h(Communications)75 1210 y Fu(The)11 b(seman)o(tics)f(of)h(non)o(blo)q(c)o(king)g(comm)o(unication)h(is)f (de\014ned)h(b)o(y)e(suitably)i(extending)g(the)e(de\014nitions)75 1266 y(in)16 b(Section)g(1.5.)75 1383 y Fq(Order)46 b Fu(Non)o(blo)q(c)o(king)12 b(comm)o(unication)f(op)q(erations)g(are)g (ordered)g(according)g(to)f(the)h(execution)h(order)75 1440 y(of)h(the)g(calls)h(that)e(initiate)i(the)f(comm)o(unication.)20 b(The)13 b(non-o)o(v)o(ertaking)g(requiremen)o(t)g(of)g(Section)h(1.5) 75 1496 y(is)i(extended)g(to)e(non)o(blo)q(c)o(king)j(comm)o (unication,)f(with)f(this)h(de\014nition)h(of)d(order)h(b)q(eing)i (used.)75 1582 y Fp(Example)h(1.13)23 b Fu(Message)14 b(ordering)i(for)e(non)o(blo)q(c)o(king)j(op)q(erations.)75 1661 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 1717 y(IF)h(\(RANK.EQ.0\))e(THEN)218 1773 y(CALL)h(MPI_ISEND\(a,)g(1,)g (MPI_REAL,)g(1,)h(0,)f(comm,)g(r1,)h(ierr\))218 1830 y(CALL)f(MPI_ISEND\(b,)g(1,)g(MPI_REAL,)g(1,)h(0,)f(comm,)g(r2,)h (ierr\))75 1886 y(ELSE)95 b(!)24 b(rank.EQ.1)218 1943 y(CALL)f(MPI_IRECV\(a,)g(1,)g(MPI_REAL,)g(0,)h(MPI_ANY_TAG,)e(comm,)h (r1,)g(ierr\))218 1999 y(CALL)g(MPI_IRECV\(b,)g(1,)g(MPI_REAL,)g(0,)h (0,)f(comm,)g(r2,)h(ierr\))75 2056 y(END)f(IF)75 2112 y(CALL)g(MPI_WAIT\(r1,status\))75 2169 y(CALL)g(MPI_WAIT\(r2,status\)) 75 2248 y Fu(The)11 b(\014rst)f(send)h(of)f(pro)q(cess)h(zero)f(will)j (matc)o(h)d(the)g(\014rst)g(receiv)o(e)i(of)e(pro)q(cess)h(one,)g(ev)o (en)g(if)g(b)q(oth)f(messages)75 2304 y(are)15 b(sen)o(t)g(b)q(efore)g (pro)q(cess)h(one)f(executes)h(either)g(receiv)o(e.)75 2421 y Fq(Progress)45 b Fu(A)12 b(call)h(to)f Fq(MPI)p 545 2421 14 2 v 15 w(W)l(AIT)g Fu(that)g(completes)g(a)g(receiv)o(e)h (will)h(ev)o(en)o(tually)f(terminate)f(and)g(return)75 2478 y(if)21 b(a)f(matc)o(hing)g(send)h(has)f(b)q(een)h(started,)g (unless)g(the)g(send)g(is)f(satis\014ed)h(b)o(y)f(another)g(receiv)o (e.)36 b(In)75 2534 y(particular,)20 b(if)f(the)g(matc)o(hing)g(send)g (is)g(non)o(blo)q(c)o(king,)i(then)e(the)g(receiv)o(e)g(should)h (complete)f(ev)o(en)g(if)75 2591 y(no)c(call)i(is)e(executed)i(b)o(y)e (the)g(sender)h(to)f(complete)h(the)f(send.)20 b(Similarly)l(,)e(a)d (call)h(to)f Fq(MPI)p 1651 2591 V 15 w(W)l(AIT)h Fu(that)75 2647 y(completes)i(a)e(send)i(will)h(ev)o(en)o(tually)f(return)f(if)g (a)g(matc)o(hing)g(receiv)o(e)h(has)f(b)q(een)h(started,)f(unless)h (the)75 2704 y(receiv)o(e)e(is)g(satis\014ed)f(b)o(y)g(another)g(send,) g(and)g(ev)o(en)h(if)f(no)g(call)h(is)g(executed)g(to)e(complete)i(the) f(receiv)o(e.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 30 32 30 31 bop 75 -100 a Fu(30)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fp(Example)h(1.14)23 b Fu(An)15 b(illustration)i(of)d(progress)h(seman)o(tics.)75 138 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 194 y(IF)h(\(RANK.EQ.0\))e(THEN)218 251 y(CALL)h(MPI_SSEND\(a,)g(1,)g (MPI_REAL,)g(1,)h(0,)f(comm,)g(ierr\))218 307 y(CALL)g(MPI_SEND\(b,)g (1,)g(MPI_REAL,)g(1,)h(1,)f(comm,)g(ierr\))75 363 y(ELSE)95 b(!)24 b(rank.EQ.1)218 420 y(CALL)f(MPI_IRECV\(a,)g(1,)g(MPI_REAL,)g (0,)h(0,)f(comm,)g(r,)h(ierr\))218 476 y(CALL)f(MPI_RECV\(b,)g(1,)g (MPI_REAL,)g(0,)h(1,)f(comm,)g(ierr\))218 533 y(CALL)g(MPI_WAIT\(r,)g (status,)g(ierr\))75 589 y(END)g(IF)166 682 y Fu(This)14 b(co)q(de)f(should)h(not)f(deadlo)q(c)o(k)h(in)g(a)e(correct)h Fq(MPI)g Fu(implemen)o(tation.)20 b(The)13 b(\014rst)g(sync)o(hronous) 75 738 y(send)22 b(of)e(pro)q(cess)h(zero)g(m)o(ust)f(complete)i(after) e(pro)q(cess)i(one)f(p)q(osts)f(the)h(matc)o(hing)g(\(non)o(blo)q(c)o (king\))75 795 y(receiv)o(e)15 b(ev)o(en)f(if)h(pro)q(cess)f(one)g(has) g(not)f(y)o(et)h(reac)o(hed)g(the)g(completing)h(w)o(ait)f(call.)20 b(Th)o(us,)14 b(pro)q(cess)g(zero)75 851 y(will)j(con)o(tin)o(ue)f(and) f(execute)h(the)f(second)h(send,)f(allo)o(wing)h(pro)q(cess)g(one)f(to) g(complete)h(execution.)166 956 y(If)d(an)f Fq(MPI)p 354 956 14 2 v 16 w(TEST)h Fu(that)f(completes)h(a)g(receiv)o(e)g(is)g (rep)q(eatedly)h(called)g(with)f(the)g(same)f(argumen)o(ts,)75 1012 y(and)g(a)g(matc)o(hing)g(send)h(has)f(b)q(een)h(started,)f(then)g (the)g(call)i(will)f(ev)o(en)o(tually)g(return)f Fq(\015ag)g(=)h(true)p Fu(,)g(unless)75 1069 y(the)g(send)g(is)g(satis\014ed)g(b)o(y)f (another)h(receiv)o(e.)19 b(If)13 b(an)g Fq(MPI)p 1046 1069 V 16 w(TEST)f Fu(that)g(completes)h(a)g(send)g(is)g(rep)q(eatedly) 75 1125 y(called)i(with)f(the)g(same)f(argumen)o(ts,)g(and)h(a)f(matc)o (hing)g(receiv)o(e)i(has)e(b)q(een)i(started,)e(then)h(the)g(call)g (will)75 1182 y(ev)o(en)o(tually)i(return)f Fq(\015ag)g(=)h(true)p Fu(,)f(unless)i(the)e(receiv)o(e)h(is)g(satis\014ed)g(b)o(y)f(another)f (send.)75 1303 y Fl(1.7.5)49 b(Multiple)17 b(Completions)75 1389 y Fu(It)h(is)h(con)o(v)o(enien)o(t)g(to)f(b)q(e)h(able)g(to)f(w)o (ait)g(for)f(the)i(completion)g(of)f(an)o(y)l(,)h(some,)f(or)g(all)h (the)g(op)q(erations)75 1445 y(in)h(a)f(list,)i(rather)d(than)i(ha)o (ving)f(to)g(w)o(ait)g(for)f(a)h(sp)q(eci\014c)i(message.)32 b(A)19 b(call)i(to)d Fq(MPI)p 1600 1445 V 16 w(W)l(AIT)l(ANY)i Fu(or)75 1502 y Fq(MPI)p 160 1502 V 16 w(TEST)l(ANY)d Fu(can)f(b)q(e)g(used)g(to)f(w)o(ait)h(for)f(the)h(completion)h(of)e (one)h(out)f(of)g(sev)o(eral)h(op)q(erations.)22 b(A)75 1558 y(call)d(to)d Fq(MPI)p 303 1558 V 16 w(W)l(AIT)l(ALL)h Fu(or)g Fq(MPI)p 665 1558 V 16 w(TEST)l(ALL)h Fu(can)f(b)q(e)h(used)g (to)f(w)o(ait)g(for)g(all)h(p)q(ending)i(op)q(erations)d(in)75 1615 y(a)e(list.)23 b(A)16 b(call)h(to)e Fq(MPI)p 484 1615 V 15 w(W)l(AITSOME)i Fu(or)e Fq(MPI)p 892 1615 V 16 w(TESTSOME)h Fu(can)g(b)q(e)h(used)f(to)f(complete)i(all)f(enabled) 75 1671 y(op)q(erations)f(in)h(a)f(list.)75 1822 y Fq(MPI)p 160 1822 V 16 w(W)l(AIT)l(ANY)h(\(count,)g(a)o(rra)o(y)p 640 1822 V 14 w(of)p 691 1822 V 16 w(requests,)h(index,)f(status\))117 1899 y Fk(IN)155 b Fq(count)482 b Fk(list)14 b(length)f(\(in)o(teger\)) 117 1974 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 1974 V 15 w(of)p 468 1974 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o(y)e(of)f(handles\))117 2049 y(OUT)108 b Fq(index)489 b Fk(index)12 b(of)f(handle)g(for)g(op)q (eration)h(that)f(completed)g(\(in)o(teger\))117 2124 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 2248 y Fo(int)23 b(MPI)p 245 2248 15 2 v 17 w(Waitany\(int)g(count,)g (MPI)p 788 2248 V 16 w(Request)g(*array)p 1139 2248 V 17 w(of)p 1204 2248 V 17 w(requests,)f(int)i(*index,)393 2305 y(MPI)p 468 2305 V 17 w(Status)f(*status\))75 2391 y(MPI)p 150 2391 V 17 w(WAITANY\(COUNT,)f(ARRAY)p 645 2391 V 16 w(OF)p 709 2391 V 17 w(REQUESTS,)h(INDEX,)g(STATUS,)g (IERROR\))170 2448 y(INTEGER)g(COUNT,)g(ARRAY)p 651 2448 V 17 w(OF)p 716 2448 V 17 w(REQUESTS\(*\),)f(INDEX,)h(STATUS\(MPI)p 1450 2448 V 16 w(STATUS)p 1610 2448 V 16 w(SIZE\),)170 2504 y(IERROR)166 2591 y Fu(Blo)q(c)o(ks)16 b(un)o(til)g(one)f(of)g (the)h(op)q(erations)f(asso)q(ciated)g(with)h(the)f(activ)o(e)h (requests)f(in)h(the)f(arra)o(y)f(has)75 2647 y(completed.)36 b(If)21 b(more)f(then)h(one)f(op)q(eration)h(is)g(enabled)h(and)e(can)h (terminate,)g(one)f(is)h(arbitrarily)75 2704 y(c)o(hosen.)28 b(Returns)18 b(in)h Fq(index)g Fu(the)f(index)h(of)e(that)h(request)f (in)i(the)f(arra)o(y)f(and)h(returns)f(in)i Fq(status)h Fu(the)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 31 33 31 32 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(31)75 45 y(status)16 b(of)h(the)f(completing)j(comm)o(unication.) 25 b(\(The)17 b(arra)o(y)f(is)h(indexed)i(from)d(zero)h(in)g(C,)g(and)g (from)75 102 y(one)g(in)i(F)l(ortran.\))24 b(If)18 b(the)f(request)g(w) o(as)g(allo)q(cated)h(b)o(y)f(a)g(non)o(blo)q(c)o(king)i(comm)o (unication)f(op)q(eration,)75 158 y(then)e(it)f(is)h(deallo)q(cated)g (and)g(the)f(request)g(handle)i(is)e(set)g(to)g Fh(MPI)p 1229 158 13 2 v 14 w(REQUEST)p 1431 158 V 14 w(NULL)p Fu(.)379 b Fi(>)166 214 y Fu(The)17 b Fq(a)o(rra)o(y)p 359 214 14 2 v 15 w(of)p 411 214 V 16 w(requests)i Fu(list)e(ma)o(y)g (con)o(tain)g(n)o(ull)h(or)f(inactiv)o(e)h(handles.)26 b(If)17 b(the)g(list)h(con)o(tains)f(no)75 271 y(activ)o(e)e(handles)i (\(list)f(has)f(length)h(zero)f(or)g(all)h(en)o(tries)g(are)f(n)o(ull)i (or)e(inactiv)o(e\),)g(then)h(the)g(call)g(returns)75 327 y(immediately)h(with)e Fq(index)i(=)e(MPI)p 687 327 V 16 w(UNDEFINED)p Fu(,)g(and)g(a)g(empt)o(y)g Fq(status)p Fu(.)166 384 y(The)k(execution)h(of)e Fq(MPI)p 610 384 V 16 w(W)l(AIT)l(ANY\(count,)j(a)o(rra)o(y)p 1079 384 V 14 w(of)p 1130 384 V 16 w(requests,)h(index,)e(status\))g Fu(has)f(the)f(same)75 440 y(e\013ect)k(as)g(the)g(execution)i(of)44 b Fq(MPI)p 727 440 V 16 w(W)l(AIT\(&a)o(rra)o(y)p 1003 440 V 14 w(of)p 1054 440 V 16 w(requests[i],)26 b(status\))p Fu(,)g(where)c Fq(i)g Fu(is)h(the)g(v)m(alue)75 497 y(returned)c(b)o(y) g Fq(index)h Fu(\(unless)g(the)f(v)m(alue)h(of)f Fq(index)h Fu(is)f Fh(MPI)p 1107 497 13 2 v 15 w(UNDEFINED)p Fu(\).)e Fq(MPI)p 1486 497 14 2 v 16 w(W)l(AIT)l(ANY)j Fu(with)f(an)75 553 y(arra)o(y)14 b(con)o(taining)i(one)f(activ)o(e)h(en)o(try)e(is)i (equiv)m(alen)o(t)h(to)e Fq(MPI)p 1151 553 V 15 w(W)l(AIT)p Fu(.)648 b Fi(?)75 704 y Fq(MPI)p 160 704 V 16 w(TEST)l(ANY\(count,)17 b(a)o(rra)o(y)p 626 704 V 14 w(of)p 677 704 V 16 w(requests,)g(index,)f (\015ag,)f(status\))117 781 y Fk(IN)155 b Fq(count)482 b Fk(list)14 b(length)f(\(in)o(teger\))117 856 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 856 V 15 w(of)p 468 856 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o(y)e(of)f(handles\))117 932 y(OUT)108 b Fq(index)489 b Fk(index)23 b(of)g(op)q(eration)g(that)g (completed,)i(or)e Fh(MPI)p 1736 932 13 2 v 14 w(UNDE-)905 988 y(FINED)13 b Fk(if)g(none)i(completed)e(\(in)o(teger\))117 1063 y(OUT)108 b Fq(\015ag)518 b Fh(true)15 b Fk(if)e(one)h(of)g(the)g (op)q(erations)g(is)g(complete)f(\(logical\))117 1138 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 1263 y Fo(int)23 b(MPI)p 245 1263 15 2 v 17 w(Testany\(int)g(count,)g (MPI)p 788 1263 V 16 w(Request)g(*array)p 1139 1263 V 17 w(of)p 1204 1263 V 17 w(requests,)f(int)i(*index,)393 1319 y(int)g(*flag,)f(MPI)p 731 1319 V 16 w(Status)g(*status\))75 1406 y(MPI)p 150 1406 V 17 w(TESTANY\(COUNT,)f(ARRAY)p 645 1406 V 16 w(OF)p 709 1406 V 17 w(REQUESTS,)h(INDEX,)g(FLAG,)g (STATUS,)g(IERROR\))170 1462 y(LOGICAL)g(FLAG)170 1519 y(INTEGER)g(COUNT,)g(ARRAY)p 651 1519 V 17 w(OF)p 716 1519 V 17 w(REQUESTS\(*\),)f(INDEX,)h(STATUS\(MPI)p 1450 1519 V 16 w(STATUS)p 1610 1519 V 16 w(SIZE\),)170 1575 y(IERROR)166 1662 y Fu(T)l(ests)d(for)h(completion)h(of)e(either)i(one) f(or)f(none)h(of)g(the)g(op)q(erations)g(asso)q(ciated)g(with)g(activ)o (e)75 1718 y(handles.)g(In)14 b(the)g(former)f(case,)h(it)g(returns)g Fq(\015ag)g(=)g(true)p Fu(,)h(returns)e(in)i Fq(index)g Fu(the)f(index)h(of)f(this)g(request)75 1774 y(in)h(the)g(arra)o(y)l(,) f(and)g(returns)h(in)g Fq(status)i Fu(the)e(status)f(of)g(that)g(op)q (eration;)h(if)g(the)f(request)h(w)o(as)f(allo)q(cated)75 1831 y(b)o(y)i(a)f(non)o(blo)q(c)o(king)i(comm)o(unication)g(call)f (then)g(the)g(request)g(is)g(deallo)q(cated)h(and)f(the)g(handle)h(is)f (set)75 1887 y(to)i Fh(MPI)p 211 1887 13 2 v 14 w(REQUEST)p 413 1887 V 14 w(NULL)p Fu(.)h(\(The)g(arra)o(y)e(is)j(indexed)g(from)e (zero)h(in)g(C,)f(and)h(from)f(one)h(in)h(F)l(ortran.\))75 1944 y(In)j(the)g(latter)f(case)h(\(no)f(op)q(eration)h(completed\),)i (it)e(returns)f Fq(\015ag)h(=)f(false)p Fu(,)j(returns)d(a)h(v)m(alue)g (of)75 2000 y Fh(MPI)p 152 2000 V 14 w(UNDEFINED)15 b Fu(in)h Fq(index)g Fu(and)f Fq(status)i Fu(is)f(unde\014ned.)893 b Fi(>)166 2057 y Fu(The)14 b(arra)o(y)e(ma)o(y)h(con)o(tain)g(n)o(ull) i(or)e(inactiv)o(e)h(handles.)21 b(If)14 b(the)f(arra)o(y)f(con)o (tains)i(no)f(activ)o(e)h(handles)75 2113 y(then)i(the)h(call)g (returns)f(immediately)i(with)e Fq(\015ag)g(=)h(true)p Fu(,)f Fq(index)i Fu(=)e Fh(MPI)p 1350 2113 V 14 w(UNDEFINED)p Fu(,)f(and)h(a)g(empt)o(y)75 2170 y Fq(status)p Fu(.)166 2226 y(If)10 b(the)h(arra)o(y)d(of)i(requests)g(con)o(tain)h(activ)o(e) f(handles)h(then)g(the)f(execution)h(of)f Fq(MPI)p 1554 2226 14 2 v 16 w(TEST)l(ANY\(count,)32 b Fi(?)75 2283 y Fq(a)o(rra)o(y)p 173 2283 V 15 w(of)p 225 2283 V 16 w(requests,)23 b(index,)g(status\))g Fu(has)d(the)h(same)g(e\013ect)f (as)h(the)g(execution)g(of)g Fq(MPI)p 1624 2283 V 16 w(TEST\()f(&a)o(r-)75 2339 y(ra)o(y)p 136 2339 V 15 w(of)p 188 2339 V 16 w(requests[i],)d(\015ag,)d(status\))p Fu(,)j(for)d Fq(i=0,)g(1)g(,...,)f(count-1)p Fu(,)j(in)f(some)g(arbitrary)f(order,)g (un)o(til)i(one)f(call)75 2395 y(returns)h Fq(\015ag)g(=)g(true)p Fu(,)g(or)g(all)g(fail.)23 b(In)17 b(the)f(former)f(case,)h Fq(index)h Fu(is)f(set)g(to)f(the)h(last)g(v)m(alue)h(of)e Fq(i)p Fu(,)h(and)g(in)75 2452 y(the)i(latter)f(case,)h(it)f(is)i(set)e (to)g Fh(MPI)p 698 2452 13 2 v 14 w(UNDEFINED)p Fu(.)f Fq(MPI)p 1057 2452 14 2 v 16 w(TEST)l(ANY)j Fu(with)f(an)f(arra)o(y)g (con)o(taining)h(one)75 2508 y(activ)o(e)d(en)o(try)g(is)h(equiv)m (alen)o(t)h(to)d Fq(MPI)p 727 2508 V 16 w(TEST)p Fu(.)1070 b Fi(>)189 2615 y Fj(R)n(ationale.)61 b Fu(The)19 b(function)h Fq(MPI)p 816 2615 V 16 w(TEST)l(ANY)g Fu(returns)e(with)h Fq(\015ag)g(=)g(true)g Fu(exactly)h(in)f(those)189 2671 y(situations)e(where)h(the)g(function)g Fq(MPI)p 878 2671 V 16 w(W)l(AIT)l(ANY)g Fu(returns;)g(b)q(oth)g(functions)g(return) f(in)i(suc)o(h)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 32 34 32 33 bop 75 -100 a Fu(32)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)189 45 y Fu(case)f(the)h(same)g (v)m(alues)g(in)h(the)f(remaining)h(parameters.)23 b(Th)o(us,)17 b(a)f(blo)q(c)o(king)i Fq(MPI)p 1660 45 14 2 v 16 w(W)l(AIT)l(ANY)189 102 y Fu(can)e(b)q(e)g(easily)h(replaced)g(b)o(y)e(a)h(non)o(blo)q(c)o (king)h Fq(MPI)p 1081 102 V 16 w(TEST)l(ANY)p Fu(.)f(The)g(same)g (relation)g(holds)h(for)189 158 y(the)d(other)g(pairs)h(of)f(W)l(ait)h (and)f(T)l(est)g(functions)i(de\014ned)g(in)f(this)g(section.)20 b(\()p Fj(End)15 b(of)h(r)n(ationale.)p Fu(\))-160 219 y Fi(?)75 359 y Fq(MPI)p 160 359 V 16 w(W)l(AIT)l(ALL\()e(count,)i(a)o (rra)o(y)p 626 359 V 15 w(of)p 678 359 V 16 w(requests,)h(a)o(rra)o(y)p 971 359 V 15 w(of)p 1023 359 V 15 w(statuses\))117 436 y Fk(IN)155 b Fq(count)482 b Fk(lists)14 b(length)g(\(in)o(teger\))117 511 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 511 V 15 w(of)p 468 511 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o (y)e(of)f(handles\))117 586 y(OUT)108 b Fq(a)o(rra)o(y)p 416 586 V 15 w(of)p 468 586 V 16 w(statuses)276 b Fk(arra)o(y)14 b(of)f(status)i(ob)r(jects)g(\(arra)o(y)f(of)f(Status\))75 711 y Fo(int)23 b(MPI)p 245 711 15 2 v 17 w(Waitall\(int)g(count,)g (MPI)p 788 711 V 16 w(Request)g(*array)p 1139 711 V 17 w(of)p 1204 711 V 17 w(requests,)393 767 y(MPI)p 468 767 V 17 w(Status)g(*array)p 796 767 V 16 w(of)p 860 767 V 17 w(statuses\))75 854 y(MPI)p 150 854 V 17 w(WAITALL\(COUNT,)f (ARRAY)p 645 854 V 16 w(OF)p 709 854 V 17 w(REQUESTS,)h(ARRAY)p 1085 854 V 16 w(OF)p 1149 854 V 17 w(STATUSES,)g(IERROR\))170 910 y(INTEGER)g(COUNT,)g(ARRAY)p 651 910 V 17 w(OF)p 716 910 V 17 w(REQUESTS\(*\))170 967 y(INTEGER)g(ARRAY)p 484 967 V 17 w(OF)p 549 967 V 17 w(STATUSES\(MPI)p 854 967 V 15 w(STATUS)p 1013 967 V 17 w(SIZE,*\),)f(IERROR)166 1053 y Fu(Blo)q(c)o(ks)e(un)o(til)h(all)f(comm)o(unication)g(op)q (erations)g(asso)q(ciated)g(with)g(activ)o(e)f(handles)i(in)g(the)e (list)75 1109 y(complete,)j(and)e(return)g(the)g(status)f(of)g(all)i (these)f(op)q(erations)g(\(this)h(includes)h(the)e(case)g(where)g(no)75 1166 y(handle)e(in)g(the)f(list)h(is)f(activ)o(e\).)25 b(Both)17 b(arra)o(ys)e(ha)o(v)o(e)i(the)g(same)f(n)o(um)o(b)q(er)h(of) g(v)m(alid)i(en)o(tries.)25 b(The)17 b Fq(i)p Fu(-th)75 1222 y(en)o(try)12 b(in)h Fq(a)o(rra)o(y)p 339 1222 14 2 v 15 w(of)p 391 1222 V 16 w(statuses)i Fu(is)e(set)f(to)g(the)g (return)h(status)e(of)h(the)h Fq(i)p Fu(-th)f(op)q(eration.)19 b(Requests)13 b(that)f(w)o(ere)75 1279 y(created)18 b(b)o(y)h(non)o (blo)q(c)o(king)g(comm)o(unication)h(op)q(erations)e(are)g(deallo)q (cated)i(and)f(the)f(corresp)q(onding)75 1335 y(handles)h(in)f(the)g (arra)o(y)e(are)i(set)f(to)g Fh(MPI)p 786 1335 13 2 v 14 w(REQUEST)p 988 1335 V 14 w(NULL)p Fu(.)h(The)g(list)g(ma)o(y)f(con) o(tain)h(n)o(ull)h(or)e(inactiv)o(e)-2034 b Fi(>)75 1392 y Fu(handles.)21 b(The)16 b(call)g(sets)f(to)f(empt)o(y)h(the)g(status) g(of)g(eac)o(h)g(suc)o(h)g(en)o(try)l(.)166 1448 y(The)10 b(error-free)g(execution)h(of)f Fq(MPI)p 778 1448 14 2 v 16 w(W)l(AIT)l(ALL\(count,)i(a)o(rra)o(y)p 1226 1448 V 14 w(of)p 1277 1448 V 16 w(requests,)h(a)o(rra)o(y)p 1566 1448 V 15 w(of)p 1618 1448 V 16 w(statuses\))f Fu(has)75 1505 y(the)201 b(same)f(e\013ect)h(as)g(the)f(execution)i(of)75 1561 y Fq(MPI)p 160 1561 V 16 w(W)l(AIT\(&a)o(rra)o(y)p 436 1561 V 15 w(of)p 488 1561 V 15 w(request[i],)16 b(&a)o(rra)o(y)p 833 1561 V 15 w(of)p 885 1561 V 16 w(statuses[i]\))p Fu(,)h(for)d Fq(i=0)g(,...,)e(count-1)p Fu(,)j(in)h(some)e(arbitrary)75 1618 y(order.)20 b Fq(MPI)p 297 1618 V 15 w(W)l(AIT)l(ALL)15 b Fu(with)h(an)f(arra)o(y)f(of)h(length)h(one)f(is)h(equiv)m(alen)o(t)h (to)d Fq(MPI)p 1475 1618 V 16 w(W)l(AIT)p Fu(.)166 1674 y(When)d(one)g(or)f(more)h(of)f(the)h(comm)o(unications)g(completed)h (b)o(y)f(a)f(call)i(to)e Fq(MPI)p 1505 1674 V 16 w(W)l(AIT)l(ALL)g Fu(fail,)i(it)f(is)75 1730 y(desireable)h(to)d(return)i(sp)q(eci\014c)h (information)e(on)g(eac)o(h)g(comm)o(unication.)19 b(The)10 b(function)h Fq(MPI)p 1693 1730 V 16 w(W)l(AIT)l(ALL)75 1787 y Fu(will)j(return)e(in)h(suc)o(h)f(case)g(the)h(error)e(co)q(de)i Fh(MPI)p 899 1787 13 2 v 14 w(ERR)p 992 1787 V 14 w(IN)p 1047 1787 V 15 w(ST)m(A)m(TUS)e Fu(and)i(will)g(set)f(the)g(error)g (\014eld)h(of)f(eac)o(h)75 1843 y(status)f(to)g(a)g(sp)q(eci\014c)i (error)e(co)q(de.)19 b(This)13 b(co)q(de)f(will)h(b)q(e)f Fh(MPI)p 1094 1843 V 14 w(SUCCESS)p Fu(,)e(if)i(the)g(sp)q(eci\014c)h (comm)o(unication)75 1900 y(completed;)j(it)f(will)i(b)q(e)f(another)e (sp)q(eci\014c)j(error)e(co)q(de,)g(if)h(it)f(failed;)h(or)f(it)g(can)h (b)q(e)f Fh(MPI)p 1596 1900 V 15 w(PENDING)f Fu(if)i(it)75 1956 y(has)g(not)g(failed,)h(nor)e(completed.)24 b(The)16 b(function)h Fq(MPI)p 1052 1956 14 2 v 16 w(W)l(AIT)l(ALL)e Fu(will)j(return)e Fq(MPI)p 1581 1956 V 16 w(SUCCESS)h Fu(if)g(it)75 2013 y(completed)f(successfully)l(,)i(or)d(will)i(return) e(another)h(error)e(co)q(de)i(if)g(it)g(failed)h(for)e(other)g(reasons) g(\(suc)o(h)75 2069 y(as)g(in)o(v)m(alid)i(argumen)o(ts\).)i(In)d(suc)o (h)f(cases,)g(it)h(will)g(not)f(up)q(date)h(the)f(error)g(\014elds)h (of)f(the)g(statuses.)189 2175 y Fj(R)n(ationale.)37 b Fu(This)13 b(design)f(streamlines)h(error)e(handling)i(in)f(the)g (application.)20 b(The)12 b(application)189 2232 y(co)q(de)f(need)h (only)g(test)e(the)h(\(single\))h(function)g(result)f(to)f(determine)i (if)g(an)f(error)f(has)h(o)q(ccurred.)19 b(It)189 2288 y(need)14 b(to)g(c)o(hec)o(k)g(eac)o(h)g(individual)j(status)c(only)h (when)g(an)g(error)f(o)q(ccurred.)20 b(\()p Fj(End)15 b(of)g(r)n(ationale.)p Fu(\))-160 2350 y Fi(?)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 33 35 33 34 bop 75 -100 a Fm(1.7.)34 b(NONBLOCKING)17 b(COMMUNICA)l(TION)863 b Fu(33)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(TEST)l(ALL\(count,)16 b(a)o(rra)o(y)p 613 45 V 14 w(of)p 664 45 V 16 w(requests,)h(\015ag,)e (a)o(rra)o(y)p 1054 45 V 14 w(of)p 1105 45 V 16 w(statuses\))117 122 y Fk(IN)155 b Fq(count)482 b Fk(lists)14 b(length)g(\(in)o(teger\)) 117 196 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 196 V 15 w(of)p 468 196 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o (y)e(of)f(handles\))117 270 y(OUT)108 b Fq(\015ag)518 b Fk(\(logical\))117 344 y(OUT)108 b Fq(a)o(rra)o(y)p 416 344 V 15 w(of)p 468 344 V 16 w(statuses)276 b Fk(arra)o(y)14 b(of)f(status)i(ob)r(jects)g(\(arra)o(y)f(of)f(Status\))75 468 y Fo(int)23 b(MPI)p 245 468 15 2 v 17 w(Testall\(int)g(count,)g (MPI)p 788 468 V 16 w(Request)g(*array)p 1139 468 V 17 w(of)p 1204 468 V 17 w(requests,)f(int)i(*flag,)393 525 y(MPI)p 468 525 V 17 w(Status)f(*array)p 796 525 V 16 w(of)p 860 525 V 17 w(statuses\))75 611 y(MPI)p 150 611 V 17 w(TESTALL\(COUNT,)f(ARRAY)p 645 611 V 16 w(OF)p 709 611 V 17 w(REQUESTS,)h(FLAG,)g(ARRAY)p 1228 611 V 16 w(OF)p 1292 611 V 17 w(STATUSES,)g(IERROR\))170 667 y(LOGICAL)g(FLAG)170 724 y(INTEGER)g(COUNT,)g(ARRAY)p 651 724 V 17 w(OF)p 716 724 V 17 w(REQUESTS\(*\),)170 780 y(ARRAY)p 293 780 V 17 w(OF)p 358 780 V 17 w(STATUSES\(MPI)p 663 780 V 15 w(STATUS)p 822 780 V 17 w(SIZE,*\),)g(IERROR)166 867 y Fu(Returns)17 b Fq(\015ag)g(=)g(true)g Fu(if)h(all)f(comm)o (unications)h(asso)q(ciated)f(with)g(activ)o(e)g(handles)h(in)f(the)g (arra)o(y)75 923 y(ha)o(v)o(e)f(completed)i(\(this)e(includes)j(the)d (case)h(where)g(no)f(handle)i(in)f(the)g(list)g(is)g(activ)o(e\).)23 b(In)17 b(this)g(case,)75 980 y(eac)o(h)h(status)f(en)o(try)g(that)g (corresp)q(onds)i(to)e(an)h(activ)o(e)f(handle)j(request)d(is)i(set)e (to)h(the)f(status)g(of)h(the)75 1036 y(corresp)q(onding)12 b(comm)o(unication;)i(if)e(the)f(request)h(w)o(as)e(allo)q(cated)j(b)o (y)e(a)g(non)o(blo)q(c)o(king)i(comm)o(unication)75 1093 y(call)k(then)g(it)f(is)h(deallo)q(cated,)g(and)f(the)g(handle)i(is)e (set)g(to)g Fh(MPI)p 1177 1093 13 2 v 14 w(REQUEST)p 1379 1093 V 14 w(NULL)p Fu(.)g(Eac)o(h)g(status)f(en)o(try)62 b Fi(>)75 1149 y Fu(that)14 b(corresp)q(onds)i(to)f(a)f(n)o(ull)j(or)e (inactiv)o(e)h(handle)g(is)g(set)f(to)g(empt)o(y)l(.)654 b Fi(?)166 1206 y Fu(Otherwise,)16 b Fq(\015ag)f(=)g(false)h Fu(is)f(returned,)h(no)f(request)g(is)h(mo)q(di\014ed)h(and)e(the)g(v)m (alues)i(of)d(the)i(status)75 1262 y(en)o(tries)g(are)e(unde\014ned.)22 b(This)16 b(is)g(a)f(lo)q(cal)h(op)q(eration.)920 b Fi(>)166 1318 y Fu(Errors)15 b(that)h(o)q(ccurrred)h(during)h(the)e(execution)i (of)e Fq(MPI)p 1180 1318 14 2 v 16 w(TEST)l(ALL)g Fu(are)g(handled)i (as)e(errors)g(in)75 1375 y Fq(MPI)p 160 1375 V 16 w(W)l(AIT)l(ALL)p Fu(.)1562 b Fi(?)75 1526 y Fq(MPI)p 160 1526 V 16 w(W)l (AITSOME\(incount,)16 b(a)o(rra)o(y)p 695 1526 V 15 w(of)p 747 1526 V 16 w(requests,)h(outcount,)f(a)o(rra)o(y)p 1236 1526 V 15 w(of)p 1288 1526 V 16 w(indices,)g(a)o(rra)o(y)p 1553 1526 V 14 w(of)p 1604 1526 V 16 w(statuses\))117 1603 y Fk(IN)155 b Fq(incount)448 b Fk(length)14 b(of)f(arra)o(y)p 1176 1603 13 2 v 15 w(of)p 1225 1603 V 14 w(requests)j(\(in)o(teger\)) 117 1677 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 1677 14 2 v 15 w(of)p 468 1677 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o(y)e(of)f(handles\))117 1751 y(OUT)108 b Fq(outcount)420 b Fk(n)o(um)o(b)q(er)13 b(of)h(completed)f (requests)j(\(in)o(teger\))117 1824 y(OUT)108 b Fq(a)o(rra)o(y)p 416 1824 V 15 w(of)p 468 1824 V 16 w(indices)299 b Fk(arra)o(y)12 b(of)f(indices)h(of)f(op)q(erations)g(that)h(completed)f(\(arra)o(y)h (of)905 1881 y(in)o(tegers\))117 1955 y(OUT)108 b Fq(a)o(rra)o(y)p 416 1955 V 15 w(of)p 468 1955 V 16 w(statuses)276 b Fk(arra)o(y)15 b(of)g(status)h(ob)r(jects)g(for)f(op)q(erations)g(that)h(completed)905 2011 y(\(arra)o(y)e(of)f(Status\))75 2135 y Fo(int)23 b(MPI)p 245 2135 15 2 v 17 w(Waitsome\(int)f(incount,)h(MPI)p 859 2135 V 17 w(Request)g(*array)p 1211 2135 V 16 w(of)p 1275 2135 V 17 w(requests,)g(int)g(*outcount,)393 2192 y(int)h(*array)p 636 2192 V 16 w(of)p 700 2192 V 17 w(indices,)f(MPI)p 1004 2192 V 16 w(Status)g(*array)p 1331 2192 V 17 w(of)p 1396 2192 V 17 w(statuses\))75 2278 y(MPI)p 150 2278 V 17 w(WAITSOME\(INCOUNT,)e(ARRAY)p 716 2278 V 17 w(OF)p 781 2278 V 17 w(REQUESTS,)h(OUTCOUNT,)h(ARRAY)p 1395 2278 V 16 w(OF)p 1459 2278 V 17 w(INDICES,)393 2335 y(ARRAY)p 516 2335 V 17 w(OF)p 581 2335 V 17 w(STATUSES,)f(IERROR\))170 2391 y(INTEGER)h(INCOUNT,)g(ARRAY)p 699 2391 V 17 w(OF)p 764 2391 V 17 w(REQUESTS\(*\),)f(OUTCOUNT,)g(ARRAY)p 1449 2391 V 17 w(OF)p 1514 2391 V 17 w(INDICES\(*\),)170 2448 y(ARRAY)p 293 2448 V 17 w(OF)p 358 2448 V 17 w(STATUSES\(MPI)p 663 2448 V 15 w(STATUS)p 822 2448 V 17 w(SIZE,*\),)h(IERROR)166 2534 y Fu(W)l(aits)d(un)o(til)h(at)e(least)i(one)f(of)g(the)g(op)q (erations)g(asso)q(ciated)g(with)h(activ)o(e)f(handles)h(in)g(the)f (list)75 2591 y(ha)o(v)o(e)15 b(completed.)21 b(Returns)15 b(in)i Fq(outcount)g Fu(the)e(n)o(um)o(b)q(er)h(of)e(requests)h(from)g (the)g(list)h Fq(a)o(rra)o(y)p 1656 2591 14 2 v 15 w(of)p 1708 2591 V 16 w(requests)75 2647 y Fu(that)c(ha)o(v)o(e)h(completed.) 20 b(Returns)13 b(in)h(the)f(\014rst)g Fq(outcount)i Fu(lo)q(cations)f(of)e(the)h(arra)o(y)f Fq(a)o(rra)o(y)p 1608 2647 V 14 w(of)p 1659 2647 V 16 w(indices)j Fu(the)75 2704 y(indices)21 b(of)d(these)h(op)q(erations)f(\(index)i(within)g (the)e(arra)o(y)g Fq(a)o(rra)o(y)p 1218 2704 V 14 w(of)p 1269 2704 V 16 w(requests)p Fu(;)k(the)d(arra)o(y)e(is)i(indexed)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 34 36 34 35 bop 75 -100 a Fu(34)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(from)12 b(zero)g(in)i(C)e(and)h(from)e(one)i(in)g(F)l(ortran\).)18 b(Returns)13 b(in)g(the)g(\014rst)f Fq(outcount)i Fu(lo)q(cations)g(of) e(the)g(arra)o(y)75 102 y Fq(a)o(rra)o(y)p 173 102 14 2 v 15 w(of)p 225 102 V 16 w(status)18 b Fu(the)g(status)e(for)g(these) h(completed)h(op)q(erations.)26 b(If)17 b(a)g(request)g(that)f (completed)i(w)o(as)75 158 y(allo)q(cated)g(b)o(y)g(a)f(non)o(blo)q(c)o (king)h(comm)o(unication)g(call,)h(then)f(it)f(is)h(deallo)q(cated,)h (and)e(the)h(asso)q(ciated)75 214 y(handle)e(is)g(set)f(to)g Fh(MPI)p 471 214 13 2 v 14 w(REQUEST)p 673 214 V 14 w(NULL)p Fu(.)-960 b Fi(>)166 271 y Fu(If)16 b(the)g(list)g(con)o(tains)g(no)f (activ)o(e)h(handles,)h(then)f(the)f(call)i(returns)f(immediately)h (with)f Fq(outcount)75 327 y(=)g(MPI)p 211 327 14 2 v 15 w(UNDEFINED)p Fu(.)166 384 y(If)f(one)h(or)e(more)h(of)g(the)g(comm) o(unications)h(completed)g(b)o(y)f Fq(MPI)p 1294 384 V 16 w(TEST)l(ALL)g Fu(fail)h(then)g(the)f(argu-)75 440 y(men)o(ts)d Fq(outcount)p Fu(,)j Fq(a)o(rra)o(y)p 498 440 V 14 w(of)p 549 440 V 16 w(indices)f Fu(and)f Fq(a)o(rra)o(y)p 885 440 V 15 w(of)p 937 440 V 16 w(statuses)i Fu(will)f(b)q(e)f (adjusted)g(to)f(indicate)i(completion)75 497 y(of)19 b(all)g(comm)o(unications)h(that)e(ha)o(v)o(e)h(succeeded)h(or)f (failed.)32 b(The)19 b(call)i(will)f(return)f(the)g(error)f(co)q(de)75 553 y Fh(MPI)p 152 553 13 2 v 14 w(ERR)p 245 553 V 15 w(IN)p 301 553 V 15 w(ST)m(A)m(TUS)d Fu(and)i(the)g(error)f(\014eld)h (of)g(eac)o(h)f(status)g(returned)h(will)i(b)q(e)e(set)f(to)g(indicate) i(suc-)75 610 y(cess)f(or)f(to)g(indicate)i(the)e(sp)q(eci\014c)i (error)e(that)g(o)q(ccurred.)24 b(The)17 b(call)h(will)g(return)e Fh(MPI)p 1597 610 V 15 w(SUCCESS)f Fu(if)i(it)75 666 y(succeeded,)h(and)e(will)i(return)e(another)g(error)g(co)q(de)h(if)f (it)h(failed)g(for)f(other)g(reasons)g(\(suc)o(h)g(as)g(in)o(v)m(alid) 75 723 y(argumen)o(ts\).)j(In)d(suc)o(h)f(cases,)g(it)g(will)i(not)e (up)q(date)h(the)f(error)f(\014elds)j(of)e(the)g(statuses.)-1750 b Fi(?)75 874 y Fq(MPI)p 160 874 14 2 v 16 w(TESTSOME\(incount,)17 b(a)o(rra)o(y)p 697 874 V 14 w(of)p 748 874 V 16 w(requests,)g (outcount,)f(a)o(rra)o(y)p 1237 874 V 15 w(of)p 1289 874 V 16 w(indices,)g(a)o(rra)o(y)p 1554 874 V 14 w(of)p 1605 874 V 16 w(statuses\))117 951 y Fk(IN)155 b Fq(incount)448 b Fk(length)14 b(of)f(arra)o(y)p 1176 951 13 2 v 15 w(of)p 1225 951 V 14 w(requests)j(\(in)o(teger\))117 1026 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 1026 14 2 v 15 w(of)p 468 1026 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra)o(y)e(of) f(handles\))117 1101 y(OUT)108 b Fq(outcount)420 b Fk(n)o(um)o(b)q(er) 13 b(of)h(completed)f(requests)j(\(in)o(teger\))117 1176 y(OUT)108 b Fq(a)o(rra)o(y)p 416 1176 V 15 w(of)p 468 1176 V 16 w(indices)299 b Fk(arra)o(y)12 b(of)f(indices)h(of)f(op)q (erations)g(that)h(completed)f(\(arra)o(y)h(of)905 1233 y(in)o(tegers\))117 1308 y(OUT)108 b Fq(a)o(rra)o(y)p 416 1308 V 15 w(of)p 468 1308 V 16 w(statuses)276 b Fk(arra)o(y)15 b(of)g(status)h(ob)r(jects)g(for)f(op)q(erations)g(that)h(completed)905 1364 y(\(arra)o(y)e(of)f(Status\))75 1489 y Fo(int)23 b(MPI)p 245 1489 15 2 v 17 w(Testsome\(int)f(incount,)h(MPI)p 859 1489 V 17 w(Request)g(*array)p 1211 1489 V 16 w(of)p 1275 1489 V 17 w(requests,)g(int)g(*outcount,)393 1545 y(int)h(*array)p 636 1545 V 16 w(of)p 700 1545 V 17 w(indices,)f(MPI)p 1004 1545 V 16 w(Status)g(*array)p 1331 1545 V 17 w(of)p 1396 1545 V 17 w(statuses\))75 1632 y(MPI)p 150 1632 V 17 w(TESTSOME\(INCOUNT,)e(ARRAY)p 716 1632 V 17 w(OF)p 781 1632 V 17 w(REQUESTS,)h(OUTCOUNT,)h(ARRAY)p 1395 1632 V 16 w(OF)p 1459 1632 V 17 w(INDICES,)393 1688 y(ARRAY)p 516 1688 V 17 w(OF)p 581 1688 V 17 w(STATUSES,)f(IERROR\))170 1744 y(INTEGER)h(INCOUNT,)g(ARRAY)p 699 1744 V 17 w(OF)p 764 1744 V 17 w(REQUESTS\(*\),)f(OUTCOUNT,)g(ARRAY)p 1449 1744 V 17 w(OF)p 1514 1744 V 17 w(INDICES\(*\),)170 1801 y(ARRAY)p 293 1801 V 17 w(OF)p 358 1801 V 17 w(STATUSES\(MPI)p 663 1801 V 15 w(STATUS)p 822 1801 V 17 w(SIZE,*\),)h(IERROR)166 1887 y Fu(Beha)o(v)o(es)14 b(lik)o(e)i Fq(MPI)p 508 1887 14 2 v 16 w(W)l(AITSOME)p Fu(,)e(except)h(that)f(it)h(returns)f (immediately)l(.)21 b(If)15 b(no)f(op)q(eration)h(has)75 1944 y(completed)f(it)f(returns)g Fq(outcount)i(=)e(0)p Fu(.)19 b(If)13 b(there)g(is)g(no)g(activ)o(e)g(handle)i(in)e(the)g (list)h(it)f(returns)g Fq(outcount)-2033 b Fi(>)75 2000 y Fq(=)16 b(MPI)p 211 2000 V 15 w(UNDEFINED)p Fu(.)-650 b Fi(?)166 2057 y Fq(MPI)p 251 2057 V 16 w(TESTSOME)15 b Fu(is)h(a)e(lo)q(cal)i(op)q(eration,)f(whic)o(h)g(returns)g (immediately)l(,)h(whereas)f Fq(MPI)p 1734 2057 V 16 w(W)l(AIT-)75 2113 y(SOME)i Fu(will)h(blo)q(c)o(k)f(un)o(til)h(a)e (comm)o(unication)h(completes,)g(if)g(it)g(w)o(as)e(passed)i(a)f(list)h (that)f(con)o(tains)h(at)75 2170 y(least)h(one)g(activ)o(e)g(handle.)29 b(Both)18 b(calls)h(ful\014l)h(a)d Fq(fairness)i Fu(requiremen)o(t:)26 b(If)18 b(a)f(request)h(for)f(a)h(receiv)o(e)75 2226 y(rep)q(eatedly)c(app)q(ears)e(in)i(a)e(list)h(of)g(requests)f(passed)h (to)f Fq(MPI)p 1122 2226 V 16 w(W)l(AITSOME)h Fu(or)f Fq(MPI)p 1524 2226 V 16 w(TESTSOME)p Fu(,)h(and)75 2283 y(a)i(matc)o(hing)g(send)h(has)f(b)q(een)i(p)q(osted,)e(then)h(the)f (receiv)o(e)h(will)h(ev)o(en)o(tually)f(succeed,)h(unless)f(the)f(send) 75 2339 y(is)h(satis\014ed)f(b)o(y)h(another)e(receiv)o(e;)i(and)g (similarly)g(for)f(send)h(requests.)-1469 b Fi(>)166 2395 y Fu(Errors)29 b(that)g(o)q(ccur)h(during)g(the)g(execution)h(of)e Fq(MPI)p 1191 2395 V 16 w(TESTSOME)i Fu(are)e(handled)i(as)f(for)75 2452 y Fq(W)l(AIT)p 191 2452 V 16 w(SOME)p Fu(.)-502 b Fi(?)189 2558 y Fj(A)n(dvic)n(e)11 b(to)i(users.)37 b Fu(The)12 b(use)f(of)g Fq(MPI)p 831 2558 V 16 w(TESTSOME)h Fu(is)f(lik)o(ely)i(to)e(b)q(e)h(more)e(e\016cien)o(t)i(than)f(the)h (use)189 2615 y(of)h Fq(MPI)p 324 2615 V 16 w(TEST)l(ANY)p Fu(.)i(The)f(former)f(returns)g(information)h(on)g(all)h(completed)g (comm)o(unications,)189 2671 y(with)g(the)g(latter,)g(a)g(new)g(call)i (is)e(required)i(for)d(eac)o(h)h(comm)o(unication)h(that)f(completes.) 1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 35 37 35 36 bop 75 -100 a Fm(1.7.)29 b(NONBLOCKING)17 b(COMMUNICA)l(TION)868 b Fu(35)189 45 y(A)24 b(serv)o(er)g(with)g(m)o(ultiple)i(clien)o(ts)g (can)e(use)h Fq(MPI)p 1102 45 14 2 v 15 w(W)l(AITSOME)g Fu(so)f(as)g(not)g(to)f(starv)o(e)g(an)o(y)189 102 y(clien)o(t.)35 b(Clien)o(ts)20 b(send)h(messages)e(to)g(the)h(serv)o(er)g(with)g (service)h(requests.)33 b(The)20 b(serv)o(er)g(calls)189 158 y Fq(MPI)p 274 158 V 15 w(W)l(AITSOME)h Fu(with)g(one)f(receiv)o(e) h(request)f(for)g(eac)o(h)g(clien)o(t,)i(and)f(then)f(handles)i(all)f (re-)189 214 y(ceiv)o(es)g(that)e(completed.)35 b(If)20 b(a)g(call)h(to)f Fq(MPI)p 1002 214 V 16 w(W)l(AIT)l(ANY)h Fu(is)f(used)h(instead,)g(then)g(one)f(clien)o(t)189 271 y(could)d(starv)o(e)e(while)j(requests)e(from)g(another)g(clien)o (t)h(alw)o(a)o(ys)f(sneak)g(in)h(\014rst.)23 b(\()p Fj(End)17 b(of)g(advic)n(e)189 327 y(to)f(users.)p Fu(\))189 434 y Fj(A)n(dvic)n(e)h(to)h(implementors.)52 b Fq(MPI)p 810 434 V 16 w(TESTSOME)18 b Fu(should)g(complete)g(as)f(man)o(y)g(p)q (ending)i(com-)189 490 y(m)o(unications)d(as)e(p)q(ossible.)22 b(\()p Fj(End)16 b(of)g(advic)n(e)g(to)h(implementors.)p Fu(\))75 596 y Fp(Example)h(1.15)23 b Fu(Clien)o(t-serv)o(er)15 b(co)q(de)h(\(starv)m(ation)f(can)g(o)q(ccur\).)75 747 y Fo(CALL)23 b(MPI_COMM_SIZE\(comm,)f(size,)h(ierr\))75 803 y(CALL)g(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 860 y(IF\(rank)g(>)h(0\))f(THEN)214 b(!)24 b(client)f(code)170 916 y(DO)h(WHILE\(.TRUE.\))242 972 y(CALL)f(MPI_ISEND\(a,)g(n,)g (MPI_REAL,)g(0,)g(tag,)h(comm,)f(request,)g(ierr\))242 1029 y(CALL)g(MPI_WAIT\(request,)f(status,)h(ierr\))170 1085 y(END)h(DO)75 1142 y(ELSE)214 b(!)24 b(rank=0)f(--)h(server)f (code)242 1198 y(DO)h(i=1,)f(size-1)314 1255 y(CALL)g (MPI_IRECV\(a\(1,i\),)e(n,)j(MPI_REAL,)f(i)g(tag,)528 1311 y(comm,)h(request_list\(i\),)d(ierr\))242 1368 y(END)i(DO)242 1424 y(DO)h(WHILE\(.TRUE.\))314 1481 y(CALL)f(MPI_WAITANY\(size-1,)e (request_list,)h(index,)h(status,)g(ierr\))314 1537 y(CALL)g (DO_SERVICE\(a\(1,index\)\))45 b(!)23 b(handle)g(one)h(message)314 1593 y(CALL)f(MPI_IRECV\(a\(1,)f(index\),)h(n,)g(MPI_REAL,)g(index,)g (tag,)552 1650 y(comm,)g(request_list\(index\),)f(ierr\))242 1706 y(END)h(DO)75 1763 y(END)g(IF)75 1919 y Fp(Example)18 b(1.16)23 b Fu(Same)15 b(co)q(de,)g(using)h Fq(MPI)p 849 1919 V 16 w(W)l(AITSOME)p Fu(.)75 2069 y Fo(CALL)23 b(MPI_COMM_SIZE\(comm,)f(size,)h(ierr\))75 2126 y(CALL)g (MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))75 2182 y(IF\(rank)g(>)h(0\))f (THEN)214 b(!)24 b(client)f(code)170 2239 y(DO)h(WHILE\(.TRUE.\))242 2295 y(CALL)f(MPI_ISEND\(a,)g(n,)g(MPI_REAL,)g(0,)g(tag,)h(comm,)f (request,)g(ierr\))242 2351 y(CALL)g(MPI_WAIT\(request,)f(status,)h (ierr\))170 2408 y(END)h(DO)75 2464 y(ELSE)214 b(!)24 b(rank=0)f(--)h(server)f(code)170 2521 y(DO)h(i=1,)f(size-1)242 2577 y(CALL)g(MPI_IRECV\(a\(1,i\),)f(n,)h(MPI_REAL,)g(i,)h(tag,)600 2634 y(comm,)f(requests\(i\),)f(ierr\))170 2690 y(END)i(DO)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 36 38 36 37 bop 75 -100 a Fu(36)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)170 45 y Fo(DO)24 b(WHILE\(.TRUE.\))242 102 y(CALL)f(MPI_WAITSOME\(size,)f(request_list,) g(numdone,)648 158 y(indices,)g(statuses,)h(ierr\))242 214 y(DO)h(i=1,)f(numdone)314 271 y(CALL)g(DO_SERVICE\(a\(1,)f (indices\(i\)\)\))314 327 y(CALL)h(MPI_IRECV\(a\(1,)f(indices\(i\)\),)g (n,)i(MPI_REAL,)e(0,)i(tag,)624 384 y(comm,)f (requests\(indices\(i\)\),)e(ierr\))242 440 y(END)i(DO)170 497 y(END)h(DO)75 553 y(END)f(IF)75 696 y Fr(1.8)59 b(Prob)r(e)20 b(and)f(Cancel)75 798 y Fu(The)d Fq(MPI)p 254 798 14 2 v 16 w(PROBE)g Fu(and)g Fq(MPI)p 605 798 V 16 w(IPROBE)g Fu(op)q(erations)g(allo)o(w)g(incoming)h(messages)e(to)g(b)q(e)h(c)o (hec)o(k)o(ed)g(for,)75 854 y(without)g(actually)h(receiving)h(them.)k (The)17 b(user)f(can)g(then)h(decide)g(ho)o(w)f(to)g(receiv)o(e)h (them,)f(based)g(on)75 911 y(the)i(information)f(returned)h(b)o(y)f (the)h(prob)q(e)g(\(basically)l(,)h(the)e(information)h(returned)g(b)o (y)f Fq(status)p Fu(\).)28 b(In)75 967 y(particular,)16 b(the)g(user)g(ma)o(y)f(allo)q(cate)h(memory)f(for)g(the)h(receiv)o(e)h (bu\013er,)e(according)h(to)f(the)h(length)g(of)75 1024 y(the)f(prob)q(ed)h(message.)166 1080 y(The)i Fq(MPI)p 347 1080 V 16 w(CANCEL)g Fu(op)q(eration)g(allo)o(ws)g(p)q(ending)i (comm)o(unications)e(to)g(b)q(e)g(canceled.)30 b(This)18 b(is)75 1137 y(required)i(for)f(clean)o(up.)33 b(P)o(osting)19 b(a)g(send)h(or)f(a)g(receiv)o(e)h(ties)f(up)h(user)f(resources)h (\(send)f(or)g(receiv)o(e)75 1193 y(bu\013ers\),)14 b(and)i(a)f(cancel) h(ma)o(y)f(b)q(e)g(needed)i(to)d(free)i(these)f(resources)g(gracefully) l(.)75 1344 y Fq(MPI)p 160 1344 V 16 w(IPROBE\(source,)h(tag,)f(comm,)d (\015ag,)j(status\))117 1421 y Fk(IN)155 b Fq(source)468 b Fk(source)15 b(rank,)f(or)27 b Fh(MPI)p 1281 1421 13 2 v 15 w(ANY)p 1381 1421 V 14 w(SOURCE)13 b Fk(\(in)o(teger\))117 1496 y(IN)155 b Fq(tag)526 b Fk(tag)14 b(v)n(alue)f(or)28 b Fh(MPI)p 1226 1496 V 14 w(ANY)p 1325 1496 V 15 w(T)m(A)o(G)12 b Fk(\(in)o(teger\))117 1571 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1647 y(OUT)108 b Fq(\015ag)518 b Fk(\(logical\))117 1722 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 1846 y Fo(int)23 b(MPI)p 245 1846 15 2 v 17 w(Iprobe\(int)g(source,)g (int)g(tag,)g(MPI)p 1002 1846 V 17 w(Comm)g(comm,)h(int)f(*flag,)393 1903 y(MPI)p 468 1903 V 17 w(Status)g(*status\))75 1989 y(MPI)p 150 1989 V 17 w(IPROBE\(SOURCE,)f(TAG,)h(COMM,)g(FLAG,)g (STATUS,)g(IERROR\))170 2046 y(LOGICAL)g(FLAG)170 2102 y(INTEGER)g(SOURCE,)g(TAG,)h(COMM,)f(STATUS\(MPI)p 1058 2102 V 16 w(STATUS)p 1218 2102 V 16 w(SIZE\),)g(IERROR)166 2188 y Fq(MPI)p 251 2188 14 2 v 16 w(IPROBE\(source,)18 b(tag,)f(comm,)e(\015ag,)j(status\))g Fu(returns)f Fq(\015ag)g(=)h (true)f Fu(if)h(there)f(is)h(a)e(message)75 2245 y(that)f(can)i(b)q(e)f (receiv)o(ed)h(and)g(that)e(matc)o(hes)h(the)g(pattern)f(sp)q (eci\014ed)k(b)o(y)d(the)g(argumen)o(ts)f Fq(source)p Fu(,)h Fq(tag)p Fu(,)75 2301 y(and)f Fq(comm)p Fu(.)k(The)c(call)i (matc)o(hes)e(the)g(same)g(message)g(that)f(w)o(ould)i(ha)o(v)o(e)f(b)q (een)h(receiv)o(ed)h(b)o(y)e(a)g(call)i(to)75 2358 y Fq(MPI)p 160 2358 V 16 w(RECV\(...,)f(source,)i(tag,)f(comm,)e (status\))j Fu(executed)g(at)e(the)h(same)g(p)q(oin)o(t)g(in)h(the)f (program,)f(and)75 2414 y(returns)c(in)i Fq(status)g Fu(the)f(same)f(v)m(alue)i(that)e(w)o(ould)g(ha)o(v)o(e)h(b)q(een)g (returned)g(b)o(y)g Fq(MPI)p 1467 2414 V 15 w(RECV\(\))p Fu(.)19 b(Otherwise,)75 2471 y(the)c(call)i(returns)e Fq(\015ag)g(=)g(false)p Fu(,)g(and)h(lea)o(v)o(es)f Fq(status)i Fu(unde\014ned.)166 2527 y(If)g Fq(MPI)p 298 2527 V 15 w(IPROBE)h Fu(returns)e Fq(\015ag)h(=)f(true)p Fu(,)h(then)g(the)g(con) o(ten)o(t)f(of)g(the)g(status)g(ob)s(ject)g(can)g(b)q(e)h(sub-)75 2584 y(sequen)o(tly)i(accessed)h(as)e(describ)q(ed)i(in)g(section)f (1.2.5)e(to)h(\014nd)h(the)g(source,)g(tag)f(and)g(length)i(of)e(the)75 2640 y(prob)q(ed)e(message.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 37 39 37 38 bop 75 -100 a Fm(1.8.)29 b(PR)o(OBE)16 b(AND)f(CANCEL)1166 b Fu(37)166 45 y(A)13 b(subsequen)o(t)i(receiv)o(e)f(executed)g(with)g (the)g(same)f(con)o(text,)g(and)g(the)h(source)f(and)h(tag)f(returned) 75 102 y(in)19 b Fq(status)i Fu(b)o(y)e Fq(MPI)p 415 102 14 2 v 15 w(IPROBE)h Fu(will)g(receiv)o(e)g(the)f(message)f(that)g (w)o(as)g(matc)o(hed)g(b)o(y)h(the)f(prob)q(e,)i(if)f(no)75 158 y(other)c(in)o(terv)o(ening)h(receiv)o(e)g(o)q(ccurs)f(after)g(the) g(prob)q(e.)20 b(If)15 b(the)g(receiving)i(pro)q(cess)e(is)h(m)o (ulti-threaded,)75 214 y(it)f(is)h(the)f(user's)g(resp)q(onsibilit)o(y) j(to)d(ensure)g(that)g(the)g(last)g(condition)i(holds.)166 271 y(The)f Fq(source)h Fu(argumen)o(t)e(of)h Fq(MPI)p 738 271 V 16 w(PROBE)h Fu(can)f(b)q(e)h Fh(MPI)p 1140 271 13 2 v 14 w(ANY)p 1239 271 V 15 w(SOURCE)p Fu(,)d(and)i(the)h Fq(tag)f Fu(argumen)o(t)75 327 y(can)g(b)q(e)g Fh(MPI)p 298 327 V 15 w(ANY)p 398 327 V 14 w(T)m(A)o(G)p Fu(,)f(so)g(that)g(one) h(can)g(prob)q(e)g(for)f(messages)h(from)f(an)h(arbitrary)f(source)h (and/or)75 384 y(with)h(an)g(arbitrary)f(tag.)24 b(Ho)o(w)o(ev)o(er,)16 b(a)h(sp)q(eci\014c)h(comm)o(unication)g(con)o(text)e(m)o(ust)g(b)q(e)i (pro)o(vided)g(with)75 440 y(the)d Fq(comm)f Fu(argumen)o(t.)166 497 y(It)i(is)g(not)f(necessary)h(to)f(receiv)o(e)h(a)f(message)h (immediately)h(after)e(it)h(has)f(b)q(een)i(prob)q(ed)f(for,)f(and)75 553 y(the)g(same)g(message)g(ma)o(y)f(b)q(e)i(prob)q(ed)g(for)f(sev)o (eral)g(times)h(b)q(efore)f(it)h(is)f(receiv)o(ed.)75 704 y Fq(MPI)p 160 704 14 2 v 16 w(PROBE\(source,)h(tag,)f(comm,)e (status\))117 781 y Fk(IN)155 b Fq(source)468 b Fk(source)15 b(rank,)f(or)27 b Fh(MPI)p 1281 781 13 2 v 15 w(ANY)p 1381 781 V 14 w(SOURCE)13 b Fk(\(in)o(teger\))117 856 y(IN)155 b Fq(tag)526 b Fk(tag)14 b(v)n(alue,)e(or)28 b Fh(MPI)p 1237 856 V 14 w(ANY)p 1336 856 V 15 w(T)m(A)o(G)13 b Fk(\(in)o(teger\))117 932 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1007 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 1131 y Fo(int)23 b(MPI)p 245 1131 15 2 v 17 w(Probe\(int)g(source,)g (int)g(tag,)h(MPI)p 979 1131 V 16 w(Comm)g(comm,)f(MPI)p 1330 1131 V 17 w(Status)g(*status\))75 1218 y(MPI)p 150 1218 V 17 w(PROBE\(SOURCE,)f(TAG,)h(COMM,)g(STATUS,)g(IERROR\))170 1274 y(INTEGER)g(SOURCE,)g(TAG,)h(COMM,)f(STATUS\(MPI)p 1058 1274 V 16 w(STATUS)p 1218 1274 V 16 w(SIZE\),)g(IERROR)166 1361 y Fq(MPI)p 251 1361 14 2 v 16 w(PROBE)d Fu(b)q(eha)o(v)o(es)f(lik) o(e)h Fq(MPI)p 777 1361 V 16 w(IPROBE)g Fu(except)f(that)f(it)i(is)f(a) g(blo)q(c)o(king)h(call)g(that)e(returns)75 1417 y(only)e(after)e(a)h (matc)o(hing)g(message)g(has)g(b)q(een)h(found.)166 1473 y(The)11 b Fq(MPI)f Fu(implemen)o(tation)i(of)e Fq(MPI)p 799 1473 V 16 w(PROBE)i Fu(and)e Fq(MPI)p 1140 1473 V 16 w(IPROBE)i Fu(needs)f(to)f(guaran)o(tee)g(progress:)75 1530 y(if)17 b(a)g(call)h(to)e Fq(MPI)p 385 1530 V 16 w(PROBE)i Fu(has)f(b)q(een)h(issued)g(b)o(y)f(a)f(pro)q(cess,)i(and)f (a)f(send)i(that)e(matc)o(hes)h(the)f(prob)q(e)75 1586 y(has)j(b)q(een)i(initiated)g(b)o(y)f(some)f(pro)q(cess,)i(then)f(the)f (call)i(to)e Fq(MPI)p 1244 1586 V 16 w(PROBE)i Fu(will)g(return,)f (unless)h(the)75 1643 y(message)c(is)i(receiv)o(ed)g(b)o(y)f(another)f (concurren)o(t)h(receiv)o(e)h(op)q(eration)f(\(that)e(is)j(executed)g (b)o(y)e(another)75 1699 y(thread)e(at)g(the)h(probing)g(pro)q(cess\).) 21 b(Similarly)l(,)d(if)e(a)f(pro)q(cess)h(busy)g(w)o(aits)f(with)h Fq(MPI)p 1573 1699 V 16 w(IPROBE)g Fu(and)g(a)75 1756 y(matc)o(hing)e(message)g(has)g(b)q(een)h(issued,)g(then)f(the)g(call)h (to)f Fq(MPI)p 1179 1756 V 16 w(IPROBE)g Fu(will)i(ev)o(en)o(tually)f (return)f Fq(\015ag)75 1812 y(=)i(true)f Fu(unless)i(the)e(message)g (is)g(receiv)o(ed)i(b)o(y)e(another)g(concurren)o(t)g(receiv)o(e)h(op)q (eration.)75 1918 y Fp(Example)i(1.17)23 b Fu(Use)15 b(blo)q(c)o(king)h(prob)q(e)g(to)f(w)o(ait)f(for)h(an)g(incoming)i (message.)242 2025 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h (ierr\))242 2081 y(IF)h(\(rank.EQ.0\))e(THEN)361 2138 y(CALL)i(MPI_SEND\(i,)e(1,)i(MPI_INTEGER,)e(2,)h(0,)h(comm,)f(ierr\)) 242 2194 y(ELSE)g(IF\(rank.EQ.1\))f(THEN)361 2251 y(CALL)i (MPI_SEND\(x,)e(1,)i(MPI_REAL,)e(2,)i(0,)f(comm,)h(ierr\))242 2307 y(ELSE)71 b(!)24 b(rank.EQ.2)337 2363 y(DO)g(i=1,)f(2)409 2420 y(CALL)g(MPI_PROBE\(MPI_ANY_SOURCE,)e(0,)791 2476 y(comm,)i(status,)g(ierr\))409 2533 y(IF)h(\(status\(MPI_SOURCE\))d(=)j (0\))f(THEN)75 2589 y(100)381 b(CALL)24 b(MPI_RECV\(i,)e(1,)i (MPI_INTEGER,)e(0,)h(0,)h(status,)f(ierr\))409 2646 y(ELSE)75 2702 y(200)381 b(CALL)24 b(MPI_RECV\(x,)e(1,)i(MPI_REAL,)e(1,)i(0,)f (status,)g(ierr\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 38 40 38 39 bop 75 -100 a Fu(38)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)409 45 y Fo(END)24 b(IF)337 102 y(END)g(DO)242 158 y(END)f(IF)75 264 y Fu(Eac)o(h)15 b(message)g(is)g(receiv)o(ed)i(with)e(the)h(righ)o(t)f(t)o(yp)q(e.)75 371 y Fp(Example)j(1.18)23 b Fu(A)15 b(similar)h(program)e(to)h(the)g (previous)h(example,)g(but)f(no)o(w)g(it)g(has)g(a)g(problem.)242 464 y Fo(CALL)23 b(MPI_COMM_RANK\(comm,)f(rank,)h(ierr\))242 521 y(IF)h(\(rank.EQ.0\))e(THEN)361 577 y(CALL)i(MPI_SEND\(i,)e(1,)i (MPI_INTEGER,)e(2,)h(0,)h(comm,)f(ierr\))242 634 y(ELSE)g (IF\(rank.EQ.1\))f(THEN)361 690 y(CALL)i(MPI_SEND\(x,)e(1,)i(MPI_REAL,) e(2,)i(0,)f(comm,)h(ierr\))242 747 y(ELSE)337 803 y(DO)g(i=1,)f(2)409 860 y(CALL)g(MPI_PROBE\(MPI_ANY_SOURCE,)e(0,)791 916 y(comm,)i(status,)g(ierr\))409 972 y(IF)h(\(status\(MPI_SOURCE\))d(=)j (0\))f(THEN)75 1029 y(100)381 b(CALL)24 b(MPI_RECV\(i,)e(1,)i (MPI_INTEGER,)e(MPI_ANY_SOURCE,)862 1085 y(0,)i(status,)f(ierr\))409 1142 y(ELSE)75 1198 y(200)381 b(CALL)24 b(MPI_RECV\(x,)e(1,)i (MPI_REAL,)e(MPI_ANY_SOURCE,)862 1255 y(0,)i(status,)f(ierr\))409 1311 y(END)h(IF)337 1368 y(END)g(DO)242 1424 y(END)f(IF)166 1518 y Fu(W)l(e)16 b(sligh)o(tly)h(mo)q(di\014ed)g(example)f(1.17,)e (using)j Fh(MPI)p 1075 1518 13 2 v 14 w(ANY)p 1174 1518 V 15 w(SOURCE)d Fu(as)h(the)h Fq(source)g Fu(argumen)o(t)f(in)75 1574 y(the)f(t)o(w)o(o)g(receiv)o(e)h(calls)g(in)h(statemen)o(ts)d(lab) q(eled)j(100)e(and)g(200.)19 b(The)c(program)e(is)i(no)o(w)f (incorrect:)20 b(the)75 1631 y(receiv)o(e)f(op)q(eration)f(ma)o(y)f (receiv)o(e)i(a)f(message)f(that)h(is)g(distinct)h(from)f(the)g (message)f(prob)q(ed)i(b)o(y)f(the)75 1687 y(preceding)f(call)f(to)f Fq(MPI)p 504 1687 14 2 v 15 w(PROBE)p Fu(.)189 1794 y Fj(A)n(dvic)n(e)e(to)i(implementors.)38 b Fu(A)13 b(call)i(to)d Fq(MPI)p 971 1794 V 16 w(PROBE\(source,)j(tag,)e(comm,)e(status\))k Fu(will)g(matc)o(h)189 1850 y(the)k(message)g(that)g(w)o(ould)h(ha)o(v) o(e)f(b)q(een)i(receiv)o(ed)f(b)o(y)g(a)f(call)h(to)f Fq(MPI)p 1431 1850 V 16 w(RECV\(...,)h(source,)g(tag,)189 1906 y(comm,)10 b(status\))j Fu(executed)g(at)e(the)h(same)g(p)q(oin)o (t.)19 b(Supp)q(ose)13 b(that)e(this)h(message)g(has)f(source)h Fq(s)p Fu(,)h(tag)189 1963 y Fq(t)i Fu(and)h(comm)o(unicator)f Fq(c)p Fu(.)20 b(If)c(the)f(tag)g(argumen)o(t)f(in)j(the)e(prob)q(e)h (call)g(has)f(v)m(alue)i Fh(MPI)p 1684 1963 13 2 v 14 w(ANY)p 1783 1963 V 15 w(T)m(A)o(G)189 2019 y Fu(then)c(the)g(message)f (prob)q(ed)i(will)g(b)q(e)g(the)f(earliest)g(p)q(ending)i(message)e (from)f(source)h Fq(s)g Fu(with)g(com-)189 2076 y(m)o(unicator)g Fq(c)h Fu(and)f(an)o(y)g(tag;)g(in)i(an)o(y)e(case,)g(the)h(message)f (prob)q(ed)h(will)h(b)q(e)f(the)g(earliest)g(p)q(ending)189 2132 y(message)f(from)g(source)h Fq(s)g Fu(with)g(tag)e Fq(t)j Fu(and)e(comm)o(unicator)h Fq(c)g Fu(\(this)f(is)i(the)e (message)h(that)f(w)o(ould)189 2189 y(ha)o(v)o(e)j(b)q(een)h(receiv)o (ed,)g(so)f(as)g(to)g(preserv)o(e)g(message)g(order\).)22 b(This)17 b(message)f(con)o(tin)o(ues)h(as)f(the)189 2245 y(earliest)g(p)q(ending)h(message)e(from)g(source)g Fq(s)h Fu(with)g(tag)f Fq(t)g Fu(and)h(comm)o(unicator)f Fq(c)p Fu(,)h(un)o(til)g(it)g(is)g(re-)189 2302 y(ceiv)o(ed.)k(A)12 b(receiv)o(e)h(op)q(eration)g(subsequen)o(t)g(to)e(the)i(prob)q(e)g (that)e(uses)i(the)f(same)g(comm)o(unicator)189 2358 y(as)j(the)h(prob)q(e)g(and)g(uses)g(the)f(tag)g(and)h(source)g(v)m (alues)h(returned)f(b)o(y)f(the)h(prob)q(e,)g(m)o(ust)f(receiv)o(e)189 2415 y(this)h(message,)f(unless)i(it)f(has)g(already)g(b)q(een)h (receiv)o(ed)g(b)o(y)f(another)g(receiv)o(e)h(op)q(eration.)22 b(\()p Fj(End)189 2471 y(of)16 b(advic)n(e)g(to)h(implementors.)p Fu(\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 39 41 39 40 bop 75 -100 a Fm(1.8.)34 b(PR)o(OBE)16 b(AND)f(CANCEL)1161 b Fu(39)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(CANCEL\(request\))117 122 y Fk(IN)155 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 247 y Fo(int)23 b(MPI)p 245 247 15 2 v 17 w(Cancel\(MPI)p 502 247 V 16 w(Request)g(*request\))75 333 y(MPI)p 150 333 V 17 w(CANCEL\(REQUEST,)f(IERROR\))170 390 y(INTEGER)h(REQUEST,)g(IERROR)166 476 y Fu(A)15 b(call)i(to)e Fq(MPI)p 440 476 14 2 v 16 w(CANCEL)g Fu(marks)g(for)g(cancellation)i (a)e(p)q(ending,)i(non)o(blo)q(c)o(king)g(comm)o(unication)75 533 y(op)q(eration)d(\(send)g(or)f(receiv)o(e\).)20 b(The)13 b(cancel)i(call)g(is)f(lo)q(cal.)20 b(It)14 b(returns)f(immediately)l (,)j(p)q(ossibly)f(b)q(efore)75 589 y(the)h(comm)o(unication)h(is)g (actually)g(canceled.)25 b(It)16 b(is)h(still)g(necessary)g(to)e (complete)i(a)f(comm)o(unication)75 645 y(that)f(has)g(b)q(een)h(mark)o (ed)f(for)g(cancellation,)h(using)g(a)f(call)i(to)d Fq(MPI)p 1237 645 V 16 w(REQUEST)p 1456 645 V 18 w(FREE)p Fu(,)h Fq(MPI)p 1693 645 V 16 w(W)l(AIT)g Fu(or)75 702 y Fq(MPI)p 160 702 V 16 w(TEST)g Fu(\(or)g(an)o(y)f(of)h(the)g(deriv)o(ed)i(op)q (erations\).)166 758 y(If)i(a)g(comm)o(unication)h(is)g(mark)o(ed)f (for)g(cancellation,)j(then)d(a)g Fq(MPI)p 1370 758 V 16 w(W)l(AIT)g Fu(call)i(for)d(that)h(com-)75 815 y(m)o(unication)i(is) f(guaran)o(teed)f(to)h(return,)g(irresp)q(ectiv)o(e)h(of)f(the)g (activities)h(of)e(other)g(pro)q(cesses)i(\(i.e.,)75 871 y Fq(MPI)p 160 871 V 16 w(W)l(AIT)f Fu(b)q(eha)o(v)o(es)g(as)g(a)g (lo)q(cal)i(function\);)g(similarly)g(if)f Fq(MPI)p 1235 871 V 16 w(TEST)f Fu(is)h(rep)q(eatedly)g(called)h(in)f(a)75 928 y(busy)13 b(w)o(ait)g(lo)q(op)h(for)e(a)h(canceled)h(comm)o (unication,)g(then)g Fq(MPI)p 1173 928 V 15 w(TEST)g Fu(will)g(ev)o(en)o(tually)g(b)q(e)g(successful.)166 984 y Fq(MPI)p 251 984 V 16 w(CANCEL)e Fu(can)f(b)q(e)i(used)f(to)f (cancel)i(a)e(comm)o(unication)h(that)f(uses)h(a)f(p)q(ersisten)o(t)h (request)g(\(see)75 1041 y(Sec.)26 b(1.9\),)15 b(in)j(the)f(same)f(w)o (a)o(y)g(it)h(is)h(used)f(for)g(nonp)q(ersisten)o(t)g(requests.)25 b(A)17 b(successful)h(cancellation)75 1097 y(cancels)c(the)f(activ)o(e) g(comm)o(unication,)h(but)f(not)f(the)h(request)g(itself.)20 b(After)13 b(the)g(call)h(to)e Fq(MPI)p 1690 1097 V 16 w(CANCEL)75 1154 y Fu(and)j(the)g(subsequen)o(t)h(call)g(to)e Fq(MPI)p 697 1154 V 16 w(W)l(AIT)h Fu(or)f Fq(MPI)p 978 1154 V 16 w(TEST)p Fu(,)h(the)g(request)g(b)q(ecomes)h(inactiv)o(e)g (and)f(can)75 1210 y(b)q(e)h(activ)m(ated)g(for)e(a)h(new)g(comm)o (unication.)166 1267 y(The)j(successful)i(cancellation)g(of)e(a)g (bu\013ered)h(send)g(frees)f(the)g(bu\013er)h(space)f(o)q(ccupied)j(b)o (y)d(the)75 1323 y(p)q(ending)f(message.)166 1379 y(Either)i(the)f (cancellation)i(succeeds,)f(or)f(the)g(comm)o(unication)h(succeeds,)h (but)e(not)g(b)q(oth.)29 b(If)18 b(a)75 1436 y(send)h(is)h(mark)o(ed)e (for)g(cancellation,)j(then)e(it)g(m)o(ust)f(b)q(e)i(the)f(case)g(that) f(either)h(the)g(send)g(completes)75 1492 y(normally)l(,)f(in)h(whic)o (h)f(case)f(the)h(message)f(sen)o(t)g(w)o(as)g(receiv)o(ed)h(at)f(the)h (destination)g(pro)q(cess,)g(or)f(that)75 1549 y(the)f(send)g(is)g (successfully)i(canceled,)f(in)g(whic)o(h)f(case)g(no)g(part)f(of)g (the)h(message)f(w)o(as)g(receiv)o(ed)i(at)e(the)75 1605 y(destination.)21 b(Then,)15 b(an)o(y)f(matc)o(hing)h(receiv)o(e)h(has) e(to)h(b)q(e)g(satis\014ed)h(b)o(y)e(another)h(send.)20 b(If)15 b(a)g(receiv)o(e)g(is)75 1662 y(mark)o(ed)d(for)f (cancellation,)k(then)d(it)h(m)o(ust)e(b)q(e)i(the)g(case)f(that)f (either)i(the)g(receiv)o(e)g(completes)g(normally)l(,)75 1718 y(or)18 b(that)g(the)g(receiv)o(e)i(is)f(successfully)h(canceled,) h(in)e(whic)o(h)h(case)e(no)h(part)f(of)g(the)g(receiv)o(e)i(bu\013er)e (is)75 1775 y(altered.)i(Then,)c(an)o(y)e(matc)o(hing)i(send)g(has)f (to)f(b)q(e)i(satis\014ed)g(b)o(y)f(another)g(receiv)o(e.)166 1831 y(If)h(the)f(op)q(eration)h(has)g(b)q(een)g(canceled,)h(then)f (information)g(to)f(that)f(e\013ect)i(will)h(b)q(e)f(returned)g(in)75 1888 y(the)f(status)g(argumen)o(t)f(of)h(the)g(op)q(eration)g(that)g (completes)h(the)f(comm)o(unication.)75 2038 y Fq(MPI)p 160 2038 V 16 w(TEST)p 290 2038 V 16 w(CANCELLED\(status,)i(\015ag\)) 117 2116 y Fk(IN)155 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g (\(Status\))117 2191 y(OUT)108 b Fq(\015ag)518 b Fk(\(logical\))1937 2269 y Fi(>)75 2315 y Fo(int)23 b(MPI)p 245 2315 15 2 v 17 w(Test)p 358 2315 V 17 w(cancelled\(MPI)p 687 2315 V 15 w(Status)g(*status,)g(int)h(*flag\))1937 2355 y Fi(?)75 2402 y Fo(MPI)p 150 2402 V 17 w(TEST)p 263 2402 V 16 w(CANCELLED\(STATUS,)e(FLAG,)h(IERROR\))170 2458 y(LOGICAL)g(FLAG)170 2515 y(INTEGER)g(STATUS\(MPI)p 604 2515 V 16 w(STATUS)p 764 2515 V 17 w(SIZE\),)g(IERROR)166 2601 y Fu(Returns)12 b Fq(\015ag)f(=)h(true)g Fu(if)f(the)h(comm)o (unication)g(asso)q(ciated)f(with)h(the)g(status)e(ob)s(ject)h(w)o(as)f (canceled)75 2658 y(successfully)l(.)27 b(In)18 b(suc)o(h)f(a)g(case,)g (all)g(other)g(\014elds)h(of)e Fq(status)j Fu(\(suc)o(h)e(as)g Fq(count)h Fu(or)e Fq(tag)p Fu(\))h(are)f(unde\014ned.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 40 42 40 41 bop 75 -100 a Fu(40)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(Returns)12 b Fq(\015ag)g(=)g(false)p Fu(,)g(otherwise.)19 b(If)12 b(a)g(receiv)o(e)g(op)q(eration)g(migh)o(t)g(b)q(e)h(canceled)g(then)f (one)g(should)h(call)75 102 y Fq(MPI)p 160 102 14 2 v 16 w(TEST)p 290 102 V 16 w(CANCELLED)g Fu(\014rst,)f(to)g(c)o(hec)o(k)g (whether)h(the)f(op)q(eration)h(w)o(as)e(canceled,)j(b)q(efore)f(c)o (hec)o(king)75 158 y(on)i(the)g(other)g(\014elds)i(of)d(the)i(return)f (status.)189 264 y Fj(A)n(dvic)n(e)k(to)h(users.)64 b Fu(Cancel)20 b(can)g(b)q(e)f(an)h(exp)q(ensiv)o(e)g(op)q(eration)g (that)e(should)j(b)q(e)f(used)f(only)189 321 y(exceptionally)l(.)j(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(users.)p Fu(\))189 427 y Fj(A)n(dvic)n(e)e(to)i(implementors.)39 b Fu(If)15 b(a)f(send)h(op)q(eration)g(uses)f(an)g(\\eager")g(proto)q(col)g (\(data)g(is)g(trans-)189 483 y(ferred)e(to)f(the)h(receiv)o(er)h(b)q (efore)f(a)g(matc)o(hing)f(receiv)o(e)i(is)g(p)q(osted\),)f(then)g(the) g(cancellation)i(of)e(this)189 540 y(send)i(ma)o(y)g(require)h(comm)o (unication)g(with)f(the)g(in)o(tended)i(receiv)o(er)f(in)f(order)g(to)g (free)g(allo)q(cated)189 596 y(bu\013ers.)k(On)13 b(some)f(systems)g (this)h(ma)o(y)f(require)h(an)f(in)o(terrupt)h(to)e(the)i(in)o(tended)h (receiv)o(er.)19 b(Note)189 653 y(that,)14 b(while)j(comm)o(unication)g (ma)o(y)e(b)q(e)h(needed)h(to)e(implemen)o(t)i Fq(MPI)p 1415 653 V 16 w(CANCEL)p Fu(,)e(this)h(is)g(still)h(a)189 709 y(lo)q(cal)g(op)q(eration,)f(since)i(its)e(completion)h(do)q(es)g (not)f(dep)q(end)i(on)e(the)g(co)q(de)h(executed)g(b)o(y)f(other)189 766 y(pro)q(cesses.)21 b(If)15 b(pro)q(cessing)i(is)f(required)g(on)f (another)g(pro)q(cess,)h(this)g(should)g(b)q(e)g(transparen)o(t)f(to) 189 822 y(the)h(application)j(\(hence)e(the)g(need)h(for)e(an)h(in)o (terrupt)g(and)g(an)f(in)o(terrupt)h(handler\).)26 b(\()p Fj(End)17 b(of)189 879 y(advic)n(e)f(to)g(implementors.)p Fu(\))75 1022 y Fr(1.9)59 b(P)n(ersistent)19 b(communication)f (requests)75 1123 y Fu(Often)f(a)f(comm)o(unication)g(with)h(the)f (same)g(argumen)o(t)g(list)h(is)g(rep)q(eatedly)g(executed)g(within)h (the)e(in-)75 1180 y(ner)k(lo)q(op)h(of)f(a)g(parallel)i(computation.) 35 b(In)20 b(suc)o(h)h(a)f(situation,)h(it)g(ma)o(y)e(b)q(e)i(p)q (ossible)h(to)e(optimize)75 1236 y(the)c(comm)o(unication)g(b)o(y)g (binding)h(the)f(list)g(of)f(comm)o(unication)i(argumen)o(ts)d(to)h(a)h Fp(p)q(ersisten)o(t)f Fu(com-)75 1293 y(m)o(unication)k(request)e(once) h(and,)g(then,)g(rep)q(eatedly)h(using)f(the)g(request)g(to)e(initiate) j(and)f(complete)75 1349 y(messages.)g(The)12 b(p)q(ersisten)o(t)g (request)g(th)o(us)f(created)h(can)g(b)q(e)g(though)o(t)f(of)g(as)g(a)h (comm)o(unication)g(p)q(ort)f(or)75 1406 y(a)k(\\half-c)o(hannel.")21 b(It)15 b(do)q(es)h(not)e(pro)o(vide)i(the)f(full)i(functionalit)o(y)f (of)f(a)f(con)o(v)o(en)o(tional)i(c)o(hannel,)g(since)75 1462 y(there)i(is)h(no)f(binding)i(of)e(the)g(send)h(p)q(ort)f(to)f (the)i(receiv)o(e)g(p)q(ort.)28 b(This)19 b(construct)f(allo)o(ws)g (reduction)75 1519 y(of)c(the)g(o)o(v)o(erhead)g(for)g(comm)o (unication)h(b)q(et)o(w)o(een)g(the)f(pro)q(cess)h(and)f(comm)o (unication)h(con)o(troller,)g(but)75 1575 y(not)e(of)g(the)g(o)o(v)o (erhead)g(for)g(comm)o(unication)h(b)q(et)o(w)o(een)g(one)f(comm)o (unication)h(con)o(troller)g(and)g(another.)75 1631 y(It)19 b(is)h(not)e(necessary)i(that)e(messages)h(sen)o(t)f(with)i(a)f(p)q (ersisten)o(t)g(request)g(b)q(e)h(receiv)o(ed)g(b)o(y)f(a)g(receiv)o(e) 75 1688 y(op)q(eration)c(using)h(a)f(p)q(ersisten)o(t)h(request,)f(or)f (vice)j(v)o(ersa.)166 1744 y(A)j(p)q(ersisten)o(t)g(comm)o(unication)g (request)g(is)g(created)g(using)h(one)e(of)h(the)f(four)h(follo)o(wing) g(calls.)75 1801 y(These)c(calls)g(in)o(v)o(olv)o(e)g(no)f(comm)o (unication.)75 1952 y Fq(MPI)p 160 1952 V 16 w(SEND)p 293 1952 V 17 w(INIT\(buf,)f(count,)i(datat)o(yp)q(e,)h(dest,)f(tag,)f (comm,)e(request\))117 2029 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 2104 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(sen)o(t)i(\(in)o(teger\))117 2179 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(eac)o(h)h (elemen)o(t)g(\(handle\))117 2254 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 2329 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 2405 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 2480 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 2604 y Fo(int)23 b(MPI)p 245 2604 15 2 v 17 w(Send)p 358 2604 V 17 w(init\(void*)f(buf,)i(int)f (count,)g(MPI)p 1091 2604 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 2661 y(int)g(tag,)f(MPI)p 683 2661 V 17 w(Comm)g(comm,)g(MPI)p 1034 2661 V 17 w(Request)g(*request\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 41 43 41 42 bop 75 -100 a Fm(1.9.)34 b(PERSISTENT)16 b(COMMUNICA)l(TION)g (REQUESTS)661 b Fu(41)75 45 y Fo(MPI)p 150 45 15 2 v 17 w(SEND)p 263 45 V 16 w(INIT\(BUF,)23 b(COUNT,)g(DATATYPE,)g(DEST,)g (TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 102 y()g(BUF\(*\))170 158 y(INTEGER)g(REQUEST,)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g (REQUEST,)g(IERROR)166 244 y Fu(Creates)15 b(a)h(p)q(ersisten)o(t)h (comm)o(unication)g(request)f(for)g(a)f(standard)h(mo)q(de)h(send)f(op) q(eration,)h(and)75 301 y(binds)f(to)f(it)g(all)i(the)e(argumen)o(ts)f (of)h(a)g(send)h(op)q(eration.)75 452 y Fq(MPI)p 160 452 14 2 v 16 w(BSEND)p 323 452 V 17 w(INIT\(buf,)f(count,)h(datat)o (yp)q(e,)g(dest,)g(tag,)f(comm,)e(request\))117 529 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g (bu\013er)h(\(c)o(hoice\))117 604 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(sen)o(t)i(\(in)o(teger\)) 117 679 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(eac)o(h)h(elemen)o(t)g(\(handle\))117 754 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 830 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 905 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 980 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1104 y Fo(int)23 b(MPI)p 245 1104 15 2 v 17 w(Bsend)p 382 1104 V 17 w(init\(void*)f(buf,)i(int)f (count,)g(MPI)p 1115 1104 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 1161 y(int)g(tag,)f(MPI)p 683 1161 V 17 w(Comm)g(comm,)g(MPI)p 1034 1161 V 17 w(Request)g(*request\))75 1247 y(MPI)p 150 1247 V 17 w(BSEND)p 287 1247 V 16 w(INIT\(BUF,)g(COUNT,)g (DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 1304 y()g(BUF\(*\))170 1360 y(INTEGER)g(REQUEST,)g(COUNT,)g (DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g(REQUEST,)g(IERROR)166 1447 y Fu(Creates)14 b(a)h(p)q(ersisten)o(t)h(comm)o(unication)g (request)f(for)g(a)g(bu\013ered)g(mo)q(de)h(send.)75 1598 y Fq(MPI)p 160 1598 14 2 v 16 w(SSEND)p 318 1598 V 17 w(INIT\(buf,)f(count,)h(datat)o(yp)q(e,)g(dest,)g(tag,)f(comm,)e (request\))117 1675 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 1750 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(sen)o(t)i(\(in)o(teger\))117 1825 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(eac)o(h)h (elemen)o(t)g(\(handle\))117 1900 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 1975 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 2050 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 2126 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 2250 y Fo(int)23 b(MPI)p 245 2250 15 2 v 17 w(Ssend)p 382 2250 V 17 w(init\(void*)f(buf,)i(int)f (count,)g(MPI)p 1115 2250 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 2306 y(int)g(tag,)f(MPI)p 683 2306 V 17 w(Comm)g(comm,)g(MPI)p 1034 2306 V 17 w(Request)g(*request\))75 2393 y(MPI)p 150 2393 V 17 w(SSEND)p 287 2393 V 16 w(INIT\(BUF,)g(COUNT,)g (DATATYPE,)g(DEST,)g(TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 2449 y()g(BUF\(*\))170 2506 y(INTEGER)g(COUNT,)g(DATATYPE,)g (DEST,)g(TAG,)h(COMM,)f(REQUEST,)f(IERROR)166 2592 y Fu(Creates)14 b(a)h(p)q(ersisten)o(t)h(comm)o(unication)g(ob)s(ject)f (for)f(a)h(sync)o(hronous)g(mo)q(de)h(send)f(op)q(eration.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 42 44 42 43 bop 75 -100 a Fu(42)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(RSEND)p 322 45 V 17 w(INIT\(buf,)e(count,)h(datat)o (yp)q(e,)g(dest,)g(tag,)f(comm,)e(request\))117 122 y Fk(IN)155 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g (bu\013er)h(\(c)o(hoice\))117 197 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(sen)o(t)i(\(in)o(teger\)) 117 273 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(eac)o(h)h(elemen)o(t)g(\(handle\))117 348 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 423 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(\(in)o(teger\))117 498 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 573 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 698 y Fo(int)23 b(MPI)p 245 698 15 2 v 17 w(Rsend)p 382 698 V 17 w(init\(void*)f(buf,)i(int)f (count,)g(MPI)p 1115 698 V 17 w(Datatype)g(datatype,)f(int)i(dest,)393 754 y(int)g(tag,)f(MPI)p 683 754 V 17 w(Comm)g(comm,)g(MPI)p 1034 754 V 17 w(Request)g(*request\))75 840 y(MPI)p 150 840 V 17 w(RSEND)p 287 840 V 16 w(INIT\(BUF,)g(COUNT,)g(DATATYPE,)g (DEST,)g(TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 897 y()g (BUF\(*\))170 953 y(INTEGER)g(COUNT,)g(DATATYPE,)g(DEST,)g(TAG,)h (COMM,)f(REQUEST,)f(IERROR)166 1040 y Fu(Creates)14 b(a)h(p)q(ersisten) o(t)h(comm)o(unication)g(ob)s(ject)f(for)f(a)h(ready)g(mo)q(de)h(send)f (op)q(eration.)75 1191 y Fq(MPI)p 160 1191 14 2 v 16 w(RECV)p 291 1191 V 17 w(INIT\(buf,)g(count,)h(datat)o(yp)q(e,)g (source,)g(tag,)e(comm,)f(request\))117 1268 y Fk(OUT)108 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(receiv)o(e)h(bu\013er)g (\(c)o(hoice\))117 1343 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(receiv)o(ed)j(\(in)o(teger\))117 1418 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(eac)o(h)h(elemen)o(t)g(\(handle\))117 1493 y(IN)155 b Fq(source)468 b Fk(rank)14 b(of)f(source)j(or)d(MPI)p 1309 1493 13 2 v 16 w(ANY)p 1418 1493 V 15 w(SOUR)o(CE)h(\(in)o (teger\))117 1569 y(IN)155 b Fq(tag)526 b Fk(message)14 b(tag)f(or)h(MPI)p 1270 1569 V 15 w(ANY)p 1378 1569 V 16 w(T)m(A)o(G)f(\(in)o(teger\))117 1644 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1719 y(OUT)108 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 1843 y Fo(int)23 b(MPI)p 245 1843 15 2 v 17 w(Recv)p 358 1843 V 17 w(init\(void*)f(buf,)i(int)f(count,)g(MPI)p 1091 1843 V 17 w(Datatype)g(datatype,)f(int)i(source,)393 1900 y(int)g(tag,)f(MPI)p 683 1900 V 17 w(Comm)g(comm,)g(MPI)p 1034 1900 V 17 w(Request)g(*request\))75 1986 y(MPI)p 150 1986 V 17 w(RECV)p 263 1986 V 16 w(INIT\(BUF,)g(COUNT,)g(DATATYPE,) g(SOURCE,)g(TAG,)g(COMM,)g(REQUEST,)g(IERROR\))170 2043 y()g(BUF\(*\))170 2099 y(INTEGER)g(COUNT,)g(DATATYPE,)g(SOURCE,)g (TAG,)g(COMM,)g(REQUEST,)g(IERROR)166 2186 y Fu(Creates)13 b(a)h(p)q(ersisten)o(t)h(comm)o(unication)f(request)h(for)e(a)h(receiv) o(e)h(op)q(eration.)20 b(The)14 b(argumen)o(t)f Fq(buf)75 2242 y Fu(is)f(mark)o(ed)g(as)f Fq(OUT)h Fu(b)q(ecause)h(the)f(user)g (giv)o(es)g(p)q(ermission)h(to)e(write)h(on)g(the)f(receiv)o(e)i (bu\013er)f(b)o(y)g(passing)75 2298 y(the)j(argumen)o(t)g(to)f Fq(MPI)p 497 2298 14 2 v 16 w(RECV)p 628 2298 V 17 w(INIT)p Fu(.)166 2355 y(A)i(p)q(ersisten)o(t)h(comm)o(unication)f(request)h(is) f(inactiv)o(e)h(after)f(it)g(w)o(as)f(created)h(|)h(no)f(activ)o(e)g (com-)75 2411 y(m)o(unication)g(is)g(attac)o(hed)e(to)h(the)g(request.) 166 2468 y(A)k(comm)o(unication)g(\(send)g(or)g(receiv)o(e\))g(that)f (uses)h(a)f(p)q(ersisten)o(t)i(request)e(is)i(initiated)g(b)o(y)f(the) 75 2524 y(function)d Fq(MPI)p 338 2524 V 16 w(ST)l(ART)p Fu(.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 43 45 43 44 bop 75 -100 a Fm(1.9.)34 b(PERSISTENT)16 b(COMMUNICA)l(TION)g (REQUESTS)661 b Fu(43)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(ST)l(ART\(request\))117 122 y Fk(INOUT)62 b Fq(request)452 b Fk(comm)o(unication)11 b(request)k(\(handle\))75 247 y Fo(int)23 b(MPI)p 245 247 15 2 v 17 w(Start\(MPI)p 478 247 V 16 w(Request)g(*request\))75 333 y(MPI)p 150 333 V 17 w(START\(REQUEST,)f(IERROR\))170 390 y(INTEGER)h(REQUEST,)g (IERROR)166 476 y Fu(The)d(argumen)o(t,)h Fq(request)p Fu(,)h(is)f(a)f(handle)h(returned)g(b)o(y)f(one)g(of)g(the)h(previous)f (\014v)o(e)h(calls.)36 b(The)75 533 y(asso)q(ciated)15 b(request)h(should)g(b)q(e)g(inactiv)o(e.)21 b(The)15 b(request)g(b)q(ecomes)h(activ)o(e)f(once)h(the)f(call)h(is)g(made.)166 589 y(If)e(the)g(request)g(is)h(for)e(a)h(send)h(with)f(ready)g(mo)q (de,)g(then)g(a)g(matc)o(hing)g(receiv)o(e)h(should)g(b)q(e)g(p)q (osted)75 645 y(b)q(efore)j(the)g(call)h(is)g(made.)28 b(The)18 b(comm)o(unication)h(bu\013er)e(should)i(not)f(b)q(e)g (accessed)h(after)e(the)h(call,)75 702 y(and)d(un)o(til)i(the)e(op)q (eration)g(completes.)166 758 y(The)22 b(call)i(is)e(lo)q(cal,)j(with)e (similar)g(seman)o(tics)f(to)g(the)g(non)o(blo)q(c)o(king)i(comm)o (unication)f(op)q(era-)75 815 y(tions)d(describ)q(ed)i(in)e(section)h (1.7.)33 b(That)19 b(is,)i(a)f(call)h(to)e Fq(MPI)p 1174 815 14 2 v 16 w(ST)l(ART)i Fu(with)f(a)f(request)h(created)g(b)o(y)75 871 y Fq(MPI)p 160 871 V 16 w(SEND)p 293 871 V 17 w(INIT)13 b Fu(starts)f(a)h(comm)o(unication)i(in)g(the)e(same)h(manner)g(as)f(a) g(call)i(to)e Fq(MPI)p 1601 871 V 16 w(ISEND)p Fu(;)g(a)h(call)75 928 y(to)h Fq(MPI)p 216 928 V 16 w(ST)l(ART)h Fu(with)g(a)f(request)g (created)h(b)o(y)f Fq(MPI)p 995 928 V 16 w(BSEND)p 1158 928 V 17 w(INIT)g Fu(starts)f(a)h(comm)o(unication)i(in)f(the)75 984 y(same)f(manner)g(as)g(a)g(call)h(to)f Fq(MPI)p 671 984 V 16 w(IBSEND)p Fu(;)g(and)g(so)g(on.)75 1135 y Fq(MPI)p 160 1135 V 16 w(ST)l(ART)l(ALL\(count,)h(a)o(rra)o(y)p 641 1135 V 15 w(of)p 693 1135 V 16 w(requests\))117 1212 y Fk(IN)155 b Fq(count)482 b Fk(list)14 b(length)f(\(in)o(teger\))117 1288 y(INOUT)62 b Fq(a)o(rra)o(y)p 416 1288 V 15 w(of)p 468 1288 V 16 w(requests)272 b Fk(arra)o(y)14 b(of)f(requests)j(\(arra) o(y)e(of)f(handle\))75 1412 y Fo(int)23 b(MPI)p 245 1412 15 2 v 17 w(Startall\(int)f(count,)h(MPI)p 811 1412 V 17 w(Request)g(*array)p 1163 1412 V 17 w(of)p 1228 1412 V 16 w(requests\))75 1498 y(MPI)p 150 1498 V 17 w(STARTALL\(COUNT,)f (ARRAY)p 669 1498 V 16 w(OF)p 733 1498 V 17 w(REQUESTS,)h(IERROR\))170 1555 y(INTEGER)g(COUNT,)g(ARRAY)p 651 1555 V 17 w(OF)p 716 1555 V 17 w(REQUESTS\(*\),)f(IERROR)166 1641 y Fu(Start)i(all)j (comm)o(unications)f(asso)q(ciated)g(with)f(requests)h(in)g Fq(a)o(rra)o(y)p 1399 1641 14 2 v 15 w(of)p 1451 1641 V 16 w(requests)p Fu(.)52 b(A)26 b(call)h(to)75 1698 y Fq(MPI)p 160 1698 V 16 w(ST)l(ART)l(ALL\(count,)18 b(a)o(rra)o(y)p 643 1698 V 15 w(of)p 695 1698 V 16 w(requests\))h Fu(has)d(the)h(same)g(e\013ect)f(as)h(calls)h(to)e Fq(MPI)p 1599 1698 V 16 w(ST)l(ART)i(\(&a)o(r-)75 1754 y(ra)o(y)p 136 1754 V 15 w(of)p 188 1754 V 16 w(requests[i]\))p Fu(,)f(executed)f(for)f Fq(i=0)g(,...,)e(count-1)p Fu(,)j(in)g(some)f (arbitrary)g(order.)166 1811 y(A)i(comm)o(unication)g(started)f(with)h (a)g(call)h(to)e Fq(MPI)p 1063 1811 V 16 w(ST)l(ART)h Fu(or)f Fq(MPI)p 1377 1811 V 16 w(ST)l(ART)l(ALL)i Fu(is)f(completed)75 1867 y(b)o(y)11 b(a)h(call)g(to)f Fq(MPI)p 385 1867 V 16 w(W)l(AIT)p Fu(,)g Fq(MPI)p 620 1867 V 16 w(TEST)p Fu(,)h(or)f(one)g(of)g(the)h(deriv)o(ed)h(functions)f(describ)q(ed)h (in)g(section)f(1.7.5.)75 1924 y(The)18 b(request)f(b)q(ecomes)h (inactiv)o(e)h(after)d(successful)j(completion)g(of)e(suc)o(h)h(call.) 27 b(The)18 b(request)f(is)h(not)75 1980 y(deallo)q(cated)f(and)e(it)g (can)h(b)q(e)g(activ)m(ated)f(anew)h(b)o(y)f(an)g Fq(MPI)p 1116 1980 V 16 w(ST)l(ART)h Fu(or)e Fq(MPI)p 1427 1980 V 16 w(ST)l(ART)l(ALL)i Fu(call.)166 2037 y(A)f(p)q(ersisten)o(t)h (request)f(is)h(deallo)q(cated)g(b)o(y)g(a)e(call)j(to)d Fq(MPI)p 1190 2037 V 16 w(REQUEST)p 1409 2037 V 18 w(FREE)i Fu(\(Section)f(1.7.3\).)166 2093 y(The)g(call)g(to)f Fq(MPI)p 481 2093 V 16 w(REQUEST)p 700 2093 V 17 w(FREE)h Fu(can)g(o)q(ccur)g(at)e(an)o(y)h(p)q(oin)o(t)h(in)h(the)e(program)f (after)h(the)g(p)q(er-)75 2149 y(sisten)o(t)h(request)g(w)o(as)f (created.)20 b(Ho)o(w)o(ev)o(er,)14 b(the)h(request)g(will)h(b)q(e)g (deallo)q(cated)g(only)g(after)e(it)h(b)q(ecomes)75 2206 y(inactiv)o(e.)33 b(Activ)o(e)20 b(receiv)o(e)g(requests)f(should)i (not)e(b)q(e)h(freed.)32 b(Otherwise,)21 b(it)e(will)i(not)e(b)q(e)h(p) q(ossible)75 2262 y(to)c(c)o(hec)o(k)g(that)f(the)i(receiv)o(e)g(has)f (completed.)23 b(It)17 b(is)f(preferable,)h(in)g(general,)g(to)e(free)h (requests)g(when)75 2319 y(they)h(are)g(inactiv)o(e.)27 b(If)17 b(this)g(rule)h(is)g(follo)o(w)o(ed,)g(then)f(the)g(functions)h (describ)q(ed)h(in)f(this)g(section)f(will)75 2375 y(b)q(e)f(in)o(v)o (ok)o(ed)f(in)h(a)f(sequence)i(of)d(the)i(form,)166 2491 y Fp(Create)h Fu(\()p Fp(Start)g(Complete)p Fu(\))724 2474 y Ff(\003)760 2491 y Fp(F)l(ree)f Fg(;)e Fu(where)h Fi(\003)f Fu(indicates)i(zero)f(or)f(more)g(rep)q(etitions.)21 b(If)15 b(the)75 2606 y(same)g(comm)o(unication)i(ob)s(ject)e(is)h (used)g(in)h(sev)o(eral)f(concurren)o(t)f(threads,)h(it)g(is)g(the)f (user's)h(resp)q(onsi-)75 2663 y(bilit)o(y)h(to)d(co)q(ordinate)i (calls)g(so)f(that)f(the)i(correct)e(sequence)j(is)f(ob)q(ey)o(ed.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 44 46 44 45 bop 75 -100 a Fu(44)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)166 45 y Fu(A)12 b(send)g(op)q(eration)f(initiated)j(with)d Fq(MPI)p 874 45 14 2 v 16 w(ST)l(ART)i Fu(can)e(b)q(e)i(matc)o(hed)e(with)h(an)o(y)f (receiv)o(e)i(op)q(eration)75 102 y(and,)g(lik)o(ewise,)h(a)e(receiv)o (e)i(op)q(eration)e(initiated)i(with)f Fq(MPI)p 1098 102 V 16 w(ST)l(ART)g Fu(can)g(receiv)o(e)g(messages)f(generated)75 158 y(b)o(y)j(an)o(y)g(send)h(op)q(eration.)75 301 y Fr(1.10)59 b(Send-receive)75 403 y Fu(The)18 b Fp(send-receiv)o(e)g Fu(op)q(erations)g(com)o(bine)h(in)g(one)f(call)h(the)f(sending)i(of)d (a)h(message)g(to)f(one)h(desti-)75 459 y(nation)g(and)f(the)h (receiving)h(of)e(another)g(message,)h(from)e(another)h(pro)q(cess.)28 b(The)17 b(t)o(w)o(o)g(\(source)g(and)75 516 y(destination\))i(are)f(p) q(ossibly)j(the)d(same.)30 b(A)19 b(send-receiv)o(e)h(op)q(eration)f (is)g(v)o(ery)f(useful)i(for)e(executing)75 572 y(a)g(shift)i(op)q (eration)f(across)f(a)g(c)o(hain)i(of)e(pro)q(cesses.)31 b(If)19 b(blo)q(c)o(king)h(sends)f(and)g(receiv)o(es)h(are)e(used)i (for)75 629 y(suc)o(h)f(a)f(shift,)h(then)g(one)f(needs)h(to)f(order)g (the)g(sends)h(and)g(receiv)o(es)g(correctly)g(\(for)e(example,)j(ev)o (en)75 685 y(pro)q(cesses)d(send,)f(then)h(receiv)o(e,)g(o)q(dd)f(pro)q (cesses)h(receiv)o(e)g(\014rst,)f(then)g(send\))h(so)f(as)g(to)f(prev)o (en)o(t)h(cyclic)75 741 y(dep)q(endencies)j(that)c(ma)o(y)g(lead)h(to)f (deadlo)q(c)o(k.)23 b(When)16 b(a)f(send-receiv)o(e)j(op)q(eration)e (is)g(used,)g(the)g(com-)75 798 y(m)o(unication)j(subsystem)e(tak)o(es) g(care)h(of)f(these)h(issues.)29 b(The)18 b(send-receiv)o(e)h(op)q (eration)f(can)g(b)q(e)g(used)75 854 y(in)h(conjunction)h(with)f(the)g (functions)g(describ)q(ed)i(in)e(Chapter)f Fp(??)30 b Fu(in)19 b(order)g(to)f(p)q(erform)g(shifts)h(on)75 911 y(v)m(arious)c(logical)h(top)q(ologies.)21 b(Also,)14 b(a)h(send-receiv)o(e)h(op)q(eration)f(is)h(useful)g(for)e(implemen)o (ting)j(remote)75 967 y(pro)q(cedure)f(calls.)166 1024 y(A)g(message)f(sen)o(t)g(b)o(y)h(a)f(send-receiv)o(e)j(op)q(eration)d (can)h(b)q(e)h(receiv)o(ed)f(b)o(y)g(a)f(regular)h(receiv)o(e)h(op)q (er-)75 1080 y(ation)f(or)f(prob)q(ed)i(b)o(y)f(a)g(prob)q(e)g(op)q (eration;)g(a)g(send-receiv)o(e)i(op)q(eration)e(can)g(receiv)o(e)h(a)f (message)f(sen)o(t)75 1137 y(b)o(y)g(a)g(regular)g(send)h(op)q (eration.)75 1288 y Fq(MPI)p 160 1288 V 16 w(SENDRECV\(sendbuf,)24 b(sendcount,)f(sendt)o(yp)q(e,)g(dest,)f(sendtag,)g(recvbuf,)g (recvcount,)f(recvt)o(yp)q(e,)75 1344 y(source,)15 b(recvtag,)g(comm,)e (status\))117 1421 y Fk(IN)155 b Fq(sendbuf)444 b Fk(initial)12 b(address)j(of)f(send)g(bu\013er)h(\(c)o(hoice\))117 1496 y(IN)155 b Fq(sendcount)399 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(send)h(bu\013er)f(\(in)o(teger\))117 1571 y(IN)155 b Fq(sendt)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(elemen)o(ts)h(in)f(send)i(bu\013er)g(\(handle\))117 1647 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o (teger\))117 1722 y(IN)155 b Fq(sendtag)443 b Fk(send)15 b(tag)e(\(in)o(teger\))117 1797 y(OUT)108 b Fq(recvbuf)450 b Fk(initial)12 b(address)j(of)f(receiv)o(e)h(bu\013er)g(\(c)o(hoice\)) 117 1872 y(IN)155 b Fq(recvcount)405 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(receiv)o(e)h(bu\013er)g(\(in)o(teger\))117 1947 y(IN)155 b Fq(recvt)o(yp)q(e)430 b Fk(t)o(yp)q(e)15 b(of)e(elemen)o(ts)h(in)f(receiv)o(e)i(bu\013er)g(\(handle\))117 2022 y(IN)155 b Fq(source)468 b Fk(rank)14 b(of)f(source)j(\(in)o (teger\))117 2097 y(IN)155 b Fq(recvtag)449 b Fk(receiv)o(e)15 b(tag)f(\(in)o(teger\))117 2173 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 2248 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\))75 2372 y Fo(int)23 b(MPI)p 245 2372 15 2 v 17 w(Sendrecv\(void)f (*sendbuf,)h(int)g(sendcount,)g(MPI)p 1265 2372 V 17 w(Datatype)f(sendtype,)393 2429 y(int)i(dest,)f(int)g(sendtag,)g(void)g (*recvbuf,)g(int)g(recvcount,)393 2485 y(MPI)p 468 2485 V 17 w(Datatype)g(recvtype,)f(int)i(source,)f(MPI)p 1297 2485 V 16 w(Datatype)g(recvtag,)393 2542 y(MPI)p 468 2542 V 17 w(Comm)g(comm,)g(MPI)p 819 2542 V 17 w(Status)g(*status\))75 2628 y(MPI)p 150 2628 V 17 w(SENDRECV\(SENDBUF,)e(SENDCOUNT,)i (SENDTYPE,)f(DEST,)i(SENDTAG,)e(RECVBUF,)393 2684 y(RECVCOUNT,)h (RECVTYPE,)f(SOURCE,)h(RECVTAG,)g(COMM,)g(STATUS,)g(IERROR\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 45 47 45 46 bop 75 -100 a Fm(1.11.)34 b(NULL)16 b(PR)o(OCESSES)1218 b Fu(45)170 45 y Fo()23 b(SENDBUF\(*\),)g(RECVBUF\(*\))170 102 y(INTEGER)g(SENDCOUNT,)g(SENDTYPE,)f(DEST,)i(SENDTAG,)e(RECVCOUNT,) h(RECVTYPE,)170 158 y(SOURCE,)g(RECV)h(TAG,)f(COMM,)g(STATUS\(MPI)p 986 158 15 2 v 16 w(STATUS)p 1146 158 V 16 w(SIZE\),)g(IERROR)166 244 y Fu(Execute)c(a)e(blo)q(c)o(king)j(send)f(and)f(receiv)o(e)h(op)q (eration.)29 b(Both)18 b(send)h(and)f(receiv)o(e)h(use)g(the)f(same)75 301 y(comm)o(unicator,)i(but)g(p)q(ossibly)i(di\013eren)o(t)e(tags.)33 b(The)20 b(send)g(bu\013er)g(and)g(receiv)o(e)h(bu\013ers)f(m)o(ust)f (b)q(e)75 357 y(disjoin)o(t,)c(and)h(ma)o(y)e(ha)o(v)o(e)h(di\013eren)o (t)h(lengths)f(and)h(datat)o(yp)q(es.)75 508 y Fq(MPI)p 160 508 14 2 v 16 w(SENDRECV)p 408 508 V 17 w(REPLA)o(CE\(buf,)j (count,)f(datat)o(yp)q(e,)h(dest,)f(sendtag,)h(source,)f(recvtag,)f (comm,)e(sta-)75 565 y(tus\))117 642 y Fk(INOUT)62 b Fq(buf)527 b Fk(initial)12 b(address)j(of)f(send)g(and)g(receiv)o(e)h (bu\013er)g(\(c)o(hoice\))117 715 y(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)9 b(of)g(elemen)o(ts)h(in)f(send)i(and)e(receiv)o (e)i(bu\013er)g(\(in)o(teger\))117 788 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(t)o(yp)q(e)15 b(of)e(elemen)o(ts)h(in)f(send)i(and)f(receiv)o(e)h (bu\013er)g(\(handle\))117 861 y(IN)155 b Fq(dest)511 b Fk(rank)14 b(of)f(destination)h(\(in)o(teger\))117 934 y(IN)155 b Fq(sendtag)443 b Fk(send)15 b(message)f(tag)f(\(in)o (teger\))117 1007 y(IN)155 b Fq(source)468 b Fk(rank)14 b(of)f(source)j(\(in)o(teger\))117 1080 y(IN)155 b Fq(recvtag)449 b Fk(receiv)o(e)15 b(message)f(tag)f(\(in)o(teger\))117 1153 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(\(handle\))117 1226 y(OUT)108 b Fq(status)476 b Fk(status)15 b(ob)r(ject)g(\(Status\)) 75 1350 y Fo(int)23 b(MPI)p 245 1350 15 2 v 17 w(Sendrecv)p 454 1350 V 16 w(replace\(void*)f(buf,)i(int)f(count,)g(MPI)p 1258 1350 V 17 w(Datatype)g(datatype,)393 1407 y(int)h(dest,)f(int)g (sendtag,)g(int)g(source,)g(int)h(recvtag,)f(MPI)p 1614 1407 V 16 w(Comm)h(comm,)393 1463 y(MPI)p 468 1463 V 17 w(Status)f(*status\))75 1550 y(MPI)p 150 1550 V 17 w(SENDRECV)p 359 1550 V 16 w(REPLACE\(BUF,)f(COUNT,)h(DATATYPE,)g (DEST,)g(SENDTAG,)g(SOURCE,)g(RECVTAG,)393 1606 y(COMM,)g(STATUS,)g (IERROR\))170 1662 y()g(BUF\(*\))170 1719 y(INTEGER)g(COUNT,)g (DATATYPE,)g(DEST,)g(SENDTAG,)g(SOURCE,)g(RECVTAG,)g(COMM,)170 1775 y(STATUS\(MPI)p 413 1775 V 16 w(STATUS)p 573 1775 V 17 w(SIZE\),)g(IERROR)166 1862 y Fu(Execute)18 b(a)f(blo)q(c)o(king)i (send)f(and)g(receiv)o(e.)27 b(The)18 b(same)f(bu\013er)h(is)g(used)g (b)q(oth)f(for)g(the)h(send)g(and)75 1918 y(for)d(the)g(receiv)o(e,)h (so)e(that)h(the)g(message)g(sen)o(t)g(is)h(replaced)g(b)o(y)f(the)g (message)g(receiv)o(ed.)166 1975 y(The)d(seman)o(tics)h(of)f(a)g (send-receiv)o(e)i(op)q(eration)e(is)h(what)e(w)o(ould)i(b)q(e)g (obtained)g(if)g(the)f(caller)h(fork)o(ed)75 2031 y(t)o(w)o(o)j (concurren)o(t)h(threads,)g(one)g(to)f(execute)i(the)f(send,)g(and)h (one)f(to)f(execute)i(the)f(receiv)o(e,)h(follo)o(w)o(ed)75 2088 y(b)o(y)d(a)g(join)h(of)e(these)i(t)o(w)o(o)e(threads.)189 2179 y Fj(A)n(dvic)n(e)d(to)h(implementors.)37 b Fu(Additional)12 b(in)o(termediate)f(bu\013ering)g(is)g(needed)h(for)e(the)h(\\replace") 189 2235 y(v)m(arian)o(t.)19 b(\()p Fj(End)d(of)g(advic)n(e)h(to)f (implementors.)p Fu(\))75 2376 y Fr(1.11)59 b(Null)21 b(p)n(ro)r(cesses)75 2478 y Fu(In)15 b(man)o(y)e(instances,)i(it)f(is)h (con)o(v)o(enien)o(t)g(to)e(sp)q(ecify)j(a)d(\\dumm)o(y")h(source)g(or) g(destination)h(for)e(comm)o(u-)75 2534 y(nication.)23 b(This)16 b(simpli\014es)i(the)e(co)q(de)g(that)g(is)g(needed)h(for)e (dealing)i(with)f(b)q(oundaries,)h(for)e(example,)75 2591 y(in)h(the)f(case)h(of)e(a)h(non-circular)i(shift)e(done)h(with)g (calls)g(to)e(send-receiv)o(e.)166 2647 y(The)f(sp)q(ecial)h(v)m(alue) 25 b Fh(MPI)p 605 2647 13 2 v 14 w(PROC)p 731 2647 V 13 w(NULL)14 b Fu(can)e(b)q(e)h(used)g(instead)g(of)f(a)g(rank)g (wherev)o(er)h(a)f(source)g(or)g(a)75 2704 y(destination)j(argumen)o(t) e(is)h(required)i(in)e(a)g(call.)21 b(A)14 b(comm)o(unication)g(with)h (pro)q(cess)26 b Fh(MPI)p 1634 2704 V 15 w(PROC)p 1761 2704 V 13 w(NULL)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 46 48 46 47 bop 75 -100 a Fu(46)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(has)11 b(no)h(e\013ect.)18 b(A)12 b(send)g(to)21 b Fh(MPI)p 633 45 13 2 v 15 w(PROC)p 760 45 V 13 w(NULL)13 b Fu(succeeds)f(and)g (returns)f(as)g(so)q(on)h(as)f(p)q(ossible.)20 b(A)12 b(receiv)o(e)75 102 y(from)24 b Fh(MPI)p 269 102 V 14 w(PROC)p 395 102 V 13 w(NULL)14 b Fu(succeeds)g(and)f(returns)f(as)h (so)q(on)f(as)h(p)q(ossible)h(with)f(no)g(mo)q(di\014cations)h(to)e (the)75 158 y(receiv)o(e)17 b(bu\013er.)22 b(When)17 b(a)e(receiv)o(e)i(with)g Fq(source)f Fu(=)31 b Fh(MPI)p 1080 158 V 15 w(PROC)p 1207 158 V 13 w(NULL)17 b Fu(is)f(executed)h (then)g(the)f(status)75 214 y(ob)s(ject)f(returns)30 b Fq(source)16 b Fu(=)29 b Fh(MPI)p 661 214 V 14 w(PROC)p 787 214 V 14 w(NULL)p Fu(,)15 b Fq(tag)g Fu(=)30 b Fh(MPI)p 1147 214 V 14 w(ANY)p 1246 214 V 15 w(T)m(A)o(G)14 b Fu(and)h Fq(count)i(=)e(0)p Fu(.)75 356 y Fr(1.12)59 b(Derived)19 b(datat)n(yp)r(es)75 458 y Fu(Up)13 b(to)f(here,)h(all)h (p)q(oin)o(t)f(to)f(p)q(oin)o(t)i(comm)o(unication)f(ha)o(v)o(e)f(in)o (v)o(olv)o(ed)i(only)f(con)o(tiguous)g(bu\013ers)g(con)o(tain-)75 514 y(ing)h(a)f(sequence)i(of)e(elemen)o(ts)i(of)e(the)g(same)h(t)o(yp) q(e.)19 b(This)14 b(is)g(to)q(o)f(constraining)h(on)g(t)o(w)o(o)e (accoun)o(ts.)19 b(One)75 571 y(often)d(w)o(an)o(ts)f(to)g(pass)h (messages)f(that)h(con)o(tain)g(v)m(alues)h(with)f(di\013eren)o(t)h (datat)o(yp)q(es)e(\(e.g.,)g(an)h(in)o(teger)75 627 y(coun)o(t,)e (follo)o(w)o(ed)g(b)o(y)g(a)g(sequence)h(of)e(real)i(n)o(um)o(b)q (ers\);)f(and)g(one)g(often)g(w)o(an)o(ts)f(to)g(send)i(noncon)o (tiguous)75 684 y(data)k(\(e.g.,)g(a)g(sub-blo)q(c)o(k)i(of)e(a)h (matrix\).)32 b(One)20 b(solution)h(is)f(to)f(pac)o(k)g(noncon)o (tiguous)h(data)f(in)o(to)g(a)75 740 y(con)o(tiguous)e(bu\013er)h(at)e (the)i(sender)g(site)f(and)h(unpac)o(k)f(it)h(bac)o(k)f(at)g(the)g (receiv)o(er)h(site.)27 b(This)18 b(has)f(the)75 796 y(disadv)m(an)o(tage)12 b(of)g(requiring)h(additional)h (memory-to-memory)d(cop)o(y)h(op)q(erations)g(at)g(b)q(oth)g(sites,)h (ev)o(en)75 853 y(when)j(the)g(comm)o(unication)g(subsystem)g(has)f (scatter-gather)g(capabilities.)24 b(Instead,)15 b Fq(MPI)g Fu(pro)o(vides)75 909 y(mec)o(hanisms)h(to)f(sp)q(ecify)i(more)f (general,)g(mixed,)g(and)g(noncon)o(tiguous)g(comm)o(unication)h (bu\013ers.)k(It)75 966 y(is)16 b(up)g(to)f(the)h(implemen)o(tation)h (to)e(decide)i(whether)f(data)f(should)h(b)q(e)g(\014rst)g(pac)o(k)o (ed)f(in)i(a)e(con)o(tiguous)75 1022 y(bu\013er)c(b)q(efore)h(b)q(eing) h(transmitted,)e(or)g(whether)h(it)g(can)f(b)q(e)h(collected)i (directly)e(from)f(where)h(it)f(resides.)166 1079 y(The)j(general)h (mec)o(hanisms)g(pro)o(vided)g(here)f(allo)o(w)h(one)f(to)g(transfer)f (directly)l(,)j(without)e(cop)o(ying,)75 1135 y(ob)s(jects)j(of)h(v)m (arious)h(shap)q(e)f(and)h(size.)29 b(It)18 b(is)h(not)f(assumed)g (that)f(the)h Fq(MPI)g Fu(library)h(is)f(cognizan)o(t)g(of)75 1192 y(the)d(ob)s(jects)f(declared)i(in)g(the)f(host)f(language.)20 b(Th)o(us,)15 b(if)g(one)g(w)o(an)o(ts)f(to)g(transfer)g(a)g (structure,)h(or)f(an)75 1248 y(arra)o(y)g(section,)h(it)g(will)h(b)q (e)f(necessary)g(to)g(pro)o(vide)g(in)g Fq(MPI)g Fu(a)f(de\014nition)j (of)d(a)g(comm)o(unication)i(bu\013er)75 1305 y(that)d(mimics)j(the)e (de\014nition)i(of)e(the)g(structure)g(or)f(arra)o(y)g(section)i(in)g (question.)20 b(These)15 b(facilities)h(can)75 1361 y(b)q(e)j(used)g(b) o(y)f(library)h(designers)h(to)d(de\014ne)j(comm)o(unication)f (functions)g(that)f(can)g(transfer)g(ob)s(jects)75 1417 y(de\014ned)e(in)g(the)f(host)f(language)h(|)g(b)o(y)g(deco)q(ding)h (their)f(de\014nitions)i(as)d(a)o(v)m(ailable)i(in)g(a)e(sym)o(b)q(ol)i (table)75 1474 y(or)f(a)g(dop)q(e)g(v)o(ector.)20 b(Suc)o(h)15 b(higher-lev)o(el)j(comm)o(unication)e(functions)g(are)f(not)g(part)f (of)h Fq(MPI)p Fu(.)166 1530 y(More)d(general)g(comm)o(unication)i (bu\013ers)e(are)g(sp)q(eci\014ed)i(b)o(y)f(replacing)g(the)g(basic)g (datat)o(yp)q(es)f(that)75 1587 y(ha)o(v)o(e)e(b)q(een)i(used)f(so)f (far)g(with)h(deriv)o(ed)g(datat)o(yp)q(es)f(that)g(are)g(constructed)g (from)g(basic)h(datat)o(yp)q(es)f(using)75 1643 y(the)j(constructors)e (describ)q(ed)j(in)g(this)f(section.)19 b(These)13 b(metho)q(ds)f(of)g (constructing)h(deriv)o(ed)h(datat)o(yp)q(es)75 1700 y(can)h(b)q(e)h(applied)h(recursiv)o(ely)l(.)166 1756 y(A)e Fp(general)j(datat)o(yp)q(e)e Fu(is)g(an)f(opaque)h(ob)s(ject)e (that)h(sp)q(eci\014es)i(t)o(w)o(o)d(things:)143 1843 y Fi(\017)23 b Fu(A)15 b(sequence)h(of)f(basic)h(datat)o(yp)q(es)143 1933 y Fi(\017)23 b Fu(A)15 b(sequence)h(of)f(in)o(teger)g(\(b)o(yte\)) g(displacemen)o(ts)166 2020 y(The)22 b(displacemen)o(ts)g(are)g(not)f (required)h(to)f(b)q(e)h(p)q(ositiv)o(e,)i(distinct,)g(or)d(in)h (increasing)h(order.)75 2076 y(Therefore,)15 b(the)g(order)h(of)e (items)i(need)g(not)f(coincide)j(with)d(their)h(order)g(in)g(store,)e (and)i(an)f(item)h(ma)o(y)75 2133 y(app)q(ear)j(more)g(than)g(once.)33 b(W)l(e)19 b(call)i(suc)o(h)e(a)g(pair)h(of)f(sequences)h(\(or)f (sequence)h(of)f(pairs\))g(a)g Fp(t)o(yp)q(e)75 2189 y(map)p Fu(.)24 b(The)17 b(sequence)h(of)f(basic)g(datat)o(yp)q(es)f (\(displacemen)o(ts)i(ignored\))f(is)g(the)g Fp(t)o(yp)q(e)i(signature) e Fu(of)75 2245 y(the)e(datat)o(yp)q(e.)166 2302 y(Let)189 2388 y Fg(T)6 b(y)r(pemap)12 b Fu(=)h Fi(f)p Fu(\()p Fg(ty)r(pe)562 2395 y Fe(0)581 2388 y Fg(;)8 b(disp)686 2395 y Fe(0)705 2388 y Fu(\))p Fg(;)g(:::;)g Fu(\()o Fg(ty)r(pe)905 2395 y Fd(n)p Ff(\000)p Fe(1)971 2388 y Fg(;)g(disp)1076 2395 y Fd(n)p Ff(\000)p Fe(1)1144 2388 y Fu(\))p Fi(g)p Fg(;)75 2475 y Fu(b)q(e)16 b(suc)o(h)f(a)g(t)o (yp)q(e)h(map,)e(where)i Fg(ty)r(pe)709 2482 y Fd(i)738 2475 y Fu(are)f(basic)h(t)o(yp)q(es,)f(and)g Fg(disp)1233 2482 y Fd(i)1262 2475 y Fu(are)g(displacemen)o(ts.)21 b(Let)189 2561 y Fg(T)6 b(y)r(pesig)13 b Fu(=)g Fi(f)p Fg(ty)r(pe)517 2568 y Fe(0)537 2561 y Fg(;)8 b(:::;)g(ty)r(pe)702 2568 y Fd(n)p Ff(\000)p Fe(1)768 2561 y Fi(g)75 2647 y Fu(b)q(e)14 b(the)f(asso)q(ciated)h(t)o(yp)q(e)f(signature.)19 b(This)14 b(t)o(yp)q(e)f(map,)g(together)g(with)g(a)g(base)g(address)h Fj(buf)p Fu(,)f(sp)q(eci\014es)75 2704 y(a)19 b(comm)o(unication)i (bu\013er:)28 b(the)20 b(comm)o(unication)h(bu\013er)e(that)g(consists) h(of)f Fg(n)h Fu(en)o(tries,)h(where)f(the)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 47 49 47 48 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(47)75 45 y Fg(i)p Fu(-th)16 b(en)o(try)f(is)i(at)e(address)h Fg(buf)f Fu(+)c Fg(disp)763 52 y Fd(i)793 45 y Fu(and)16 b(has)g(t)o(yp)q(e)g Fg(ty)r(pe)1151 52 y Fd(i)1165 45 y Fu(.)23 b(A)16 b(message)f(assem)o(bled)i(from)e(suc)o(h)h(a)75 102 y(comm)o(unication)g(bu\013er)f(will)i(consist)e(of)g Fg(n)h Fu(v)m(alues,)g(of)e(the)i(t)o(yp)q(es)f(de\014ned)h(b)o(y)g Fg(T)6 b(y)r(pesig)r Fu(.)166 158 y(W)l(e)11 b(can)f(use)h(a)f(handle)i (to)e(a)g(general)h(datat)o(yp)q(e)f(as)h(an)f(argumen)o(t)g(in)h(a)f (send)i(or)e(receiv)o(e)h(op)q(eration,)75 214 y(instead)h(of)e(a)h (basic)g(datat)o(yp)q(e)g(argumen)o(t.)18 b(The)11 b(op)q(eration)g Fq(MPI)p 1198 214 14 2 v 16 w(SEND\(buf,)h(1,)f(datat)o(yp)q(e,...\))19 b Fu(will)13 b(use)75 271 y(the)18 b(send)g(bu\013er)f(de\014ned)i(b)o (y)e(the)h(base)f(address)h Fq(buf)g Fu(and)g(the)f(general)h(datat)o (yp)q(e)f(asso)q(ciated)h(with)75 327 y Fq(datat)o(yp)q(e)p Fu(;)23 b(it)c(will)i(generate)f(a)f(message)g(with)g(the)h(t)o(yp)q(e) f(signature)h(determined)h(b)o(y)e(the)g Fq(datat)o(yp)q(e)75 384 y Fu(argumen)o(t.)28 b Fq(MPI)p 390 384 V 16 w(RECV\(buf,)20 b(1,)e(datat)o(yp)q(e,...\))29 b Fu(will)20 b(use)e(the)h(receiv)o(e)g (bu\013er)f(de\014ned)h(b)o(y)g(the)f(base)75 440 y(address)d Fq(buf)h Fu(and)g(the)f(general)h(datat)o(yp)q(e)e(asso)q(ciated)i (with)f Fq(datat)o(yp)q(e)p Fu(.)166 497 y(General)h(datat)o(yp)q(es)f (can)h(b)q(e)h(used)f(in)h(all)g(send)f(and)h(receiv)o(e)f(op)q (erations.)22 b(W)l(e)16 b(discuss,)h(in)g(Sec.)75 553 y(1.12.5,)c(the)i(case)g(where)h(the)f(second)h(argumen)o(t)e Fq(count)j Fu(has)e(v)m(alue)h Fg(>)d Fu(1.)166 610 y(The)e(basic)g (datat)o(yp)q(es)f(presen)o(ted)i(in)f(section)g(1.2.2)f(are)g (particular)h(cases)g(of)f(a)h(general)g(datat)o(yp)q(e,)75 666 y(and)19 b(are)f(prede\014ned.)32 b(Th)o(us,)19 b Fq(MPI)p 711 666 V 16 w(INT)f Fu(is)h(a)g(prede\014ned)h(handle)g(to)e (a)g(datat)o(yp)q(e)g(with)h(t)o(yp)q(e)g(map)75 723 y Fi(f)p Fu(\()p Fq(int)p Fg(;)8 b Fu(0\))p Fi(g)p Fu(,)13 b(with)j(one)g(en)o(try)f(of)g(t)o(yp)q(e)g Fq(int)h Fu(and)g(displacemen)o(t)h(zero.)j(The)15 b(other)g(basic)i(datat)o(yp) q(es)d(are)75 779 y(similar.)166 835 y(The)h Fp(exten)o(t)f Fu(of)g(a)g(datat)o(yp)q(e)g(is)h(de\014ned)g(to)f(b)q(e)h(the)g(span)f (from)g(the)g(\014rst)g(b)o(yte)h(to)e(the)i(last)f(b)o(yte)75 892 y(o)q(ccupied)19 b(b)o(y)d(en)o(tries)h(in)h(this)f(datat)o(yp)q (e,)f(rounded)h(up)g(to)f(satisfy)h(alignmen)o(t)g(requiremen)o(ts.)25 b(That)75 948 y(is,)15 b(if)189 1042 y Fg(T)6 b(y)r(pemap)12 b Fu(=)h Fi(f)p Fu(\()p Fg(ty)r(pe)562 1049 y Fe(0)581 1042 y Fg(;)8 b(disp)686 1049 y Fe(0)705 1042 y Fu(\))p Fg(;)g(:::;)g Fu(\()o Fg(ty)r(pe)905 1049 y Fd(n)p Ff(\000)p Fe(1)971 1042 y Fg(;)g(disp)1076 1049 y Fd(n)p Ff(\000)p Fe(1)1144 1042 y Fu(\))p Fi(g)p Fg(;)75 1136 y Fu(then)1774 b Fi(>)283 1230 y Fg(l)q(b)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))40 b(=)h(min)688 1259 y Fd(j)742 1230 y Fg(disp)826 1237 y Fd(j)844 1230 y Fg(;)272 1320 y(ub)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))40 b(=)h(max)693 1349 y Fd(j)743 1320 y Fu(\()p Fg(disp)845 1327 y Fd(j)873 1320 y Fu(+)10 b Fg(siz)r(eof)5 b Fu(\()p Fg(ty)r(pe)1150 1327 y Fd(j)1169 1320 y Fu(\)\))k(+)i Fg(\017;)22 b Fu(and)189 1410 y Fg(extent)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))42 b(=)f Fg(ub)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))j Fi(\000)h Fg(l)q(b)p Fu(\()p Fg(T)c(y)r(pemap)p Fu(\))p Fg(:)528 b Fu(\(1.1\))75 1504 y(If)17 b Fg(ty)r(pe)206 1511 y Fd(i)237 1504 y Fu(requires)g(alignmen)o(t)g(to)f(a)h(b)o(yte)f (address)h(that)f(is)h(is)g(a)f(m)o(ultiple)j(of)d Fg(k)1474 1511 y Fd(i)1488 1504 y Fu(,)g(then)h Fg(\017)g Fu(is)g(the)g(least)75 1560 y(nonnegativ)o(e)e(incremen)o(t)g(needed)g(to)f(round)g Fg(extent)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))15 b(to)e(the)h(next)h (m)o(ultiple)h(of)d(max)1783 1567 y Fd(i)1805 1560 y Fg(k)1829 1567 y Fd(i)1843 1560 y Fu(.)81 b Fi(?)75 1667 y Fp(Example)18 b(1.19)23 b Fu(Assume)12 b(that)g Fg(T)6 b(y)r(pe)13 b Fu(=)g Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fi(g)j Fu(\(a)h Fq(double)i Fu(at)e(displacemen)o(t)i(zero,)75 1723 y(follo)o(w)o(ed)k(b)o(y)g(a)f Fq(cha)o(r)g Fu(at)g(displacemen)o (t)j(eigh)o(t\).)27 b(Assume,)18 b(furthermore,)f(that)g(doubles)i(ha)o (v)o(e)e(to)g(b)q(e)75 1780 y(strictly)d(aligned)g(at)e(addresses)i (that)e(are)h(m)o(ultiples)h(of)f(eigh)o(t.)19 b(Then,)14 b(the)f(exten)o(t)g(of)f(this)i(datat)o(yp)q(e)e(is)75 1836 y(16)e(\(9)g(rounded)h(to)f(the)h(next)g(m)o(ultiple)h(of)f(8\).) 17 b(A)11 b(datat)o(yp)q(e)f(that)g(consists)h(of)f(a)g(c)o(haracter)g (immediately)75 1893 y(follo)o(w)o(ed)16 b(b)o(y)f(a)g(double)h(will)h (also)e(ha)o(v)o(e)g(an)g(exten)o(t)g(of)g(16.)189 1999 y Fj(R)n(ationale.)39 b Fu(The)15 b(de\014nition)h(of)e(exten)o(t)g(is) h(motiv)m(ated)f(b)o(y)h(the)f(assumption)h(that)e(the)i(amoun)o(t)189 2055 y(of)i(padding)i(added)g(at)e(the)h(end)g(of)g(eac)o(h)g (structure)f(in)i(an)f(arra)o(y)e(of)i(structures)f(is)i(the)f(least) 189 2112 y(needed)d(to)e(ful\014ll)j(alignmen)o(t)e(constrain)o(ts.)19 b(More)14 b(explicit)i(con)o(trol)d(of)g(the)h(exten)o(t)g(is)g(pro)o (vided)189 2168 y(in)i(section)g(1.12.3.)k(Suc)o(h)c(explicit)i(con)o (trol)e(is)g(needed)h(in)f(cases)g(where)g(the)g(assumption)g(do)q(es) 189 2225 y(not)e(hold,)i(for)f(example,)g(where)h(union)g(t)o(yp)q(es)f (are)g(used.)21 b(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))75 2346 y Fl(1.12.1)49 b(Datat)o(yp)q(e)17 b(constructo)o(rs)75 2432 y Fq(Contiguous)47 b Fu(The)16 b(simplest)i(datat)o(yp)q(e)e (constructor)f(is)i Fq(MPI)p 1171 2432 V 16 w(TYPE)p 1304 2432 V 17 w(CONTIGUOUS)h Fu(whic)o(h)f(allo)o(ws)75 2489 y(replication)g(of)e(a)g(datat)o(yp)q(e)f(in)o(to)h(con)o(tiguous) h(lo)q(cations.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 48 50 48 49 bop 75 -100 a Fu(48)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(TYPE)p 293 45 V 17 w(CONTIGUOUS\(count,)g(oldt)o(yp) q(e,)f(newt)o(yp)q(e\))117 122 y Fk(IN)155 b Fq(count)482 b Fk(replication)14 b(coun)o(t)g(\(nonnegativ)o(e)g(in)o(teger\))117 194 y(IN)155 b Fq(oldt)o(yp)q(e)450 b Fk(old)13 b(datat)o(yp)q(e)i (\(handle\))117 266 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 390 y Fo(int)23 b(MPI)p 245 390 15 2 v 17 w(Type)p 358 390 V 17 w(contiguous\(int)f (count,)h(MPI)p 972 390 V 17 w(Datatype)f(oldtype,)393 447 y(MPI)p 468 447 V 17 w(Datatype)h(*newtype\))75 533 y(MPI)p 150 533 V 17 w(TYPE)p 263 533 V 16 w(CONTIGUOUS\(COUNT,)f (OLDTYPE,)h(NEWTYPE,)f(IERROR\))170 589 y(INTEGER)h(COUNT,)g(OLDTYPE,)g (NEWTYPE,)g(IERROR)166 676 y Fq(newt)o(yp)q(e)c Fu(is)f(the)f(datat)o (yp)q(e)g(obtained)h(b)o(y)f(concatenating)h Fq(count)h Fu(copies)f(of)f Fq(oldt)o(yp)q(e)p Fu(.)27 b(Concate-)75 732 y(nation)15 b(is)h(de\014ned)h(using)f Fj(extent)e Fu(as)h(the)h(size)g(of)e(the)i(concatenated)f(copies.)75 814 y Fp(Example)j(1.20)23 b Fu(Let)17 b Fq(oldt)o(yp)q(e)g Fu(ha)o(v)o(e)g(t)o(yp)q(e)g(map)f Fi(f)p Fu(\()p Fq(double)q Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fi(g)p Fg(;)15 b Fu(with)i(exten)o(t)f(16,)h(and)f(let)75 871 y Fq(count)e Fu(=)f(3.)19 b(The)d(t)o(yp)q(e)f(map)g(of)g(the)g (datat)o(yp)q(e)g(returned)g(b)o(y)h Fq(newt)o(yp)q(e)h Fu(is)189 947 y Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fu(16\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(24\))p Fg(;)g Fu(\()p Fq(double)n Fg(;)g Fu(32\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(40\))p Fi(g)p Fu(;)75 1024 y(i.e.,)15 b(alternating)g Fq(double)i Fu(and)e Fq(cha)o(r)g Fu(elemen)o(ts,)h(with)f(displacemen)o(ts)i(0)p Fg(;)8 b Fu(8)p Fg(;)g Fu(16)p Fg(;)f Fu(24)p Fg(;)g Fu(32)o Fg(;)h Fu(4)o(0.)166 1189 y(In)16 b(general,)f(assume)g(that)g (the)g(t)o(yp)q(e)g(map)g(of)g Fq(oldt)o(yp)q(e)h Fu(is)189 1265 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1272 y Fe(0)333 1265 y Fg(;)8 b(disp)438 1272 y Fe(0)457 1265 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1272 y Fd(n)p Ff(\000)p Fe(1)723 1265 y Fg(;)h(disp)828 1272 y Fd(n)p Ff(\000)p Fe(1)895 1265 y Fu(\))p Fi(g)p Fg(;)75 1342 y Fu(with)16 b(exten)o(t)e Fg(ex)p Fu(.)20 b(Then)c Fq(newt)o(yp)q(e)h Fu(has)e(a)g(t)o(yp)q(e)g(map)g(with)h Fq(count)11 b Fi(\001)f Fq(n)16 b Fu(en)o(tries)f(de\014ned)i(b)o(y:)189 1418 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1425 y Fe(0)333 1418 y Fg(;)8 b(disp)438 1425 y Fe(0)457 1418 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1425 y Fd(n)p Ff(\000)p Fe(1)723 1418 y Fg(;)h(disp)828 1425 y Fd(n)p Ff(\000)p Fe(1)895 1418 y Fu(\))p Fg(;)g Fu(\()p Fg(ty)r(pe)1036 1425 y Fe(0)1055 1418 y Fg(;)g(disp)1160 1425 y Fe(0)1189 1418 y Fu(+)i Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)1482 1425 y Fd(n)p Ff(\000)p Fe(1)1548 1418 y Fg(;)g(disp)1653 1425 y Fd(n)p Ff(\000)p Fe(1)1730 1418 y Fu(+)j Fg(ex)p Fu(\))p Fg(;)189 1500 y(:::;)d Fu(\()p Fg(ty)r(pe)351 1507 y Fe(0)368 1500 y Fg(;)g(disp)473 1507 y Fe(0)502 1500 y Fu(+)i Fg(ex)h Fi(\001)e Fu(\()p Fq(count)j Fi(\000)e Fu(1\)\))p Fg(;)e(:::;)f Fu(\()p Fg(ty)r(pe)1048 1507 y Fd(n)p Ff(\000)p Fe(1)1114 1500 y Fg(;)h(disp)1219 1507 y Fd(n)p Ff(\000)p Fe(1)1296 1500 y Fu(+)j Fg(ex)f Fi(\001)g Fu(\()p Fq(count)h Fi(\000)f Fu(1\)\))p Fi(g)p Fg(:)75 1726 y Fq(V)o(ecto)o(r)45 b Fu(The)16 b(function)g Fq(MPI)p 600 1726 14 2 v 16 w(TYPE)p 733 1726 V 17 w(VECTOR)g Fu(is)g(a)f(more)g(general)h(constructor)e(that)h(allo)o(ws)g(repli-)75 1782 y(cation)20 b(of)g(a)g(datat)o(yp)q(e)f(in)o(to)h(lo)q(cations)h (that)e(consist)i(of)e(equally)j(spaced)f(blo)q(c)o(ks.)35 b(Eac)o(h)20 b(blo)q(c)o(k)g(is)75 1838 y(obtained)g(b)o(y)f (concatenating)h(the)f(same)g(n)o(um)o(b)q(er)h(of)f(copies)h(of)f(the) g(old)h(datat)o(yp)q(e.)32 b(The)19 b(spacing)75 1895 y(b)q(et)o(w)o(een)d(blo)q(c)o(ks)f(is)h(a)f(m)o(ultiple)i(of)e(the)g (exten)o(t)g(of)g(the)g(old)h(datat)o(yp)q(e.)75 2046 y Fq(MPI)p 160 2046 V 16 w(TYPE)p 293 2046 V 17 w(VECTOR\()g(count,)g (blo)q(cklength,)g(stride,)g(oldt)o(yp)q(e,)g(newt)o(yp)q(e\))117 2123 y Fk(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(blo)q(c)o(ks)g(\(nonnegativ)o(e)f(in)o(teger\))117 2195 y(IN)155 b Fq(blo)q(cklength)371 b Fk(n)o(um)o(b)q(er)16 b(of)h(elemen)o(ts)g(in)f(eac)o(h)i(blo)q(c)o(k)e(\(nonnegativ)o(e)h (in)o(te-)905 2251 y(ger\))117 2323 y(IN)155 b Fq(stride)484 b Fk(n)o(um)o(b)q(er)13 b(of)f(elemen)o(ts)h(b)q(et)o(w)o(een)h(start)g (of)f(eac)o(h)g(blo)q(c)o(k)g(\(in)o(te-)905 2379 y(ger\))117 2451 y(IN)155 b Fq(oldt)o(yp)q(e)450 b Fk(old)13 b(datat)o(yp)q(e)i (\(handle\))117 2523 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 2647 y Fo(int)23 b(MPI)p 245 2647 15 2 v 17 w(Type)p 358 2647 V 17 w(vector\(int)f (count,)h(int)h(blocklength,)e(int)i(stride,)393 2704 y(MPI)p 468 2704 V 17 w(Datatype)f(oldtype,)f(MPI)p 986 2704 V 17 w(Datatype)h(*newtype\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 49 51 49 50 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(49)75 45 y Fo(MPI)p 150 45 15 2 v 17 w(TYPE)p 263 45 V 16 w(VECTOR\(COUNT,)22 b(BLOCKLENGTH,)h(STRIDE,)g(OLDTYPE,)f (NEWTYPE,)h(IERROR\))170 102 y(INTEGER)g(COUNT,)g(BLOCKLENGTH,)g (STRIDE,)g(OLDTYPE,)f(NEWTYPE,)h(IERROR)75 238 y Fp(Example)18 b(1.21)23 b Fu(Assume,)15 b(again,)f(that)h Fq(oldt)o(yp)q(e)h Fu(has)f(t)o(yp)q(e)g(map)g Fi(f)p Fu(\()p Fq(double)q Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fi(g)p Fg(;)13 b Fu(with)j(ex-)75 294 y(ten)o(t)g(16.)21 b(A)c(call)g(to)e Fq(MPI)p 527 294 14 2 v 16 w(TYPE)p 660 294 V 17 w(VECTOR\()i(2,)e(3,)h(4,)f(oldt)o(yp)q(e,)i(newt)o(yp)q (e\))h Fu(will)g(create)d(the)h(datat)o(yp)q(e)75 351 y(with)g(t)o(yp)q(e)f(map,)189 445 y Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fu(16\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(24\))p Fg(;)g Fu(\()p Fq(double)n Fg(;)g Fu(32\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(40\))p Fg(;)189 551 y Fu(\()p Fq(double)q Fg(;)g Fu(64\))p Fg(;)g Fu(\()p Fq(cha)o(r)m Fg(;)g Fu(72\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fu(80\))p Fg(;)g Fu(\()p Fq(cha)o(r)m Fg(;)g Fu(88\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fu(96\))p Fg(;)g Fu(\()p Fq(cha)o(r)m Fg(;)g Fu(104\))p Fi(g)p Fg(:)75 657 y Fu(That)13 b(is,)h(t)o(w)o(o)e(blo)q(c)o(ks)j (with)e(three)h(copies)h(eac)o(h)e(of)g(the)h(old)g(t)o(yp)q(e,)g(with) g(a)f(stride)h(of)f(4)h(elemen)o(ts)g(\(4)7 b Fi(\001)g Fu(16)75 714 y(b)o(ytes\))15 b(b)q(et)o(w)o(een)g(the)g(blo)q(c)o(ks.) 75 820 y Fp(Example)j(1.22)23 b Fu(A)c(call)i(to)d Fq(MPI)p 692 820 V 16 w(TYPE)p 825 820 V 17 w(VECTOR\(3,)j(1,)e(-2,)h(oldt)o(yp) q(e,)i(newt)o(yp)q(e\))f Fu(will)g(create)e(the)75 876 y(datat)o(yp)q(e,)189 970 y Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fi(\000)p Fu(32\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fi(\000)p Fu(24\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fi(\000)p Fu(64\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fi(\000)p Fu(56\))p Fi(g)p Fg(:)166 1159 y Fu(In)16 b(general,)f(assume)g(that)g Fq(oldt)o(yp)q(e)h Fu(has)f(t)o(yp)q(e)g(map,)189 1253 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1260 y Fe(0)333 1253 y Fg(;)8 b(disp)438 1260 y Fe(0)457 1253 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1260 y Fd(n)p Ff(\000)p Fe(1)723 1253 y Fg(;)h(disp)828 1260 y Fd(n)p Ff(\000)p Fe(1)895 1253 y Fu(\))p Fi(g)p Fg(;)75 1347 y Fu(with)14 b(exten)o(t)f Fg(ex)p Fu(.)19 b(Let)13 b Fq(bl)h Fu(b)q(e)g(the)f Fq(blo)q(cklength)p Fu(.)21 b(The)14 b(newly)g(created)f(datat)o(yp)q(e)g(has)g(a)g(t)o(yp) q(e)h(map)f(with)75 1403 y Fq(count)e Fi(\001)f Fq(bl)h Fi(\001)e Fg(n)16 b Fu(en)o(tries:)189 1497 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1504 y Fe(0)333 1497 y Fg(;)8 b(disp)438 1504 y Fe(0)457 1497 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1504 y Fd(n)p Ff(\000)p Fe(1)723 1497 y Fg(;)h(disp)828 1504 y Fd(n)p Ff(\000)p Fe(1)895 1497 y Fu(\))p Fg(;)189 1603 y Fu(\()p Fg(ty)r(pe)291 1610 y Fe(0)310 1603 y Fg(;)g(disp)415 1610 y Fe(0)444 1603 y Fu(+)i Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)737 1610 y Fd(n)p Ff(\000)p Fe(1)803 1603 y Fg(;)g(disp)908 1610 y Fd(n)p Ff(\000)p Fe(1)985 1603 y Fu(+)j Fg(ex)p Fu(\))p Fg(;)d(:::;)189 1709 y Fu(\()p Fg(ty)r(pe)291 1716 y Fe(0)310 1709 y Fg(;)g(disp)415 1716 y Fe(0)444 1709 y Fu(+)i(\()p Fq(bl)g Fi(\000)h Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)918 1716 y Fd(n)p Ff(\000)p Fe(1)984 1709 y Fg(;)g(disp)1089 1716 y Fd(n)p Ff(\000)p Fe(1)1166 1709 y Fu(+)j(\()p Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)g Fg(ex)p Fu(\))p Fg(;)189 1816 y Fu(\()p Fg(ty)r(pe)291 1823 y Fe(0)310 1816 y Fg(;)e(disp)415 1823 y Fe(0)444 1816 y Fu(+)i Fq(stride)h Fi(\001)f Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)874 1823 y Fd(n)p Ff(\000)p Fe(1)940 1816 y Fg(;)g(disp)1045 1823 y Fd(n)p Ff(\000)p Fe(1)1122 1816 y Fu(+)j Fq(stride)g Fi(\001)e Fg(ex)p Fu(\))p Fg(;)f(:::;)189 1922 y Fu(\()p Fg(ty)r(pe)291 1929 y Fe(0)310 1922 y Fg(;)g(disp)415 1929 y Fe(0)444 1922 y Fu(+)i(\()p Fq(stride)h Fu(+)g Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)g Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()o Fg(ty)r(pe)1077 1929 y Fd(n)p Ff(\000)p Fe(1)1143 1922 y Fg(;)g(disp)1248 1929 y Fd(n)p Ff(\000)p Fe(1)1326 1922 y Fu(+)i(\()p Fq(stride)h Fu(+)f Fq(bl)h Fi(\000)f Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(::::;)189 2028 y Fu(\()p Fg(ty)r(pe)291 2035 y Fe(0)310 2028 y Fg(;)g(disp)415 2035 y Fe(0)444 2028 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)g Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 2135 y Fu(\()p Fg(ty)r(pe)291 2142 y Fd(n)p Ff(\000)p Fe(1)359 2135 y Fg(;)g(disp)464 2142 y Fd(n)p Ff(\000)p Fe(1)542 2135 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)f Fu(1\))g Fi(\001)g Fg(ex)p Fu(\))p Fg(;)e(:::;)189 2241 y Fu(\()p Fg(ty)r(pe)291 2248 y Fe(0)310 2241 y Fg(;)g(disp)415 2248 y Fe(0)444 2241 y Fu(+)i(\()p Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)f Fu(1\))g(+)g Fq(bl)h Fi(\000)f Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(:::;)189 2347 y Fu(\()p Fg(ty)r(pe)291 2354 y Fd(n)p Ff(\000)p Fe(1)359 2347 y Fg(;)g(disp)464 2354 y Fd(n)p Ff(\000)p Fe(1)542 2347 y Fu(+)i(\()p Fq(stride)h Fi(\001)e Fu(\()p Fq(count)j Fi(\000)e Fu(1\))g(+)g Fq(bl)g Fi(\000)h Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fi(g)p Fg(:)166 2536 y Fu(A)16 b(call)i(to)e Fq(MPI)p 443 2536 V 16 w(TYPE)p 576 2536 V 16 w(CONTIGUOUS\(count,)k(oldt)o(yp)q(e,)d(newt)o(yp)q(e\))h Fu(is)f(equiv)m(alen)o(t)h(to)e(a)g(call)i(to)75 2592 y Fq(MPI)p 160 2592 V 16 w(TYPE)p 293 2592 V 17 w(VECTOR\(count,)g(1,)f (1,)f(oldt)o(yp)q(e,)h(newt)o(yp)q(e\))p Fu(,)h(or)e(to)g(a)h(call)g (to)f Fq(MPI)p 1495 2592 V 16 w(TYPE)p 1628 2592 V 17 w(VECTOR\(1,)75 2649 y(count,)g(n,)f(oldt)o(yp)q(e,)h(newt)o(yp)q(e\))p Fu(,)h Fq(n)e Fu(arbitrary)l(.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 50 52 50 51 bop 75 -100 a Fu(50)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(Hvecto)o(r)45 b Fu(The)19 b(function)h Fq(MPI)p 631 45 14 2 v 16 w(TYPE)p 764 45 V 17 w(HVECTOR)g Fu(is)f(iden)o(tical)i(to)d Fq(MPI)p 1389 45 V 16 w(TYPE)p 1522 45 V 17 w(VECTOR)p Fu(,)h(except)75 102 y(that)h Fq(stride)h Fu(is)f(giv)o(en)h(in)g(b)o(ytes,)g(rather)f (than)g(in)h(elemen)o(ts.)36 b(The)20 b(use)h(for)e(b)q(oth)i(t)o(yp)q (es)f(of)g(v)o(ector)75 158 y(constructors)14 b(is)i(illustrated)h(in)f (Sec.)k(1.12.8.)e(\()p Fq(H)d Fu(stands)g(for)g(\\heterogeneous"\).)75 309 y Fq(MPI)p 160 309 V 16 w(TYPE)p 293 309 V 17 w(HVECTOR\()h(count,) g(blo)q(cklength,)h(stride,)e(oldt)o(yp)q(e,)h(newt)o(yp)q(e\))117 386 y Fk(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(blo)q(c)o(ks)g(\(nonnegativ)o(e)f(in)o(teger\))117 461 y(IN)155 b Fq(blo)q(cklength)371 b Fk(n)o(um)o(b)q(er)16 b(of)h(elemen)o(ts)g(in)f(eac)o(h)i(blo)q(c)o(k)e(\(nonnegativ)o(e)h (in)o(te-)905 518 y(ger\))117 593 y(IN)155 b Fq(stride)484 b Fk(n)o(um)o(b)q(er)13 b(of)g(b)o(ytes)h(b)q(et)o(w)o(een)h(start)f (of)f(eac)o(h)h(blo)q(c)o(k)f(\(in)o(teger\))117 668 y(IN)155 b Fq(oldt)o(yp)q(e)450 b Fk(old)13 b(datat)o(yp)q(e)i (\(handle\))117 743 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 868 y Fo(int)23 b(MPI)p 245 868 15 2 v 17 w(Type)p 358 868 V 17 w(hvector\(int)f (count,)h(int)h(blocklength,)e(MPI)p 1306 868 V 17 w(Aint)h(stride,)393 924 y(MPI)p 468 924 V 17 w(Datatype)g(oldtype,)f(MPI)p 986 924 V 17 w(Datatype)h(*newtype\))75 1011 y(MPI)p 150 1011 V 17 w(TYPE)p 263 1011 V 16 w(HVECTOR\(COUNT,)f(BLOCKLENGTH,)h (STRIDE,)f(OLDTYPE,)h(NEWTYPE,)g(IERROR\))170 1067 y(INTEGER)g(COUNT,)g (BLOCKLENGTH,)g(STRIDE,)g(OLDTYPE,)f(NEWTYPE,)h(IERROR)166 1236 y Fu(Assume)15 b(that)g Fq(oldt)o(yp)q(e)h Fu(has)f(t)o(yp)q(e)g (map,)189 1330 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1337 y Fe(0)333 1330 y Fg(;)8 b(disp)438 1337 y Fe(0)457 1330 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1337 y Fd(n)p Ff(\000)p Fe(1)723 1330 y Fg(;)h(disp)828 1337 y Fd(n)p Ff(\000)p Fe(1)895 1330 y Fu(\))p Fi(g)p Fg(;)75 1424 y Fu(with)14 b(exten)o(t)f Fg(ex)p Fu(.)19 b(Let)13 b Fq(bl)h Fu(b)q(e)g(the)f Fq(blo)q(cklength)p Fu(.)21 b(The)14 b(newly)g(created)f(datat)o(yp)q(e)g(has)g(a)g(t)o(yp)q(e)h (map)f(with)75 1480 y Fq(count)e Fi(\001)f Fq(bl)h Fi(\001)e Fg(n)16 b Fu(en)o(tries:)189 1574 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1581 y Fe(0)333 1574 y Fg(;)8 b(disp)438 1581 y Fe(0)457 1574 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1581 y Fd(n)p Ff(\000)p Fe(1)723 1574 y Fg(;)h(disp)828 1581 y Fd(n)p Ff(\000)p Fe(1)895 1574 y Fu(\))p Fg(;)189 1680 y Fu(\()p Fg(ty)r(pe)291 1687 y Fe(0)310 1680 y Fg(;)g(disp)415 1687 y Fe(0)444 1680 y Fu(+)i Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)737 1687 y Fd(n)p Ff(\000)p Fe(1)803 1680 y Fg(;)g(disp)908 1687 y Fd(n)p Ff(\000)p Fe(1)985 1680 y Fu(+)j Fg(ex)p Fu(\))p Fg(;)d(:::;)189 1787 y Fu(\()p Fg(ty)r(pe)291 1794 y Fe(0)310 1787 y Fg(;)g(disp)415 1794 y Fe(0)444 1787 y Fu(+)i(\()p Fq(bl)g Fi(\000)h Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)918 1794 y Fd(n)p Ff(\000)p Fe(1)984 1787 y Fg(;)g(disp)1089 1794 y Fd(n)p Ff(\000)p Fe(1)1166 1787 y Fu(+)j(\()p Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)g Fg(ex)p Fu(\))p Fg(;)189 1893 y Fu(\()p Fg(ty)r(pe)291 1900 y Fe(0)310 1893 y Fg(;)e(disp)415 1900 y Fe(0)444 1893 y Fu(+)i Fq(stride)q Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)794 1900 y Fd(n)p Ff(\000)p Fe(1)860 1893 y Fg(;)g(disp)965 1900 y Fd(n)p Ff(\000)p Fe(1)1042 1893 y Fu(+)j Fq(stride)q Fu(\))p Fg(;)d(:::;)189 1999 y Fu(\()p Fg(ty)r(pe)291 2006 y Fe(0)310 1999 y Fg(;)g(disp)415 2006 y Fe(0)444 1999 y Fu(+)i Fq(stride)h Fu(+)g(\()p Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)g Fg(ex)p Fu(\))p Fg(;)e(:::;)189 2105 y Fu(\()p Fg(ty)r(pe)291 2112 y Fd(n)p Ff(\000)p Fe(1)359 2105 y Fg(;)g(disp)464 2112 y Fd(n)p Ff(\000)p Fe(1)542 2105 y Fu(+)i Fq(stride)h Fu(+)g(\()p Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(::::;)189 2212 y Fu(\()p Fg(ty)r(pe)291 2219 y Fe(0)310 2212 y Fg(;)g(disp)415 2219 y Fe(0)444 2212 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)g Fu(1\)\))p Fg(;)d(:::;)f Fu(\()p Fg(ty)r(pe)1047 2219 y Fd(n)p Ff(\000)p Fe(1)1113 2212 y Fg(;)h(disp)1218 2219 y Fd(n)p Ff(\000)p Fe(1)1295 2212 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)g Fu(1\)\))p Fg(;)d(:::;)189 2318 y Fu(\()p Fg(ty)r(pe)291 2325 y Fe(0)310 2318 y Fg(;)g(disp)415 2325 y Fe(0)444 2318 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)g Fu(1\))e(+)i(\()p Fq(bl)f Fi(\000)g Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(:::;)189 2424 y Fu(\()p Fg(ty)r(pe)291 2431 y Fd(n)p Ff(\000)p Fe(1)359 2424 y Fg(;)g(disp)464 2431 y Fd(n)p Ff(\000)p Fe(1)542 2424 y Fu(+)i Fq(stride)h Fi(\001)f Fu(\()p Fq(count)h Fi(\000)f Fu(1\))g(+)g(\()p Fq(bl)g Fi(\000)h Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fi(g)p Fg(:)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 51 53 51 52 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(51)75 45 y Fq(Indexed)47 b Fu(The)19 b(function)h Fq(MPI)p 629 45 14 2 v 16 w(TYPE)p 762 45 V 17 w(INDEXED)f Fu(allo)o(ws)h(replication)h(of)d(an)i(old)f(datat)o(yp)q(e)g(in)o(to)g (a)75 102 y(sequence)g(of)f(blo)q(c)o(ks)h(\(eac)o(h)f(blo)q(c)o(k)h (is)g(a)f(concatenation)g(of)g(the)g(old)h(datat)o(yp)q(e\),)e(where)i (eac)o(h)f(blo)q(c)o(k)75 158 y(can)23 b(con)o(tain)f(a)g(di\013eren)o (t)h(n)o(um)o(b)q(er)g(of)f(copies)h(and)g(ha)o(v)o(e)f(a)g(di\013eren) o(t)g(displacemen)o(t.)43 b(All)24 b(blo)q(c)o(k)75 214 y(displacemen)o(ts)17 b(are)e(m)o(ultiples)h(of)f(the)h(old)f(t)o(yp)q (e)h(exten)o(t.)75 365 y Fq(MPI)p 160 365 V 16 w(TYPE)p 293 365 V 17 w(INDEXED\()c(count,)i(a)o(rra)o(y)p 762 365 V 14 w(of)p 813 365 V 16 w(blo)q(cklengths,)h(a)o(rra)o(y)p 1185 365 V 15 w(of)p 1237 365 V 16 w(displacements,)g(oldt)o(yp)q(e,)f (newt)o(yp)q(e\))117 499 y Fk(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)34 b(of)f(blo)q(c)o(ks)h({)g(also)f(n)o(um)o(b)q(er) h(of)f(en)o(tries)i(in)905 556 y Fh(a)o(rra)o(y)p 992 556 13 2 v 15 w(of)p 1041 556 V 15 w(displacements)19 b Fk(and)f Fh(a)o(rra)o(y)p 1483 556 V 15 w(of)p 1532 556 V 15 w(blo)q(cklengths)i Fk(\(non-)905 612 y(negativ)o(e)14 b(in)o(teger\))117 686 y(IN)155 b Fq(a)o(rra)o(y)p 416 686 14 2 v 15 w(of)p 468 686 V 16 w(blo)q(cklengths)191 b Fk(n)o(um)o(b)q(er)18 b(of)f(elemen)o(ts)h(p)q(er)i(blo)q(c)o(k)d (\(arra)o(y)i(of)e(nonnegativ)o(e)905 743 y(in)o(tegers\))117 817 y(IN)155 b Fq(a)o(rra)o(y)p 416 817 V 15 w(of)p 468 817 V 16 w(displacements)164 b Fk(displacemen)o(t)19 b(for)h(eac)o(h)g(blo)q(c)o(k,)g(in)g(m)o(ultiples)e(of)h Fh(oldt)o(yp)q(e)905 873 y Fk(exten)o(t)c(\(arra)o(y)f(of)f(in)o (teger\))117 947 y(IN)155 b Fq(oldt)o(yp)q(e)450 b Fk(old)13 b(datat)o(yp)q(e)i(\(handle\))117 1021 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 1146 y Fo(int)23 b(MPI)p 245 1146 15 2 v 17 w(Type)p 358 1146 V 17 w(indexed\(int)f (count,)h(int)h(*array)p 1068 1146 V 16 w(of)p 1132 1146 V 17 w(blocklengths,)393 1202 y(int)g(*array)p 636 1202 V 16 w(of)p 700 1202 V 17 w(displacements,)e(MPI)p 1147 1202 V 17 w(Datatype)g(oldtype,)393 1259 y(MPI)p 468 1259 V 17 w(Datatype)h(*newtype\))75 1345 y(MPI)p 150 1345 V 17 w(TYPE)p 263 1345 V 16 w(INDEXED\(COUNT,)f(ARRAY)p 757 1345 V 17 w(OF)p 822 1345 V 17 w(BLOCKLENGTHS,)g(ARRAY)p 1293 1345 V 16 w(OF)p 1357 1345 V 17 w(DISPLACEMENTS,)393 1402 y(OLDTYPE,)h(NEWTYPE,)g(IERROR\))170 1458 y(INTEGER)g(COUNT,)g (ARRAY)p 651 1458 V 17 w(OF)p 716 1458 V 17 w(BLOCKLENGTHS\(*\),)e (ARRAY)p 1258 1458 V 17 w(OF)p 1323 1458 V 17 w(DISPLACEMENTS\(*\),)170 1515 y(OLDTYPE,)i(NEWTYPE,)g(IERROR)75 1644 y Fp(Example)18 b(1.23)23 b Fu(Let)14 b Fq(oldt)o(yp)q(e)h Fu(ha)o(v)o(e)f(t)o(yp)q(e)g (map)g Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fi(g)p Fg(;)k Fu(with)i(exten)o(t) g(16.)19 b(Let)14 b Fq(B)h(=)75 1700 y(\(3,)e(1\))h Fu(and)g(let)h Fq(D)f(=)g(\(4,)f(0\))p Fu(.)19 b(A)14 b(call)i(to)d Fq(MPI)p 855 1700 14 2 v 16 w(TYPE)p 988 1700 V 17 w(INDEXED\(2,)g(B,)h (D,)f(oldt)o(yp)q(e,)j(newt)o(yp)q(e\))f Fu(returns)75 1757 y(a)g(datat)o(yp)q(e)g(with)g(t)o(yp)q(e)g(map,)189 1845 y Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(64\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(72\))p Fg(;)g Fu(\()p Fq(double)n Fg(;)g Fu(80\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(88\))p Fg(;)g Fu(\()p Fq(double)n Fg(;)g Fu(96\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(104\))p Fg(;)189 1944 y Fu(\()p Fq(double)q Fg(;)g Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)m Fg(;)g Fu(8\))p Fi(g)p Fg(:)75 2044 y Fu(That)15 b(is,)i(three)f(copies)g(of)g(the)g(old)g(t)o(yp)q(e)g(starting)g(at)f (displacemen)o(t)i(64,)e(and)h(one)h(cop)o(y)e(starting)h(at)75 2100 y(displacemen)o(t)h(0.)166 2282 y(In)f(general,)f(assume)g(that)g Fq(oldt)o(yp)q(e)h Fu(has)f(t)o(yp)q(e)g(map,)189 2371 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 2378 y Fe(0)333 2371 y Fg(;)8 b(disp)438 2378 y Fe(0)457 2371 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 2378 y Fd(n)p Ff(\000)p Fe(1)723 2371 y Fg(;)h(disp)828 2378 y Fd(n)p Ff(\000)p Fe(1)895 2371 y Fu(\))p Fi(g)p Fg(;)75 2459 y Fu(with)41 b(exten)o(t)f Fj(ex)p Fu(.)96 b(Let)41 b Fq(B)g Fu(b)q(e)g(the)g Fq(a)o(rra)o(y)p 986 2459 V 14 w(of)p 1037 2459 V 16 w(blo)q(cklength)i Fu(argumen)o(t)d(and)g Fq(D)h Fu(b)q(e)g(the)75 2516 y Fq(a)o(rra)o(y)p 173 2516 V 15 w(of)p 225 2516 V 16 w(displacements)17 b Fu(argumen)o(t.)i(The)c(newly)h(created)f(datat)o (yp)q(e)g(has)g Fg(n)c Fi(\001)1450 2484 y Fc(P)1494 2497 y Fh(count)q Ff(\000)p Fe(1)1494 2529 y Fd(i)p Fe(=0)1646 2516 y Fq(B)p Fu([)p Fq(i)p Fu(])j(en)o(tries:)189 2604 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 2611 y Fe(0)333 2604 y Fg(;)8 b(disp)438 2611 y Fe(0)467 2604 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)874 2611 y Fd(n)p Ff(\000)p Fe(1)939 2604 y Fg(;)g(disp)1044 2611 y Fd(n)p Ff(\000)p Fe(1)1122 2604 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 2704 y Fu(\()p Fg(ty)r(pe)291 2711 y Fe(0)310 2704 y Fg(;)g(disp)415 2711 y Fe(0)444 2704 y Fu(+)i(\()p Fq(D)p Fu([)p Fq(0)p Fu(])f(+)h Fq(B)p Fu([)p Fq(0)p Fu(])g Fi(\000)g Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(:::;)g Fu(\()p Fg(ty)r(pe)1098 2711 y Fd(n)p Ff(\000)p Fe(1)1164 2704 y Fg(;)g(disp)1269 2711 y Fd(n)p Ff(\000)p Fe(1)1347 2704 y Fu(+)i(\()p Fq(D)p Fu([)p Fq(0)p Fu(])f(+)h Fq(B)p Fu([)p Fq(0)p Fu(])f Fi(\000)i Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 52 54 52 53 bop 75 -100 a Fu(52)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)189 45 y Fu(\()p Fg(ty)r(pe)291 52 y Fe(0)310 45 y Fg(;)8 b(disp)415 52 y Fe(0)444 45 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)1013 52 y Fd(n)p Ff(\000)p Fe(1)1079 45 y Fg(;)g(disp)1184 52 y Fd(n)p Ff(\000)p Fe(1)1261 45 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 136 y Fu(\()p Fg(ty)r(pe)291 143 y Fe(0)310 136 y Fg(;)g(disp)415 143 y Fe(0)444 136 y Fu(+)i(\()p Fq(D)p Fu([)p Fq(count)h Fi(\000)f Fq(1)p Fu(])g(+)g Fq(B)p Fu([)p Fq(count)i Fi(\000)e Fq(1)p Fu(])g Fi(\000)g Fu(1\))f Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 226 y Fu(\()p Fg(ty)r(pe)291 233 y Fd(n)p Ff(\000)p Fe(1)359 226 y Fg(;)g(disp)464 233 y Fd(n)p Ff(\000)p Fe(1)542 226 y Fu(+)i(\()p Fq(D)p Fu([)p Fq(count)h Fi(\000)f Fq(1)p Fu(])g(+)g Fq(B)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])e Fi(\000)i Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fi(g)p Fg(:)166 400 y Fu(A)j(call)g(to)f Fq(MPI)p 431 400 14 2 v 16 w(TYPE)p 564 400 V 17 w(VECTOR\(count,)j (blo)q(cklength,)g(stride,)e(oldt)o(yp)q(e,)h(newt)o(yp)q(e\))g Fu(is)f(equiv)m(alen)o(t)75 456 y(to)i(a)f(call)j(to)d Fq(MPI)p 392 456 V 16 w(TYPE)p 525 456 V 17 w(INDEXED\(count,)i(B,)f (D,)f(oldt)o(yp)q(e,)i(newt)o(yp)q(e\))h Fu(where)189 539 y Fq(D)p Fu([)p Fq(j)p Fu(])11 b(=)i Fg(j)g Fi(\001)d Fq(stride)q Fg(;)22 b(j)15 b Fu(=)e(0)p Fg(;)8 b(:::;)g Fq(count)g Fi(\000)j Fu(1)p Fg(;)75 621 y Fu(and)189 704 y Fq(B)p Fu([)p Fq(j)p Fu(])h(=)h Fq(blo)q(cklength)r Fg(;)22 b(j)15 b Fu(=)e(0)p Fg(;)8 b(:::;)g Fq(count)h Fi(\000)h Fu(1)p Fg(:)75 822 y Fq(Hindexed)47 b Fu(The)11 b(function)h Fq(MPI)p 643 822 V 15 w(TYPE)p 775 822 V 17 w(HINDEXED)f Fu(is)g(iden)o(tical)i(to)d Fq(MPI)p 1383 822 V 15 w(TYPE)p 1515 822 V 17 w(INDEXED)p Fu(,)g(except)75 878 y(that)21 b(blo)q(c)o(k)i(displacemen)o(ts)g(in)g Fq(a)o(rra)o(y)p 761 878 V 14 w(of)p 812 878 V 16 w(displacements)h Fu(are)e(sp)q(eci\014ed)i(in)e(b)o(ytes,)h(rather)e(than)h(in)75 935 y(m)o(ultiples)17 b(of)e(the)g Fq(oldt)o(yp)q(e)h Fu(exten)o(t.)75 1086 y Fq(MPI)p 160 1086 V 16 w(TYPE)p 293 1086 V 17 w(HINDEXED\()21 b(count,)k(a)o(rra)o(y)p 814 1086 V 14 w(of)p 865 1086 V 16 w(blo)q(cklengths,)h(a)o(rra)o(y)p 1248 1086 V 15 w(of)p 1300 1086 V 16 w(displacements,)f(oldt)o(yp)q(e,) f(new-)75 1142 y(t)o(yp)q(e\))117 1219 y Fk(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)34 b(of)f(blo)q(c)o(ks)h({)g(also)f (n)o(um)o(b)q(er)h(of)f(en)o(tries)i(in)905 1276 y Fh(a)o(rra)o(y)p 992 1276 13 2 v 15 w(of)p 1041 1276 V 15 w(displacements)19 b Fk(and)f Fh(a)o(rra)o(y)p 1483 1276 V 15 w(of)p 1532 1276 V 14 w(blo)q(cklengths)i Fk(\(in)o(te-)905 1332 y(ger\))117 1405 y(IN)155 b Fq(a)o(rra)o(y)p 416 1405 14 2 v 15 w(of)p 468 1405 V 16 w(blo)q(cklengths)191 b Fk(n)o(um)o(b)q(er)15 b(of)g(elemen)o(ts)h(in)f(eac)o(h)h(blo)q(c)o (k)g(\(arra)o(y)f(of)g(nonnega-)905 1462 y(tiv)o(e)f(in)o(tegers\))117 1535 y(IN)155 b Fq(a)o(rra)o(y)p 416 1535 V 15 w(of)p 468 1535 V 16 w(displacements)164 b Fk(b)o(yte)14 b(displacemen)o(t)g (of)f(eac)o(h)h(blo)q(c)o(k)g(\(arra)o(y)g(of)f(in)o(teger\))117 1608 y(IN)155 b Fq(oldt)o(yp)q(e)450 b Fk(old)13 b(datat)o(yp)q(e)i (\(handle\))117 1680 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 1805 y Fo(int)23 b(MPI)p 245 1805 15 2 v 17 w(Type)p 358 1805 V 17 w(hindexed\(int)f (count,)h(int)h(*array)p 1092 1805 V 16 w(of)p 1156 1805 V 17 w(blocklengths,)393 1861 y(MPI)p 468 1861 V 17 w(Aint)f(*array)p 748 1861 V 17 w(of)p 813 1861 V 17 w(displacements,)e(MPI)p 1259 1861 V 17 w(Datatype)i(oldtype,)393 1918 y(MPI)p 468 1918 V 17 w(Datatype)g(*newtype\))75 2004 y(MPI)p 150 2004 V 17 w(TYPE)p 263 2004 V 16 w(HINDEXED\(COUNT,)f(ARRAY)p 781 2004 V 17 w(OF)p 846 2004 V 17 w(BLOCKLENGTHS,)g(ARRAY)p 1317 2004 V 16 w(OF)p 1381 2004 V 17 w(DISPLACEMENTS,)393 2061 y(OLDTYPE,)h(NEWTYPE,)g(IERROR\))170 2117 y(INTEGER)g(COUNT,)g (ARRAY)p 651 2117 V 17 w(OF)p 716 2117 V 17 w(BLOCKLENGTHS\(*\),)e (ARRAY)p 1258 2117 V 17 w(OF)p 1323 2117 V 17 w(DISPLACEMENTS\(*\),)170 2174 y(OLDTYPE,)i(NEWTYPE,)g(IERROR)166 2343 y Fu(Assume)15 b(that)g Fq(oldt)o(yp)q(e)h Fu(has)f(t)o(yp)q(e)g(map,)189 2425 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 2432 y Fe(0)333 2425 y Fg(;)8 b(disp)438 2432 y Fe(0)457 2425 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 2432 y Fd(n)p Ff(\000)p Fe(1)723 2425 y Fg(;)h(disp)828 2432 y Fd(n)p Ff(\000)p Fe(1)895 2425 y Fu(\))p Fi(g)p Fg(;)75 2508 y Fu(with)41 b(exten)o(t)e Fg(ex)p Fu(.)95 b(Let)41 b Fq(B)f Fu(b)q(e)h(the)g Fq(a)o(rra)o(y)p 988 2508 14 2 v 14 w(of)p 1039 2508 V 16 w(blo)q(cklength)h Fu(argumen)o(t)e(and)g Fq(D)g Fu(b)q(e)h(the)75 2564 y Fq(a)o(rra)o(y)p 173 2564 V 15 w(of)p 225 2564 V 16 w(displacements)23 b Fu(argumen)o(t.)39 b(The)22 b(newly)h(created)f(datat)o(yp)q(e)f(has)h(a)f(t)o(yp)q(e)h (map)f(with)i Fg(n)14 b Fi(\001)75 2589 y Fc(P)119 2602 y Fh(count)q Ff(\000)p Fe(1)119 2634 y Fd(i)p Fe(=0)271 2621 y Fq(B)p Fu([)p Fq(i)p Fu(])g(en)o(tries:)189 2704 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 2711 y Fe(0)333 2704 y Fg(;)8 b(disp)438 2711 y Fe(0)467 2704 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])o(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)794 2711 y Fd(n)p Ff(\000)p Fe(1)859 2704 y Fg(;)g(disp)964 2711 y Fd(n)p Ff(\000)p Fe(1)1042 2704 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])o(\))p Fg(;)e(:::;)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 53 55 53 54 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(53)189 45 y(\()p Fg(ty)r(pe)291 52 y Fe(0)310 45 y Fg(;)8 b(disp)415 52 y Fe(0)444 45 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f(+)i(\()p Fq(B)p Fu([)p Fq(0)p Fu(])e Fi(\000)h Fu(1\))g Fi(\001)f Fg(ex)p Fu(\))p Fg(;)f(:::;)189 151 y Fu(\()p Fg(ty)r(pe)291 158 y Fd(n)p Ff(\000)p Fe(1)359 151 y Fg(;)g(disp)464 158 y Fd(n)p Ff(\000)p Fe(1)542 151 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f(+)h(\()p Fq(B)p Fu([)p Fq(0)p Fu(])f Fi(\000)i Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 257 y Fu(\()p Fg(ty)r(pe)291 264 y Fe(0)310 257 y Fg(;)g(disp)415 264 y Fe(0)444 257 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])o(\))p Fg(;)d(:::;)g Fu(\()p Fg(ty)r(pe)933 264 y Fd(n)p Ff(\000)p Fe(1)999 257 y Fg(;)g(disp)1104 264 y Fd(n)p Ff(\000)p Fe(1)1181 257 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])o(\))p Fg(;)d(:::;)189 363 y Fu(\()p Fg(ty)r(pe)291 370 y Fe(0)310 363 y Fg(;)g(disp)415 370 y Fe(0)444 363 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])e(+)i(\()p Fq(B)p Fu([)p Fq(count)g Fi(\000)f Fq(1)p Fu(])g Fi(\000)g Fu(1\))f Fi(\001)h Fg(ex)p Fu(\))p Fg(;)e(:::;)189 468 y Fu(\()p Fg(ty)r(pe)291 475 y Fd(n)p Ff(\000)p Fe(1)359 468 y Fg(;)g(disp)464 475 y Fd(n)p Ff(\000)p Fe(1)542 468 y Fu(+)i Fq(D)p Fu([)p Fq(count)h Fi(\000)f Fq(1)p Fu(])g(+)g(\()p Fq(B)p Fu([)p Fq(count)h Fi(\000)g Fq(1)p Fu(])e Fi(\000)i Fu(1\))e Fi(\001)h Fg(ex)p Fu(\))p Fi(g)p Fg(:)75 720 y Fq(Struct)47 b(MPI)p 323 720 14 2 v 16 w(TYPE)p 456 720 V 16 w(STRUCT)20 b Fu(is)g(the)g(most)f(general)g(t)o (yp)q(e)h(constructor.)32 b(It)19 b(further)g(generalizes)75 777 y(the)13 b(previous)h(one)f(in)h(that)e(it)h(allo)o(ws)g(eac)o(h)g (blo)q(c)o(k)h(to)e(consist)h(of)g(replications)h(of)f(di\013eren)o(t)g (datat)o(yp)q(es.)75 928 y Fq(MPI)p 160 928 V 16 w(TYPE)p 293 928 V 17 w(STRUCT\(count,)f(a)o(rra)o(y)p 729 928 V 15 w(of)p 781 928 V 16 w(blo)q(cklengths,)h(a)o(rra)o(y)p 1151 928 V 14 w(of)p 1202 928 V 16 w(displacements,)g(a)o(rra)o(y)p 1599 928 V 15 w(of)p 1651 928 V 15 w(t)o(yp)q(es,)g(new-)75 984 y(t)o(yp)q(e\))117 1062 y Fk(IN)155 b Fq(count)482 b Fk(n)o(um)o(b)q(er)18 b(of)h(blo)q(c)o(ks)g(\(in)o(teger\))g({)g (also)f(n)o(um)o(b)q(er)h(of)f(en)o(tries)905 1118 y(in)c(arra)o(ys)h Fh(a)o(rra)o(y)p 1167 1118 13 2 v 15 w(of)p 1216 1118 V 14 w(t)o(yp)q(es)p Fk(,)h Fh(a)o(rra)o(y)p 1432 1118 V 15 w(of)p 1481 1118 V 14 w(displacements)g Fk(and)e Fh(a)o(r-)905 1174 y(ra)o(y)p 959 1174 V 15 w(of)p 1008 1174 V 15 w(blo)q(cklengths)117 1250 y Fk(IN)155 b Fq(a)o(rra)o(y)p 416 1250 14 2 v 15 w(of)p 468 1250 V 16 w(blo)q(cklength)208 b Fk(n)o(um)o(b)q(er)13 b(of)h(elemen)o(ts)f(in)h(eac)o(h)g(blo)q(c)o (k)g(\(arra)o(y)g(of)f(in)o(teger\))117 1325 y(IN)155 b Fq(a)o(rra)o(y)p 416 1325 V 15 w(of)p 468 1325 V 16 w(displacements)164 b Fk(b)o(yte)14 b(displacemen)o(t)g(of)f(eac)o(h)h (blo)q(c)o(k)g(\(arra)o(y)g(of)f(in)o(teger\))117 1400 y(IN)155 b Fq(a)o(rra)o(y)p 416 1400 V 15 w(of)p 468 1400 V 16 w(t)o(yp)q(es)327 b Fk(t)o(yp)q(e)20 b(of)f(elemen)o(ts)g(in) g(eac)o(h)h(blo)q(c)o(k)f(\(arra)o(y)g(of)g(handles)g(to)905 1456 y(datat)o(yp)q(e)14 b(ob)r(jects\))117 1531 y(OUT)108 b Fq(newt)o(yp)q(e)433 b Fk(new)15 b(datat)o(yp)q(e)f(\(handle\))75 1656 y Fo(int)23 b(MPI)p 245 1656 15 2 v 17 w(Type)p 358 1656 V 17 w(struct\(int)f(count,)h(int)h(*array)p 1044 1656 V 16 w(of)p 1108 1656 V 17 w(blocklengths,)393 1712 y(MPI)p 468 1712 V 17 w(Aint)f(*array)p 748 1712 V 17 w(of)p 813 1712 V 17 w(displacements,)e(MPI)p 1259 1712 V 17 w(Datatype)i(*array)p 1635 1712 V 16 w(of)p 1699 1712 V 17 w(types,)393 1769 y(MPI)p 468 1769 V 17 w(Datatype)g(*newtype\))75 1855 y(MPI)p 150 1855 V 17 w(TYPE)p 263 1855 V 16 w(STRUCT\(COUNT,)f(ARRAY)p 733 1855 V 17 w(OF)p 798 1855 V 17 w(BLOCKLENGTHS,)g(ARRAY)p 1269 1855 V 16 w(OF)p 1333 1855 V 17 w(DISPLACEMENTS,)393 1911 y(ARRAY)p 516 1911 V 17 w(OF)p 581 1911 V 17 w(TYPES,)h(NEWTYPE,)f (IERROR\))170 1968 y(INTEGER)h(COUNT,)g(ARRAY)p 651 1968 V 17 w(OF)p 716 1968 V 17 w(BLOCKLENGTHS\(*\),)e(ARRAY)p 1258 1968 V 17 w(OF)p 1323 1968 V 17 w(DISPLACEMENTS\(*\),)170 2024 y(ARRAY)p 293 2024 V 17 w(OF)p 358 2024 V 17 w(TYPES\(*\),)h (NEWTYPE,)h(IERROR)75 2160 y Fp(Example)18 b(1.24)23 b Fu(Let)15 b Fq(t)o(yp)q(e1)h Fu(ha)o(v)o(e)f(t)o(yp)q(e)g(map,)189 2254 y Fi(f)p Fu(\()p Fq(double)p Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(8\))p Fi(g)p Fg(;)75 2347 y Fu(with)k(exten)o(t)f(16.)18 b(Let)11 b Fq(B)h(=)g(\(2,)f(1,)g(3\))p Fu(,)g Fq(D)h(=)f(\(0,)g(16,)h(26\))p Fu(,)e(and)i Fq(T)f(=)h(\(MPI)p 1321 2347 14 2 v 15 w(FLO)o(A)l(T,)f(t)o(yp)q(e1,)i(MPI)p 1711 2347 V 16 w(CHAR\))p Fu(.)75 2404 y(Then)h(a)f(call)h(to)e Fq(MPI)p 447 2404 V 16 w(TYPE)p 580 2404 V 17 w(STRUCT\(3,)h(B,)g(D,)g (T,)g(newt)o(yp)q(e\))h Fu(returns)f(a)g(datat)o(yp)q(e)g(with)g(t)o (yp)q(e)h(map,)189 2497 y Fi(f)p Fu(\()p Fq(\015oat)o Fg(;)8 b Fu(0\))p Fg(;)g Fu(\()p Fq(\015oat)n Fg(;)g Fu(4\))p Fg(;)g Fu(\()p Fq(double)o Fg(;)g Fu(16\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(24\))p Fg(;)g Fu(\()p Fq(cha)o(r)m Fg(;)g Fu(26\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(27\))p Fg(;)g Fu(\()p Fq(cha)o(r)n Fg(;)g Fu(28\))p Fi(g)p Fg(:)75 2591 y Fu(That)16 b(is,)h(t)o(w)o(o)e(copies)i(of)f Fq(MPI)p 610 2591 V 15 w(FLO)o(A)l(T)h Fu(starting)f(at)f(0,)h(follo)o (w)o(ed)h(b)o(y)f(one)h(cop)o(y)f(of)g Fq(t)o(yp)q(e1)h Fu(starting)f(at)75 2647 y(16,)d(follo)o(w)o(ed)h(b)o(y)f(three)h (copies)h(of)e Fq(MPI)p 765 2647 V 16 w(CHAR)p Fu(,)h(starting)f(at)g (26.)18 b(\(W)l(e)c(assume)f(that)g(a)g(\015oat)g(o)q(ccupies)75 2704 y(four)i(b)o(ytes.\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 54 56 54 55 bop 75 -100 a Fu(54)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)166 45 y Fu(In)f(general,)f(let) h Fq(T)f Fu(b)q(e)h(the)f Fq(a)o(rra)o(y)p 742 45 14 2 v 14 w(of)p 793 45 V 16 w(t)o(yp)q(es)i Fu(argumen)o(t,)d(where)i Fq(T[i])f Fu(is)g(a)g(handle)i(to,)189 139 y Fg(ty)r(pemap)360 146 y Fd(i)387 139 y Fu(=)c Fi(f)p Fu(\()p Fg(ty)r(pe)560 120 y Fd(i)560 150 y Fe(0)579 139 y Fg(;)8 b(disp)684 120 y Fd(i)684 150 y Fe(0)702 139 y Fu(\))p Fg(;)g(:::;)g Fu(\()p Fg(ty)r(pe)903 120 y Fd(i)903 150 y(n)924 155 y Fb(i)935 150 y Ff(\000)p Fe(1)982 139 y Fg(;)g(disp)1087 120 y Fd(i)1087 150 y(n)1108 155 y Fb(i)1120 150 y Ff(\000)p Fe(1)1168 139 y Fu(\))p Fi(g)p Fg(;)75 233 y Fu(with)15 b(exten)o(t)g Fg(ex)364 240 y Fd(i)378 233 y Fu(.)20 b(Let)15 b Fq(B)g Fu(b)q(e)g(the)g Fq(a)o(rra)o(y)p 774 233 V 14 w(of)p 825 233 V 16 w(blo)q(cklength)i Fu(argumen)o(t)d(and)h Fq(D)g Fu(b)q(e)g(the)g Fq(a)o(rra)o(y)p 1647 233 V 15 w(of)p 1699 233 V 15 w(displace-)75 289 y(ments)e Fu(argumen)o(t.)19 b(Let)13 b Fq(c)g Fu(b)q(e)g(the)g Fq(count)h Fu(argumen)o(t.)19 b(Then)13 b(the)g(newly)h(created)e(datat)o(yp)q(e)h(has)f(a)h(t)o(yp)q (e)75 346 y(map)i(with)280 314 y Fc(P)323 327 y Fh(c)p Ff(\000)p Fe(1)323 359 y Fd(i)p Fe(=0)397 346 y Fq(B)p Fu([)p Fq(i)p Fu(])9 b Fi(\001)h Fg(n)523 353 y Fd(i)552 346 y Fu(en)o(tries:)189 439 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 421 y Fe(0)314 451 y(0)333 439 y Fg(;)e(disp)438 421 y Fe(0)438 451 y(0)467 439 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])o(\))p Fg(;)e(:::;)g Fu(\()p Fg(ty)r(pe)794 421 y Fe(0)794 451 y Fd(n)815 456 y Fn(0)832 439 y Fg(;)g(disp)937 421 y Fe(0)937 451 y Fd(n)958 456 y Fn(0)986 439 y Fu(+)j Fq(D)p Fu([)p Fq(0)p Fu(])o(\))p Fg(;)d(:::;)189 546 y Fu(\()p Fg(ty)r(pe)291 527 y Fe(0)291 557 y(0)310 546 y Fg(;)g(disp)415 527 y Fe(0)415 557 y(0)444 546 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f(+)i(\()p Fq(B)p Fu([)p Fq(0)p Fu(])e Fi(\000)h Fu(1\))g Fi(\001)f Fg(ex)897 553 y Fe(0)917 546 y Fu(\))p Fg(;)f(:::;)g Fu(\()p Fg(ty)r(pe)1118 527 y Fe(0)1118 557 y Fd(n)1139 562 y Fn(0)1156 546 y Fg(;)g(disp)1261 527 y Fe(0)1261 557 y Fd(n)1282 562 y Fn(0)1311 546 y Fu(+)i Fq(D)p Fu([)p Fq(0)p Fu(])f(+)i(\()p Fq(B)p Fu([)p Fq(0)p Fu(])e Fi(\000)h Fq(1)p Fu(\))g Fi(\001)f Fg(ex)1764 553 y Fe(0)1784 546 y Fu(\))p Fg(;)f(:::;)189 652 y Fu(\()p Fg(ty)r(pe)291 633 y Fh(c)p Ff(\000)p Fe(1)291 664 y(0)356 652 y Fg(;)g(disp)461 633 y Fh(c)p Ff(\000)p Fe(1)461 664 y(0)536 652 y Fu(+)i Fq(D)p Fu([)p Fq(c)g Fi(\000)g Fq(1)p Fu(]\))p Fg(;)e(:::;)g Fu(\()o Fg(ty)r(pe)938 633 y Fh(c)p Ff(\000)p Fe(1)938 664 y Fd(n)959 671 y Fh(c)p Fa(\000)p Fn(1)1017 664 y Ff(\000)p Fe(1)1064 652 y Fg(;)g(disp)1169 633 y Fh(c)p Ff(\000)p Fe(1)1169 664 y Fd(n)1190 671 y Fh(c)p Fa(\000)p Fn(1)1249 664 y Ff(\000)p Fe(1)1306 652 y Fu(+)j Fq(D)p Fu([)p Fq(c)e Fi(\000)i Fq(1)p Fu(])o(\))p Fg(;)d(:::;)189 769 y Fu(\()p Fg(ty)r(pe)291 750 y Fh(c)p Ff(\000)p Fe(1)291 782 y(0)356 769 y Fg(;)g(disp)461 750 y Fh(c)p Ff(\000)p Fe(1)461 782 y(0)536 769 y Fu(+)i Fq(D)p Fu([)p Fq(c)g Fi(\000)g Fq(1)p Fu(])g(+)g(\()p Fq(B)p Fu([)p Fq(c)g Fi(\000)h Fq(1)p Fu(])e Fi(\000)i Fu(1\))e Fi(\001)h Fg(ex)1141 776 y Fh(c)p Ff(\000)p Fe(1)1207 769 y Fu(\))p Fg(;)e(:::;)189 876 y Fu(\()p Fg(ty)r(pe)291 856 y Fh(c)p Ff(\000)p Fe(1)291 888 y Fd(n)312 895 y Fh(c)p Fa(\000)p Fn(1)372 888 y Ff(\000)p Fe(1)419 876 y Fg(;)g(disp)524 856 y Fh(c)p Ff(\000)p Fe(1)524 888 y Fd(n)545 895 y Fh(c)p Fa(\000)p Fn(1)604 888 y Ff(\000)p Fe(1)661 876 y Fu(+)j Fq(D)p Fu([)p Fq(c)e Fi(\000)i Fq(1)p Fu(])e(+)i(\()p Fq(B)p Fu([)p Fq(c)f Fi(\000)g Fq(1)p Fu(])f Fi(\000)i Fq(1)p Fu(\))e Fi(\001)h Fg(ex)1266 883 y Fh(c)p Ff(\000)p Fe(1)1332 876 y Fu(\))p Fi(g)p Fg(:)166 1069 y Fu(A)15 b(call)h(to)f Fq(MPI)p 439 1069 V 16 w(TYPE)p 572 1069 V 16 w(HINDEXED\()g(count,)h (B,)f(D,)g(oldt)o(yp)q(e,)h(newt)o(yp)q(e\))g Fu(is)g(equiv)m(alen)o(t) h(to)d(a)h(call)75 1126 y(to)d Fq(MPI)p 213 1126 V 16 w(TYPE)p 346 1126 V 17 w(STRUCT\()h(count,)i(B,)e(D,)f(T,)h(newt)o(yp)q (e\))p Fu(,)h(where)f(eac)o(h)g(en)o(try)g(of)g Fq(T)g Fu(is)g(equal)h(to)e Fq(oldt)o(yp)q(e)p Fu(.)75 1247 y Fl(1.12.2)49 b(Address)16 b(and)g(extent)f(functions)75 1333 y Fu(The)g(displacemen)o(ts)i(in)e(a)g(general)h(datat)o(yp)q(e)e (are)h(relativ)o(e)g(to)g(some)f(initial)j(bu\013er)e(address.)20 b Fp(Abso-)75 1390 y(lute)15 b(addresses)c Fu(can)h(b)q(e)h (substituted)f(for)g(these)g(displacemen)o(ts:)20 b(w)o(e)12 b(treat)f(them)h(as)g(displacemen)o(ts)75 1446 y(relativ)o(e)17 b(to)e(\\address)h(zero,")g(the)g(start)f(of)h(the)g(address)h(space.) 23 b(This)17 b(initial)h(address)e(zero)g(is)h(indi-)75 1503 y(cated)f(b)o(y)g(the)g(constan)o(t)f Fh(MPI)p 601 1503 13 2 v 14 w(BOTTOM)p Fu(.)g(Th)o(us,)g(a)h(datat)o(yp)q(e)f(can)h (sp)q(ecify)h(the)f(absolute)g(address)g(of)75 1559 y(the)e(en)o(tries) g(in)g(the)g(comm)o(unication)g(bu\013er,)g(in)h(whic)o(h)f(case)g(the) g Fq(buf)g Fu(argumen)o(t)f(is)h(passed)g(the)g(v)m(alue)75 1615 y Fh(MPI)p 152 1615 V 14 w(BOTTOM)p Fu(.)166 1672 y(The)31 b(address)g(of)f(a)h(lo)q(cation)g(in)h(memory)e(can)h(b)q(e)h (found)f(b)o(y)g(in)o(v)o(oking)g(the)g(function)75 1728 y Fq(MPI)p 160 1728 14 2 v 16 w(ADDRESS)p Fu(.)75 1879 y Fq(MPI)p 160 1879 V 16 w(ADDRESS\(lo)q(cation,)16 b(address\))117 1957 y Fk(IN)155 b Fq(lo)q(cation)437 b Fk(lo)q(cation)13 b(in)h(caller)f(memory)f(\(c)o(hoice\))117 2032 y(OUT)108 b Fq(address)449 b Fk(address)15 b(of)f(lo)q(cation)f(\(in)o(teger\))75 2156 y Fo(int)23 b(MPI)p 245 2156 15 2 v 17 w(Address\(void*)f (location,)h(MPI)p 907 2156 V 17 w(Aint)g(*address\))75 2243 y(MPI)p 150 2243 V 17 w(ADDRESS\(LOCATION,)e(ADDRESS,)i(IERROR\)) 170 2299 y()g(LOCATION\(*\))170 2355 y(INTEGER)g(ADDRESS,)g (IERROR)166 2442 y Fu(Returns)16 b(the)f(\(b)o(yte\))f(address)i(of)e Fq(lo)q(cation)p Fu(.)75 2548 y Fp(Example)k(1.25)23 b Fu(Using)15 b Fq(MPI)p 619 2548 14 2 v 16 w(ADDRESS)h Fu(for)f(an)g(arra)o(y)l(.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 55 57 55 56 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(55)147 45 y Fo(REAL)23 b(A\(100,100\))147 102 y(INTEGER)f(I1,)i(I2,)f(DIFF)147 158 y(CALL)g(MPI_ADDRESS\(A\(1,1\),)e (I1,)j(IERROR\))147 214 y(CALL)f(MPI_ADDRESS\(A\(10,10\),)e(I2,)i (IERROR\))147 271 y(DIFF)g(=)h(I2)f(-)h(I1)75 327 y(!)g(The)f(value)g (of)h(DIFF)f(is)h(909*sizeofreal;)e(the)h(values)g(of)h(I1)f(and)h(I2)f (are)75 384 y(!)h(implementation)e(dependent.)189 475 y Fj(A)n(dvic)n(e)e(to)i(users.)73 b Fu(C)20 b(users)h(ma)o(y)f(b)q(e)h (tempted)g(to)f(a)o(v)o(oid)h(the)f(usage)h(of)f Fq(MPI)p 1659 475 14 2 v 16 w(ADDRESS)189 532 y Fu(and)e(rely)g(on)g(the)g(a)o (v)m(ailabilit)o(y)i(of)d(the)h(address)g(op)q(erator)f(&.)29 b(Note,)17 b(ho)o(w)o(ev)o(er,)h(that)f Fh(&)h Fj(c)n(ast-)189 588 y(expr)n(ession)c Fu(is)j(a)e(p)q(oin)o(ter,)i(not)e(an)h(address.) 22 b(ANSI)17 b(C)f(do)q(es)g(not)g(require)g(that)g(the)g(v)m(alue)h (of)e(a)189 645 y(p)q(oin)o(ter)f(\(or)f(the)h(p)q(oin)o(ter)g(cast)g (to)f Fh(int)p Fu(\))h(b)q(e)g(the)g(absolute)g(address)g(of)f(the)h (ob)s(ject)g(p)q(oin)o(ted)g(at)g(|)189 701 y(although)g(this)h(is)g (commonly)f(the)h(case.)k(F)l(urthermore,)14 b(referencing)h(ma)o(y)f (not)g(ha)o(v)o(e)f(a)h(unique)189 758 y(de\014nition)19 b(on)f(mac)o(hines)h(with)g(a)e(segmen)o(ted)h(address)g(space.)29 b(The)18 b(use)h(of)e Fq(MPI)p 1659 758 V 16 w(ADDRESS)189 814 y Fu(to)g(\\reference")h(C)f(v)m(ariables)i(guaran)o(tees)e(p)q (ortabilit)o(y)i(to)e(suc)o(h)h(mac)o(hines)g(as)g(w)o(ell.)28 b(\()p Fj(End)18 b(of)189 871 y(advic)n(e)e(to)g(users.)p Fu(\))166 962 y(The)f(follo)o(wing)h(auxiliary)h(functions)f(pro)o (vide)f(useful)i(information)e(on)g(deriv)o(ed)h(datat)o(yp)q(es.)75 1113 y Fq(MPI)p 160 1113 V 16 w(TYPE)p 293 1113 V 17 w(EXTENT\(datat)o(yp)q(e,)g(extent\))117 1190 y Fk(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(\(handle\))117 1263 y(OUT)108 b Fq(extent)471 b Fk(datat)o(yp)q(e)14 b(exten)o(t)h(\(in)o(teger\))1937 1342 y Fi(>)75 1388 y Fo(int)23 b(MPI)p 245 1388 15 2 v 17 w(Type)p 358 1388 V 17 w(extent\(MPI)p 615 1388 V 16 w(Datatype)f(datatype,)h(MPI)p 1156 1388 V 17 w(Aint)g(*extent\))1937 1428 y Fi(?)75 1474 y Fo(MPI)p 150 1474 V 17 w(TYPE)p 263 1474 V 16 w(EXTENT\(DATATYPE,)f(EXTENT,)h(IERROR\))170 1531 y(INTEGER)g (DATATYPE,)g(EXTENT,)g(IERROR)166 1617 y Fu(Returns)16 b(the)f(exten)o(t)g(of)g(a)f(datat)o(yp)q(e,)h(where)g(exten)o(t)g(is)h (as)f(de\014ned)h(in)g(Eq.)f(1.1)f(on)h(page)g(47.)75 1768 y Fq(MPI)p 160 1768 14 2 v 16 w(TYPE)p 293 1768 V 17 w(SIZE\(datat)o(yp)q(e,)g(size\))117 1845 y Fk(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(\(handle\))117 1918 y(OUT)108 b Fq(size)519 b Fk(datat)o(yp)q(e)14 b(size)h(\(in)o (teger\))75 2043 y Fo(int)23 b(MPI)p 245 2043 15 2 v 17 w(Type)p 358 2043 V 17 w(size\(MPI)p 567 2043 V 16 w(Datatype)g(datatype,)f(int)i(*size\))75 2129 y(MPI)p 150 2129 V 17 w(TYPE)p 263 2129 V 16 w(SIZE\(DATATYPE,)e(SIZE,)i (IERROR\))170 2186 y(INTEGER)f(DATATYPE,)g(SIZE,)g(IERROR)166 2272 y Fq(MPI)p 251 2272 14 2 v 16 w(TYPE)p 384 2272 V 17 w(SIZE)18 b Fu(returns)h(the)g(total)f(size,)j(in)f(b)o(ytes,)f (of)g(the)g(en)o(tries)g(in)h(the)f(t)o(yp)q(e)g(signature)75 2329 y(asso)q(ciated)c(with)g Fq(datat)o(yp)q(e)p Fu(;)h(i.e.,)f(the)f (total)g(size)i(of)e(the)h(data)f(in)i(a)e(message)g(that)g(w)o(ould)i (b)q(e)f(created)75 2385 y(with)20 b(this)g(datat)o(yp)q(e.)32 b(En)o(tries)20 b(that)f(o)q(ccur)h(m)o(ultiple)h(times)f(in)h(the)e (datat)o(yp)q(e)g(are)h(coun)o(ted)g(with)75 2442 y(their)c(m)o (ultiplicit)o(y)l(.)1518 b Fi(>)1937 2494 y(?)75 2561 y Fl(1.12.3)49 b(Lo)o(w)o(er-b)q(ound)17 b(and)g(upp)q(er-b)q(ound)g (ma)o(rk)o(ers)75 2647 y Fu(It)e(is)g(often)g(con)o(v)o(enien)o(t)g(to) g(de\014ne)h(explicitly)h(the)e(lo)o(w)o(er)g(b)q(ound)h(and)f(upp)q (er)h(b)q(ound)f(of)g(a)g(t)o(yp)q(e)g(map,)75 2704 y(and)k(o)o(v)o (erride)g(the)g(de\014nition)i(giv)o(en)f(b)o(y)f(Equation)g(1.1)f(on)h (page)g(47.)31 b(This)19 b(allo)o(ws)g(one)g(to)g(de\014ne)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 56 58 56 57 bop 75 -100 a Fu(56)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fu(a)i(datat)o(yp)q(e)g (that)g(has)h(\\holes")f(at)g(its)h(b)q(eginning)i(or)d(its)h(end,)g (or)g(a)f(datat)o(yp)q(e)g(with)h(en)o(tries)g(that)75 102 y(extend)h(ab)q(o)o(v)o(e)g(the)g(upp)q(er)g(b)q(ound)h(or)e(b)q (elo)o(w)i(the)f(lo)o(w)o(er)f(b)q(ound.)38 b(Examples)21 b(of)g(suc)o(h)g(usage)f(are)75 158 y(pro)o(vided)e(in)h(Sec.)27 b(1.12.8.)e(Also,)18 b(the)g(user)f(ma)o(y)g(w)o(an)o(t)g(to)g(o)o(v)o (eride)g(the)h(alignmen)o(t)g(rules)g(that)f(are)-2035 b Fi(>)75 214 y Fu(used)21 b(to)g(compute)g(upp)q(er)g(b)q(ounds)h(and) f(exten)o(ts.)37 b(E.g.,)20 b(a)h(C)f(compiler)j(ma)o(y)d(allo)o(w)h (the)g(user)g(to)75 271 y(o)o(v)o(eride)16 b(default)h(alignmen)o(t)f (rules)h(for)e(some)h(of)f(the)h(structures)g(within)h(a)e(program.)21 b(The)16 b(user)g(has)75 327 y(to)f(sp)q(ecify)h(explicitly)i(the)d(b)q (ounds)h(of)f(the)g(datat)o(yp)q(es)g(that)g(matc)o(h)f(these)i (structures.)-1777 b Fi(?)166 384 y Fu(T)l(o)13 b(ac)o(hiev)o(e)h (this,)g(w)o(e)f(add)h(t)o(w)o(o)e(additional)j(\\pseudo-datat)o(yp)q (es,")e Fq(MPI)p 1438 384 14 2 v 16 w(LB)h Fu(and)f Fq(MPI)p 1691 384 V 16 w(UB)p Fu(,)h(that)75 440 y(can)e(b)q(e)h(used,)g(resp)q (ectiv)o(ely)l(,)h(to)d(mark)h(the)g(lo)o(w)o(er)f(b)q(ound)i(or)f(the) g(upp)q(er)h(b)q(ound)g(of)f(a)f(datat)o(yp)q(e.)19 b(These)75 497 y(pseudo-datat)o(yp)q(es)d(o)q(ccup)o(y)g(no)f(space)h(\()p Fg(extent)p Fu(\()p Fq(MPI)p 1022 497 V 16 w(LB)p Fu(\))d(=)h Fg(extent)p Fu(\()p Fq(MPI)p 1400 497 V 16 w(UB)q Fu(\))f(=)g(0\).)20 b(They)c(do)f(not)75 553 y(a\013ect)d(the)h(size)h(or)e(coun)o(t)h(of)f (a)h(datat)o(yp)q(e,)f(and)h(do)g(not)f(a\013ect)g(the)h(the)g(con)o (ten)o(t)g(of)f(a)h(message)f(created)75 610 y(with)k(this)f(datat)o (yp)q(e.)20 b(Ho)o(w)o(ev)o(er,)13 b(they)j(do)f(a\013ect)f(the)i (de\014nition)h(of)e(the)g(exten)o(t)g(of)g(a)f(datat)o(yp)q(e)h(and,) 75 666 y(therefore,)g(a\013ect)f(the)h(outcome)g(of)g(a)g(replication)i (of)d(this)i(datat)o(yp)q(e)f(b)o(y)g(a)g(datat)o(yp)q(e)f (constructor.)75 772 y Fp(Example)k(1.26)23 b Fu(Let)17 b Fq(D)f(=)h(\(-3,)g(0,)g(6\))p Fu(;)f Fq(T)h(=)g(\(MPI)p 1003 772 V 16 w(LB,)f(MPI)p 1185 772 V 16 w(INT,)g(MPI)p 1388 772 V 16 w(UB\))p Fu(,)h(and)g Fq(B)g(=)g(\(1,)f(1,)h(1\))p Fu(.)75 829 y(Then)g(a)e(call)i(to)f Fq(MPI)p 459 829 V 16 w(TYPE)p 592 829 V 16 w(STRUCT\(3,)g(B,)g(D,)g(T,)f(t)o(yp)q(e1\)) i Fu(creates)e(a)h(new)g(datat)o(yp)q(e)g(that)f(has)h(an)75 885 y(exten)o(t)h(of)g(9)g(\(from)f(-3)h(to)g(5,)g(5)g(included\),)i (and)f(con)o(tains)f(an)g(in)o(teger)h(at)e(displacemen)o(t)j(0.)26 b(This)17 b(is)75 942 y(the)f(datat)o(yp)q(e)f(de\014ned)j(b)o(y)d(the) h(sequence)i Fi(f)p Fq(\(lb,)d(-3\),)g(\(int,)h(0\),)f(\(ub,)i(6\))p Fi(g)e Fu(.)22 b(If)16 b(this)g(t)o(yp)q(e)g(is)g(replicated)75 998 y(t)o(wice)i(b)o(y)f(a)g(call)h(to)f Fq(MPI)p 528 998 V 16 w(TYPE)p 661 998 V 17 w(CONTIGUOUS\(2,)h(t)o(yp)q(e1,)g(t)o (yp)q(e2\))g Fu(then)g(the)f(newly)i(created)e(t)o(yp)q(e)75 1055 y(can)d(b)q(e)h(describ)q(ed)i(b)o(y)d(the)g(sequence)i Fi(f)p Fq(\(lb,)e(-3\),)f(\(int,)i(0\),)e(\(int,9\),)h(\(ub,)h(15\))p Fi(g)e Fu(.)19 b(\(An)c(en)o(try)f(of)g(t)o(yp)q(e)g Fq(ub)-2034 b Fi(>)75 1111 y Fu(can)16 b(b)q(e)g(deleted)h(if)g(there)e (is)i(another)e(en)o(try)g(of)h(t)o(yp)q(e)f Fq(ub)i Fu(with)f(a)g(higher)g(displacemen)o(t;)h(an)f(en)o(try)f(of)75 1168 y(t)o(yp)q(e)g Fq(lb)h Fu(can)f(b)q(e)h(deleted)h(if)e(there)g(is) h(another)f(en)o(try)g(of)g(t)o(yp)q(e)g Fq(lb)g Fu(with)h(a)f(lo)o(w)o (er)g(displacemen)o(t.\))-1928 b Fi(?)166 1274 y Fu(In)16 b(general,)f(if)189 1368 y Fg(T)6 b(y)r(pemap)12 b Fu(=)h Fi(f)p Fu(\()p Fg(ty)r(pe)562 1375 y Fe(0)581 1368 y Fg(;)8 b(disp)686 1375 y Fe(0)705 1368 y Fu(\))p Fg(;)g(:::;)g Fu(\()o Fg(ty)r(pe)905 1375 y Fd(n)p Ff(\000)p Fe(1)971 1368 y Fg(;)g(disp)1076 1375 y Fd(n)p Ff(\000)p Fe(1)1144 1368 y Fu(\))p Fi(g)p Fg(;)75 1461 y Fu(then)16 b(the)f Fp(lo)o(w)o(er)h(b)q(ound)g Fu(of)f Fg(T)6 b(y)r(pemap)15 b Fu(is)g(de\014ned)i(to)e(b)q(e)189 1585 y Fg(l)q(b)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))k(=)506 1513 y Fc(\()560 1557 y Fu(min)636 1564 y Fd(j)662 1557 y Fg(disp)746 1564 y Fd(j)1257 1557 y Fu(if)16 b(no)f(en)o(try)f(has)i(basic)f(t)o (yp)q(e)h Fq(lb)560 1614 y Fu(min)636 1621 y Fd(j)654 1614 y Fi(f)p Fg(disp)761 1621 y Fd(j)794 1614 y Fu(suc)o(h)g(that)e Fg(ty)r(pe)1079 1621 y Fd(j)1110 1614 y Fu(=)f Fq(lb)q Fi(g)41 b Fu(otherwise)166 1709 y(Similarly)l(,)17 b(the)e Fp(upp)q(er)j(b)q(ound)e Fu(of)e Fg(T)6 b(y)r(pemap)15 b Fu(is)h(de\014ned)h(to)d(b)q(e)-1475 b Fi(>)189 1833 y Fg(ub)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))11 b(=)518 1761 y Fc(\()572 1805 y Fu(max)657 1812 y Fd(j)682 1805 y Fg(disp)766 1812 y Fd(j)794 1805 y Fu(+)g Fg(siz)r(eof)5 b Fu(\()p Fg(ty)r(pe)1072 1812 y Fd(j)1090 1805 y Fu(\))10 b(+)h Fg(\017)108 b Fu(if)16 b(no)f(en)o(try)f(has)i(basic)f(t)o(yp)q (e)h Fq(ub)572 1862 y Fu(max)657 1869 y Fd(j)675 1862 y Fi(f)p Fg(disp)782 1869 y Fd(j)814 1862 y Fu(suc)o(h)g(that)e Fg(ty)r(pe)1099 1869 y Fd(j)1131 1862 y Fu(=)f Fq(ub)q Fi(g)41 b Fu(otherwise)166 1957 y(Then)189 2051 y Fg(extent)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))13 b(=)g Fg(ub)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))i Fi(\000)j Fg(l)q(b)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))-160 2100 y Fi(?)75 2145 y Fu(If)19 b Fg(ty)r(pe)208 2152 y Fd(i)242 2145 y Fu(requires)h (alignmen)o(t)g(to)e(a)h(b)o(yte)g(address)g(that)g(is)h(a)e(m)o (ultiple)k(of)c Fg(k)1460 2152 y Fd(i)1474 2145 y Fu(,)i(then)f Fg(\017)h Fu(is)g(the)f(least)75 2201 y(nonnegativ)o(e)d(incremen)o(t)g (needed)g(to)f(round)g Fg(extent)p Fu(\()p Fg(T)6 b(y)r(pemap)p Fu(\))16 b(to)e(the)h(next)h(m)o(ultiple)h(of)d(max)1794 2208 y Fd(i)1816 2201 y Fg(k)1840 2208 y Fd(i)1854 2201 y Fu(.)166 2258 y(The)g(formal)f(de\014nitions)j(giv)o(en)e(for)f(the)h (v)m(arious)g(datat)o(yp)q(e)f(constructors)g(apply)i(no)o(w,)e(with)h (the)75 2314 y(amended)i(de\014nition)h(of)e Fp(exten)o(t)p Fu(.)-838 b Fi(>)166 2371 y Fu(The)20 b(exten)o(t)g(of)g(a)f(datat)o (yp)q(e)h(should)h(alw)o(a)o(ys)e(b)q(e)i(nonnegativ)o(e.)34 b(It)21 b(is)f(erroneous)g(to)f(pro)o(vide)75 2427 y(upp)q(er)d(or)f (lo)o(w)o(er)g(b)q(ound)h(mark)o(ers)e(that)h(result)g(in)h(a)f (negativ)o(e)g(exten)o(t.)-1484 b Fi(?)166 2484 y Fu(The)14 b(t)o(w)o(o)e(functions)i(b)q(elo)o(w)h(can)e(b)q(e)i(used)f(for)f (\014nding)i(the)e(lo)o(w)o(er)g(b)q(ound)i(and)f(the)f(upp)q(er)i(b)q (ound)75 2540 y(of)g(a)g(datat)o(yp)q(e.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 57 59 57 58 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(57)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(TYPE)p 293 45 V 17 w(LB\()14 b(datat)o(yp)q(e,)j(displacement\))117 122 y Fk(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(\(handle\))117 197 y(OUT)108 b Fq(displacement)344 b Fk(displacemen)o(t)12 b(of)g(lo)o(w)o(er)g(b)q(ound)g(from)f(origin,) g(in)h(b)o(ytes)h(\(in-)905 254 y(teger\))1937 332 y Fi(>)75 378 y Fo(int)23 b(MPI)p 245 378 15 2 v 17 w(Type)p 358 378 V 17 w(lb\(MPI)p 519 378 V 16 w(Datatype)g(datatype,)g(MPI)p 1061 378 V 16 w(Aint*)h(displacement\))1937 418 y Fi(?)75 465 y Fo(MPI)p 150 465 V 17 w(TYPE)p 263 465 V 16 w(LB\()g(DATATYPE,)e (DISPLACEMENT,)h(IERROR\))170 521 y(INTEGER)g(DATATYPE,)g (DISPLACEMENT,)f(IERROR)75 702 y Fq(MPI)p 160 702 14 2 v 16 w(TYPE)p 293 702 V 17 w(UB\()15 b(datat)o(yp)q(e,)h (displacement\))117 779 y Fk(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(\(handle\))117 855 y(OUT)108 b Fq(displacement)344 b Fk(displacemen)o(t)11 b(of)f(upp)q(er)i(b)q (ound)f(from)f(origin,)g(in)h(b)o(ytes)g(\(in-)905 911 y(teger\))1937 989 y Fi(>)75 1035 y Fo(int)23 b(MPI)p 245 1035 15 2 v 17 w(Type)p 358 1035 V 17 w(ub\(MPI)p 519 1035 V 16 w(Datatype)g(datatype,)g(MPI)p 1061 1035 V 16 w(Aint*)h(displacement\))1937 1076 y Fi(?)75 1122 y Fo(MPI)p 150 1122 V 17 w(TYPE)p 263 1122 V 16 w(UB\()g(DATATYPE,)e (DISPLACEMENT,)h(IERROR\))170 1178 y(INTEGER)g(DATATYPE,)g (DISPLACEMENT,)f(IERROR)1937 1215 y Fi(>)1937 1267 y(?)75 1330 y Fl(1.12.4)49 b(Commit)16 b(and)h(free)75 1416 y Fu(A)j(datat)o(yp)q(e)f(ob)s(ject)g(has)g(to)g(b)q(e)h Fp(committed)g Fu(b)q(efore)g(it)g(can)f(b)q(e)i(used)f(in)g(a)f(comm)o (unication.)34 b(A)75 1472 y(committed)15 b(datat)o(yp)q(e)g(can)h (still)h(b)q(e)f(used)g(as)e(a)i(argumen)o(t)e(in)i(datat)o(yp)q(e)f (constructors.)20 b(There)15 b(is)h(no)75 1529 y(need)g(to)f(commit)g (basic)h(datat)o(yp)q(es.)j(They)c(are)g(\\pre-committed.")75 1680 y Fq(MPI)p 160 1680 14 2 v 16 w(TYPE)p 293 1680 V 17 w(COMMIT\(datat)o(yp)q(e\))117 1757 y Fk(INOUT)62 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(that)g(is)g(committed) e(\(handle\))75 1881 y Fo(int)23 b(MPI)p 245 1881 15 2 v 17 w(Type)p 358 1881 V 17 w(commit\(MPI)p 615 1881 V 16 w(Datatype)f(*datatype\))75 1968 y(MPI)p 150 1968 V 17 w(TYPE)p 263 1968 V 16 w(COMMIT\(DATATYPE,)g(IERROR\))170 2024 y(INTEGER)h(DATATYPE,)g(IERROR)166 2111 y Fu(The)14 b(commit)h(op)q(eration)f(commits)g(the)h(datat)o(yp)q(e,)e(that)h(is,) g(the)h(formal)e(description)j(of)e(a)g(com-)75 2167 y(m)o(unication)h(bu\013er,)f(not)g(the)g(con)o(ten)o(t)f(of)h(that)g (bu\013er.)19 b(Th)o(us,)14 b(after)f(a)h(datat)o(yp)q(e)g(has)g(b)q (een)h(commit-)75 2224 y(ted,)e(it)g(can)f(b)q(e)i(rep)q(eatedly)f (reused)h(to)e(comm)o(unicate)h(the)f(c)o(hanging)h(con)o(ten)o(t)f(of) g(a)h(bu\013er)f(or,)h(indeed,)75 2280 y(the)i(con)o(ten)o(t)g(of)g (di\013eren)o(t)g(bu\013ers,)g(with)g(di\013eren)o(t)h(starting)e (addresses.)189 2386 y Fj(A)n(dvic)n(e)19 b(to)i(implementors.)67 b Fu(The)20 b(system)f(ma)o(y)g(\\compile")i(at)e(commit)g(time)h(an)g (in)o(ternal)189 2443 y(represen)o(tation)f(for)f(the)h(datat)o(yp)q(e) g(that)f(facilitates)i(comm)o(unication,)h(e.g.)31 b(c)o(hange)19 b(from)f(a)189 2499 y(compacted)12 b(represen)o(tation)h(to)f(a)g (\015at)h(represen)o(tation)f(of)h(the)f(datat)o(yp)q(e,)h(and)g (select)g(the)g(most)189 2556 y(con)o(v)o(enien)o(t)i(transfer)g(mec)o (hanism.)20 b(\()p Fj(End)c(of)g(advic)n(e)g(to)h(implementors.)p Fu(\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 58 60 58 59 bop 75 -100 a Fu(58)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(TYPE)p 293 45 V 17 w(FREE\(datat)o(yp)q(e\))117 122 y Fk(INOUT)62 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(that)g(is)g(freed)h(\(handle\))75 247 y Fo(int)23 b(MPI)p 245 247 15 2 v 17 w(Type)p 358 247 V 17 w(free\(MPI)p 567 247 V 16 w(Datatype)g(*datatype\))75 333 y(MPI)p 150 333 V 17 w(TYPE)p 263 333 V 16 w(FREE\(DATATYPE,)f(IERROR\))170 390 y(INTEGER)h(DATATYPE,)g(IERROR)166 476 y Fu(Marks)14 b(the)h(datat)o(yp)q(e)g(ob)s(ject)f(asso)q(ciated)h(with)h Fq(datat)o(yp)q(e)g Fu(for)f(deallo)q(cation)h(and)g(sets)e Fq(datat)o(yp)q(e)75 533 y Fu(to)e Fh(MPI)p 205 533 13 2 v 14 w(D)o(A)m(T)m(A)m(TYPE)p 431 533 V 12 w(NULL)p Fu(.)h(An)o(y)f(comm)o(unication)h(that)e(is)i(curren)o(tly)g(using)g (this)g(datat)o(yp)q(e)e(will)j(com-)75 589 y(plete)19 b(normally)l(.)31 b(Deriv)o(ed)19 b(datat)o(yp)q(es)f(that)g(w)o(ere)g (de\014ned)i(from)e(the)g(freed)h(datat)o(yp)q(e)f(are)g(not)g(af-)75 645 y(fected.)75 752 y Fp(Example)g(1.27)23 b Fu(The)12 b(follo)o(wing)h(co)q(de)h(fragmen)o(t)d(giv)o(es)i(examples)g(of)f (using)h Fq(MPI)p 1530 752 14 2 v 16 w(TYPE)p 1663 752 V 17 w(COMMIT)p Fu(.)75 846 y Fo(INTEGER)23 b(type1,)g(type2)75 902 y(CALL)g(MPI_TYPE_CONTIGUOUS\(5,)e(MPI_REAL,)i(type1,)g(ierr\))409 958 y(!)h(new)f(type)h(object)f(created)75 1015 y(CALL)g (MPI_TYPE_COMMIT\(type1,)e(ierr\))409 1071 y(!)j(now)f(type1)g(can)h (be)f(used)h(for)f(communication)75 1128 y(type2)g(=)h(type1)409 1184 y(!)g(type2)f(can)g(be)h(used)f(for)h(communication)409 1241 y(!)g(\(it)f(is)h(a)g(handle)f(to)g(same)h(object)f(as)g(type1\)) 75 1297 y(CALL)g(MPI_TYPE_VECTOR\(3,)f(5,)h(4,)h(MPI_REAL,)f(type1,)g (ierr\))409 1354 y(!)h(new)f(uncommitted)g(type)g(object)g(created)75 1410 y(CALL)g(MPI_TYPE_COMMIT\(type1,)e(ierr\))409 1467 y(!)j(now)f(type1)g(can)h(be)f(used)h(anew)f(for)h(communication)166 1573 y Fu(F)l(reeing)19 b(a)f(datat)o(yp)q(e)f(do)q(es)i(not)f (a\013ect)f(an)o(y)h(other)g(datat)o(yp)q(e)f(that)h(w)o(as)f(built)j (from)d(the)i(freed)75 1629 y(datat)o(yp)q(e.)32 b(The)20 b(system)e(b)q(eha)o(v)o(es)i(as)f(if)h(input)g(datat)o(yp)q(e)f (argumen)o(ts)g(to)f(deriv)o(ed)j(datat)o(yp)q(e)e(con-)75 1686 y(structors)14 b(are)h(passed)g(b)o(y)h(v)m(alue.)189 1792 y Fj(A)n(dvic)n(e)g(to)i(implementors.)49 b Fu(The)17 b(implemen)o(tation)h(ma)o(y)e(k)o(eep)h(a)g(reference)g(coun)o(t)g(of) f(activ)o(e)189 1848 y(comm)o(unications)h(that)e(use)i(the)f(datat)o (yp)q(e,)g(in)h(order)f(to)g(decide)i(when)f(to)e(free)i(it.)23 b(Also,)17 b(one)189 1905 y(ma)o(y)d(implemen)o(t)j(constructors)e(of)g (deriv)o(ed)h(datat)o(yp)q(es)f(so)g(that)g(they)g(k)o(eep)h(p)q(oin)o (ters)g(to)e(their)189 1961 y(datat)o(yp)q(e)g(argumen)o(ts,)g(rather)h (then)g(cop)o(ying)h(them.)k(In)15 b(this)h(case,)f(one)g(needs)h(to)e (k)o(eep)i(trac)o(k)189 2018 y(of)f(activ)o(e)g(datat)o(yp)q(e)g (de\014nition)i(references)f(in)g(order)g(to)e(kno)o(w)h(when)h(a)f (datat)o(yp)q(e)g(ob)s(ject)g(can)189 2074 y(b)q(e)h(freed.)k(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(implementors.)p Fu(\))75 2196 y Fl(1.12.5)49 b(Use)16 b(of)h(general)f(datat)o(yp)q(es)g(in)h (communication)75 2282 y Fu(Handles)g(to)f(deriv)o(ed)h(datat)o(yp)q (es)f(can)h(b)q(e)f(passed)h(to)f(a)g(comm)o(unication)h(call)g(wherev) o(er)f(a)g(datat)o(yp)q(e)75 2338 y(argumen)o(t)11 b(is)h(required.)19 b(A)12 b(call)g(of)f(the)h(form)e Fq(MPI)p 947 2338 V 16 w(SEND\(buf,)j(count,)g(datat)o(yp)q(e)g(,)f(...\))p Fu(,)e(where)i Fq(count)i Fg(>)75 2395 y Fq(1)p Fu(,)e(is)h(in)o (terpreted)g(as)g(if)g(the)f(call)i(w)o(as)d(passed)i(a)f(new)h(datat)o (yp)q(e)f(whic)o(h)h(is)g(the)g(concatenation)g(of)f Fq(count)75 2451 y Fu(copies)j(of)e Fq(datat)o(yp)q(e)p Fu(.)21 b(Th)o(us,)13 b Fq(MPI)p 666 2451 V 16 w(SEND\(buf,)h(count,)h (datat)o(yp)q(e,)h(dest,)f(tag,)e(comm\))e Fu(is)k(equiv)m(alen)o(t)g (to,)75 2545 y Fo(MPI_TYPE_CONTIGUOUS\(count,)20 b(datatype,)j (newtype\))75 2601 y(MPI_TYPE_COMMIT\(newtype\))75 2658 y(MPI_SEND\(buf,)f(1,)i(newtype,)e(dest,)i(tag,)f(comm\).)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 59 61 59 60 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(59)75 45 y(Similar)25 b(statemen)o(ts)e(apply)h(to)g(all)g (other)g(comm)o(unication)g(functions)h(that)e(ha)o(v)o(e)g(a)h Fq(count)h Fu(and)75 102 y Fq(datat)o(yp)q(e)17 b Fu(argumen)o(t.)166 158 y(Supp)q(ose)22 b(that)e(a)g(send)h(op)q(eration)g Fq(MPI)p 900 158 14 2 v 16 w(SEND\(buf,)h(count,)h(datat)o(yp)q(e,)g (dest,)g(tag,)f(comm\))c Fu(is)75 214 y(executed,)e(where)f Fq(datat)o(yp)q(e)i Fu(has)e(t)o(yp)q(e)g(map,)189 308 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 315 y Fe(0)333 308 y Fg(;)8 b(disp)438 315 y Fe(0)457 308 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 315 y Fd(n)p Ff(\000)p Fe(1)723 308 y Fg(;)h(disp)828 315 y Fd(n)p Ff(\000)p Fe(1)895 308 y Fu(\))p Fi(g)p Fg(;)75 402 y Fu(and)19 b(exten)o(t)f Fg(extent)p Fu(.)31 b(\(Empt)o(y)18 b(en)o(tries)h(of)f(\\pseudo-t)o (yp)q(e")36 b Fh(MPI)p 1252 402 13 2 v 14 w(UB)18 b Fu(and)35 b Fh(MPI)p 1524 402 V 15 w(LB)18 b Fu(are)h(not)f(listed)75 459 y(in)g(the)e(t)o(yp)q(e)h(map,)g(but)g(they)g(a\013ect)f(the)h(v)m (alue)h(of)e Fg(extent)p Fu(.\))26 b(The)17 b(send)g(op)q(eration)g (sends)g Fg(n)12 b Fi(\001)f Fq(count)75 515 y Fu(en)o(tries,)17 b(where)g(en)o(try)g Fg(i)10 b Fi(\001)h Fg(n)g Fu(+)h Fg(j)19 b Fu(is)e(at)f(lo)q(cation)i Fg(addr)1034 522 y Fd(i;j)1088 515 y Fu(=)e Fq(buf)f Fu(+)c Fg(extent)i Fi(\001)e Fg(i)f Fu(+)i Fg(disp)1581 522 y Fd(j)1615 515 y Fu(and)17 b(has)g(t)o(yp)q(e)75 571 y Fg(ty)r(pe)159 578 y Fd(j)178 571 y Fu(,)d(for)f Fg(i)g Fu(=)g(0)p Fg(;)8 b(:::;)g Fq(co)o(unt)f Fi(\000)i Fu(1)k(and)i Fg(j)g Fu(=)e(0)p Fg(;)8 b(:::;)g(n)d Fi(\000)k Fu(1.)19 b(These)c(en)o(tries) f(need)h(not)f(b)q(e)h(con)o(tiguous,)f(nor)75 628 y(distinct;)i(their) g(order)f(can)g(b)q(e)h(arbitrary)l(.)166 684 y(The)g(v)m(ariable)h (stored)e(at)g(address)g Fg(addr)879 691 y Fd(i;j)933 684 y Fu(in)i(the)e(calling)j(program)c(should)j(b)q(e)f(of)f(a)g(t)o (yp)q(e)h(that)75 741 y(matc)o(hes)11 b Fg(ty)r(pe)331 748 y Fd(j)349 741 y Fu(,)h(where)f(t)o(yp)q(e)g(matc)o(hing)h(is)f (de\014ned)i(as)d(in)i(section)g(1.3.1.)17 b(The)11 b(message)g(sen)o (t)g(con)o(tains)75 797 y Fg(n)f Fi(\001)g Fq(count)17 b Fu(en)o(tries,)e(where)g(en)o(try)g Fg(i)10 b Fi(\001)g Fg(n)g Fu(+)g Fg(j)18 b Fu(has)d(t)o(yp)q(e)g Fg(ty)r(pe)1100 804 y Fd(j)1119 797 y Fu(.)166 854 y(Similarly)l(,)g(supp)q(ose)f(that) e(a)h(receiv)o(e)h(op)q(eration)f Fq(MPI)p 1100 854 14 2 v 16 w(RECV\(buf,)h(count,)g(datat)o(yp)q(e,)h(source,)e(tag,)75 910 y(comm,)g(status\))k Fu(is)e(executed,)h(where)g Fq(datat)o(yp)q(e)g Fu(has)g(t)o(yp)q(e)f(map,)189 1004 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 1011 y Fe(0)333 1004 y Fg(;)8 b(disp)438 1011 y Fe(0)457 1004 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 1011 y Fd(n)p Ff(\000)p Fe(1)723 1004 y Fg(;)h(disp)828 1011 y Fd(n)p Ff(\000)p Fe(1)895 1004 y Fu(\))p Fi(g)p Fg(;)75 1098 y Fu(with)17 b(exten)o(t)g Fg(extent)p Fu(.)25 b(\(Again,)17 b(empt)o(y)g(en)o(tries)g(of)f (\\pseudo-t)o(yp)q(e")32 b Fh(MPI)p 1385 1098 13 2 v 15 w(UB)16 b Fu(and)32 b Fh(MPI)p 1653 1098 V 14 w(LB)17 b Fu(are)f(not)75 1154 y(listed)g(in)f(the)f(t)o(yp)q(e)h(map,)f(but)g (they)h(a\013ect)e(the)i(v)m(alue)h(of)e Fg(extent)p Fu(.\))20 b(This)15 b(receiv)o(e)h(op)q(eration)e(receiv)o(es)75 1211 y Fg(n)e Fi(\001)f Fq(count)19 b Fu(en)o(tries,)f(where)f(en)o (try)g Fg(i)12 b Fi(\001)f Fg(n)h Fu(+)g Fg(j)19 b Fu(is)f(at)f(lo)q (cation)h Fq(buf)e Fu(+)c Fg(extent)h Fi(\001)e Fg(i)g Fu(+)h Fg(disp)1579 1218 y Fd(j)1614 1211 y Fu(and)18 b(has)f(t)o(yp)q(e)75 1267 y Fg(ty)r(pe)159 1274 y Fd(j)178 1267 y Fu(.)i(If)c(the)f(incoming)h(message)f(consists)g(of)g Fg(k)h Fu(elemen)o(ts,)g(then)f(w)o(e)g(m)o(ust)g(ha)o(v)o(e)g Fg(k)f Fi(\024)g Fg(n)c Fi(\001)e Fq(count)p Fu(;)16 b(the)75 1324 y Fg(i)10 b Fi(\001)f Fg(n)i Fu(+)f Fg(j)s Fu(-th)15 b(elemen)o(t)h(of)f(the)g(message)g(should)h(ha)o(v)o(e)f(a)f (t)o(yp)q(e)i(that)e(matc)o(hes)h Fg(ty)r(pe)1521 1331 y Fd(j)1540 1324 y Fu(.)166 1380 y(T)o(yp)q(e)10 b(matc)o(hing)g(is)h (de\014ned)h(according)e(to)g(the)g(t)o(yp)q(e)g(signature)h(of)e(the)h (corresp)q(onding)i(datat)o(yp)q(es,)75 1437 y(that)k(is,)h(the)f (sequence)i(of)e(basic)i(t)o(yp)q(e)e(comp)q(onen)o(ts.)24 b(T)o(yp)q(e)17 b(matc)o(hing)g(do)q(es)f(not)h(dep)q(end)h(on)e(some) 75 1493 y(asp)q(ects)k(of)f(the)h(datat)o(yp)q(e)f(de\014nition,)j(suc) o(h)e(as)g(the)f(displacemen)o(ts)j(\(la)o(y)o(out)c(in)j(memory\))e (or)g(the)75 1549 y(in)o(termediate)d(t)o(yp)q(es)f(used.)75 1656 y Fp(Example)j(1.28)23 b Fu(This)c(example)h(sho)o(ws)e(that)h(t)o (yp)q(e)g(matc)o(hing)g(is)h(de\014ned)g(in)g(terms)e(of)h(the)g(basic) 75 1712 y(t)o(yp)q(es)c(that)g(a)g(deriv)o(ed)h(t)o(yp)q(e)f(consists)g (of.)75 1806 y Fo(...)75 1862 y(CALL)23 b(MPI_TYPE_CONTIGUOUS\()e(2,)j (MPI_REAL,)f(type2,)g(...\))75 1919 y(CALL)g(MPI_TYPE_CONTIGUOUS\()e (4,)j(MPI_REAL,)f(type4,)g(...\))75 1975 y(CALL)g (MPI_TYPE_CONTIGUOUS\()e(2,)j(type2,)f(type22,)g(...\))75 2032 y(...)75 2088 y(CALL)g(MPI_SEND\()g(a,)h(4,)f(MPI_REAL,)g(...\))75 2145 y(CALL)g(MPI_SEND\()g(a,)h(2,)f(type2,)g(...\))75 2201 y(CALL)g(MPI_SEND\()g(a,)h(1,)f(type22,)g(...\))75 2258 y(CALL)g(MPI_SEND\()g(a,)h(1,)f(type4,)g(...\))75 2314 y(...)75 2371 y(CALL)g(MPI_RECV\()g(a,)h(4,)f(MPI_REAL,)g(...\))75 2427 y(CALL)g(MPI_RECV\()g(a,)h(2,)f(type2,)g(...\))75 2483 y(CALL)g(MPI_RECV\()g(a,)h(1,)f(type22,)g(...\))75 2540 y(CALL)g(MPI_RECV\()g(a,)h(1,)f(type4,)g(...\))75 2634 y Fu(Eac)o(h)15 b(of)g(the)g(sends)h(matc)o(hes)f(an)o(y)f(of)h (the)g(receiv)o(es.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 60 62 60 61 bop 75 -100 a Fu(60)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)1937 77 y Fi(>)166 124 y Fu(A)g(datat)o(yp)q(e)g(ma)o(y)g(sp)q(ecify)h(o)o(v)o(erlapping)g (en)o(tries.)27 b(The)17 b(use)h(of)f(suc)o(h)g(a)g(datat)o(yp)q(e)g (in)h(a)f(receiv)o(e)75 181 y(op)q(eration)11 b(is)h(erroneous.)18 b(\(This)11 b(is)h(erroneous)e(ev)o(en)i(if)f(the)g(actual)g(message)g (receiv)o(ed)h(is)f(short)g(enough)75 237 y(not)k(to)f(write)i(an)o(y)f (en)o(try)f(more)h(than)g(once.\))1066 b Fi(?)166 294 y Fu(A)19 b(datat)o(yp)q(e)g(ma)o(y)f(sp)q(ecify)i(o)o(v)o(erlapping)g (en)o(tries.)32 b(If)19 b(suc)o(h)h(a)f(datat)o(yp)q(e)f(is)i(used)f (in)h(a)f(receiv)o(e)75 350 y(op)q(eration,)13 b(that)f(is,)i(if)f (some)f(part)h(of)f(the)h(receiv)o(e)g(bu\013er)g(is)h(written)e(more)h (than)f(once)h(b)o(y)g(the)g(receiv)o(e)75 407 y(op)q(eration,)i(then)h (the)f(call)h(is)g(erroneous.)166 463 y(Supp)q(ose)22 b(that)f Fq(MPI)p 540 463 14 2 v 16 w(RECV\(buf,)j(count,)g(datat)o(yp) q(e,)g(dest,)g(tag,)f(comm,)d(status\))j Fu(is)f(executed,)75 519 y(where)15 b Fq(datat)o(yp)q(e)i Fu(has)e(t)o(yp)q(e)h(map,)189 612 y Fi(f)p Fu(\()p Fg(ty)r(pe)314 619 y Fe(0)333 612 y Fg(;)8 b(disp)438 619 y Fe(0)457 612 y Fu(\))p Fg(;)g(:::;)f Fu(\()p Fg(ty)r(pe)657 619 y Fd(n)p Ff(\000)p Fe(1)723 612 y Fg(;)h(disp)828 619 y Fd(n)p Ff(\000)p Fe(1)895 612 y Fu(\))p Fi(g)p Fg(:)75 704 y Fu(The)14 b(receiv)o(ed)h(message)e (need)i(not)f(\014ll)h(all)g(the)e(receiv)o(e)i(bu\013er,)f(nor)f(do)q (es)i(it)f(need)g(to)f(\014ll)j(a)d(n)o(um)o(b)q(er)h(of)75 760 y(lo)q(cations)g(whic)o(h)h(is)f(a)f(m)o(ultiple)j(of)d Fg(n)p Fu(.)20 b(An)o(y)13 b(n)o(um)o(b)q(er,)h Fg(k)q Fu(,)g(of)f(basic)i(elemen)o(ts)f(can)g(b)q(e)g(receiv)o(ed,)h(where)75 816 y(0)d Fi(\024)h Fg(k)h Fi(\024)f Fq(count)8 b Fi(\001)f Fg(n)p Fu(.)19 b(The)13 b(n)o(um)o(b)q(er)h(of)f(basic)h(elemen)o(ts)g (receiv)o(ed)h(can)e(b)q(e)h(retriev)o(ed)g(from)f Fq(status)i Fu(using)75 873 y(the)g(query)h(function)g Fq(MPI)p 543 873 V 16 w(GET)p 647 873 V 16 w(ELEMENTS)p Fu(.)75 1024 y Fq(MPI)p 160 1024 V 16 w(GET)p 264 1024 V 17 w(ELEMENTS\()f(status,)h (datat)o(yp)q(e,)h(count\))117 1101 y Fk(IN)155 b Fq(status)476 b Fk(return)15 b(status)g(of)e(receiv)o(e)i(op)q(eration)f(\(Status\)) 117 1176 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(used)h(b)o(y)f(receiv)o(e)h(op)q(eration)f(\(handle\))117 1251 y(OUT)108 b Fq(count)482 b Fk(n)o(um)o(b)q(er)13 b(of)h(receiv)o(ed)h(basic)f(elemen)o(ts)g(\(in)o(teger\))-160 1329 y Fi(>)75 1375 y Fo(int)23 b(MPI)p 245 1375 15 2 v 17 w(Get)p 334 1375 V 17 w(elements\(MPI)p 639 1375 V 16 w(Status)g(*status,)f(MPI)p 1108 1375 V 17 w(Datatype)h(datatype,) g(int)g(*count\))-160 1415 y Fi(?)75 1462 y Fo(MPI)p 150 1462 V 17 w(GET)p 239 1462 V 17 w(ELEMENTS\(STATUS,)e(DATATYPE,)i (COUNT,)g(IERROR\))170 1518 y(INTEGER)g(STATUS\(MPI)p 604 1518 V 16 w(STATUS)p 764 1518 V 17 w(SIZE\),)g(DATATYPE,)f(COUNT,)h (IERROR)166 1604 y Fu(The)14 b(previously)i(de\014ned)f(function,)g Fq(MPI)p 905 1604 14 2 v 16 w(GET)p 1009 1604 V 17 w(COUNT)f Fu(\(Sec.)20 b(1.2.5\),)12 b(has)i(a)g(di\013eren)o(t)g(b)q(eha)o(v-)75 1661 y(ior.)19 b(It)12 b(returns)g(the)g(n)o(um)o(b)q(er)g(of)g (\\top-lev)o(el)h(en)o(tries")f(receiv)o(ed,)i(i.e.)19 b(the)12 b(n)o(um)o(b)q(er)g(of)g(\\copies")g(of)g(t)o(yp)q(e)-2035 b Fi(>)75 1717 y Fq(datat)o(yp)q(e)p Fu(.)20 b(In)13 b(the)e(previous)i(example,)f Fq(MPI)p 849 1717 V 16 w(GET)p 953 1717 V 17 w(COUNT)g Fu(ma)o(y)f(return)h(an)o(y)f(in)o (teger)h(v)m(alue)h Fg(k)q Fu(,)f(where)-2035 b Fi(?)75 1774 y Fu(0)13 b Fi(\024)g Fg(k)h Fi(\024)f Fq(count)r Fu(.)20 b(If)c Fq(MPI)p 516 1774 V 15 w(GET)p 619 1774 V 17 w(COUNT)g Fu(returns)g Fg(k)q Fu(,)f(then)h(the)f(n)o(um)o(b)q(er) h(of)f(basic)h(elemen)o(ts)g(receiv)o(ed)75 1830 y(\(and)331 b(the)h(v)m(alue)h(returned)f(b)o(y)75 1887 y Fq(MPI)p 160 1887 V 16 w(GET)p 264 1887 V 17 w(ELEMENTS)p Fu(\))19 b(is)h Fg(n)13 b Fi(\001)f Fg(k)q Fu(.)32 b(If)20 b(the)f(n)o(um)o(b)q (er)h(of)f(basic)h(elemen)o(ts)g(receiv)o(ed)g(is)g(not)f(a)g(m)o (ulti-)75 1943 y(ple)g(of)e Fg(n)p Fu(,)i(that)e(is,)h(if)h(the)f (receiv)o(e)h(op)q(eration)f(has)f(not)h(receiv)o(ed)h(an)f(in)o (tegral)g(n)o(um)o(b)q(er)g(of)f Fq(datat)o(yp)q(e)75 2000 y Fu(\\copies,")e(then)h Fq(MPI)p 456 2000 V 16 w(GET)p 560 2000 V 16 w(COUNT)g Fu(returns)f(the)h(v)m(alue)g Fh(MPI)p 1175 2000 13 2 v 14 w(UNDEFINED)p Fu(.)75 2103 y Fp(Example)i(1.29)23 b Fu(Usage)14 b(of)h Fq(MPI)p 676 2103 14 2 v 16 w(GET)p 780 2103 V 17 w(COUNT)h Fu(and)f Fq(MPI)p 1139 2103 V 16 w(GET)p 1243 2103 V 17 w(ELEMENT)p Fu(.)75 2195 y Fo(...)75 2252 y(CALL)23 b(MPI_TYPE_CONTIGUOUS\(2,)e (MPI_REAL,)i(Type2,)g(ierr\))75 2308 y(CALL)g(MPI_TYPE_COMMIT\(Type2,)e (ierr\))75 2365 y(...)75 2421 y(CALL)i(MPI_COMM_RANK\(comm,)f(rank,)h (ierr\))75 2478 y(IF\(rank.EQ.0\))f(THEN)218 2534 y(CALL)h (MPI_SEND\(a,)g(2,)g(MPI_REAL,)g(1,)h(0,)f(comm,)g(ierr\))218 2591 y(CALL)g(MPI_SEND\(a,)g(3,)g(MPI_REAL,)g(1,)h(0,)f(comm,)g(ierr\)) 75 2647 y(ELSE)218 2704 y(CALL)g(MPI_RECV\(a,)g(2,)g(Type2,)g(0,)h(0,)g (comm,)f(stat,)g(ierr\))1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 61 63 61 62 bop 75 -100 a Fm(1.12.)34 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1119 b Fu(61)218 45 y Fo(CALL)23 b(MPI_GET_COUNT\(stat,)f(Type2,)h(i,)g (ierr\))119 b(!)24 b(returns)f(i=1)218 102 y(CALL)g (MPI_GET_ELEMENTS\(stat,)e(Type2,)i(i,)h(ierr\))47 b(!)24 b(returns)f(i=2)218 158 y(CALL)g(MPI_RECV\(a,)g(2,)g(Type2,)g(0,)h(0,)g (comm,)f(stat,)g(ierr\))218 214 y(CALL)g(MPI_GET_COUNT\(stat,)f(Type2,) h(i,)g(ierr\))119 b(!)24 b(returns)f(i=MPI_UNDEFINED)218 271 y(CALL)g(MPI_GET_ELEMENTS\(stat,)e(Type2,)i(i,)h(ierr\))47 b(!)24 b(returns)f(i=3)75 327 y(END)g(IF)166 434 y Fu(The)15 b(function)h Fq(MPI)p 522 434 14 2 v 16 w(GET)p 626 434 V 17 w(ELEMENTS)f Fu(can)g(also)g(b)q(e)g(used)h(after)e(a)h(prob)q(e)g (to)g(\014nd)h(the)f(n)o(um)o(b)q(er)75 490 y(of)20 b(elemen)o(ts)h(in) g(the)f(prob)q(ed)h(message.)34 b(Note)20 b(that)f(the)h(t)o(w)o(o)f (functions)i Fq(MPI)p 1507 490 V 16 w(GET)p 1611 490 V 17 w(COUNT)g Fu(and)75 547 y Fq(MPI)p 160 547 V 16 w(GET)p 264 547 V 17 w(ELEMENTS)15 b Fu(return)g(the)g(same)g(v)m (alues)i(when)e(they)h(are)e(used)i(with)g(basic)g(datat)o(yp)q(es.)189 653 y Fj(R)n(ationale.)38 b Fu(The)14 b(extension)g(giv)o(en)g(to)f (the)h(de\014nition)h(of)e Fq(MPI)p 1303 653 V 16 w(GET)p 1407 653 V 16 w(COUNT)i Fu(seems)e(natural:)189 709 y(one)22 b(w)o(ould)h(exp)q(ect)h(this)f(function)g(to)f(return)h(the)g(v)m (alue)g(of)g(the)f Fq(count)i Fu(argumen)o(t,)f(when)189 766 y(the)c(receiv)o(e)h(bu\013er)g(is)f(\014lled.)34 b(Sometimes)20 b Fq(datat)o(yp)q(e)h Fu(represen)o(ts)e(a)g(basic)h (unit)g(of)f(data)g(one)189 822 y(w)o(an)o(ts)h(to)g(transfer,)i(for)e (example,)j(a)e(record)g(in)h(an)g(arra)o(y)e(of)g(records)h (\(structures\).)37 b(One)189 879 y(should)15 b(b)q(e)h(able)f(to)f (\014nd)i(out)e(ho)o(w)g(man)o(y)g(comp)q(onen)o(ts)h(w)o(ere)g(receiv) o(ed)g(without)g(b)q(othering)h(to)189 935 y(divide)j(b)o(y)e(the)g(n)o (um)o(b)q(er)g(of)g(elemen)o(ts)h(in)g(eac)o(h)f(comp)q(onen)o(t.)26 b(Ho)o(w)o(ev)o(er,)16 b(on)h(other)g(o)q(ccasions,)189 992 y Fq(datat)o(yp)q(e)g Fu(is)f(used)g(to)e(de\014ne)j(a)e(complex)h (la)o(y)o(out)f(of)g(data)g(in)h(the)f(receiv)o(er)h(memory)l(,)f(and)h (do)q(es)189 1048 y(not)h(represen)o(t)g(a)g(basic)i(unit)f(of)f(data)g (for)g(transfers.)26 b(In)18 b(suc)o(h)g(cases,)f(one)h(needs)g(to)f (use)h(the)189 1104 y(function)e Fq(MPI)p 452 1104 V 15 w(GET)p 555 1104 V 17 w(ELEMENTS)p Fu(.)f(\()p Fj(End)h(of)g(r)n (ationale.)p Fu(\))189 1211 y Fj(A)n(dvic)n(e)j(to)h(implementors.)66 b Fu(The)20 b(de\014nition)h(implies)h(that)c(a)i(receiv)o(e)g(cannot)f (c)o(hange)h(the)189 1267 y(v)m(alue)c(of)f(storage)f(outside)h(the)h (en)o(tries)f(de\014ned)i(to)d(comp)q(ose)h(the)h(comm)o(unication)f (bu\013er.)20 b(In)189 1324 y(particular,)13 b(the)f(de\014nition)i (implies)g(that)d(padding)i(space)g(in)g(a)e(structure)h(should)h(not)f (b)q(e)h(mo)q(d-)189 1380 y(i\014ed)h(when)g(suc)o(h)f(a)g(structure)g (is)h(copied)g(from)f(one)g(pro)q(cess)g(to)g(another.)19 b(This)14 b(w)o(ould)f(prev)o(en)o(t)189 1437 y(the)i(ob)o(vious)h (optimization)g(of)f(cop)o(ying)h(the)f(structure,)g(together)g(with)g (the)h(padding,)g(as)f(one)189 1493 y(con)o(tiguous)d(blo)q(c)o(k.)20 b(The)13 b(implemen)o(tation)g(is)g(free)g(to)f(do)g(this)h (optimization)h(when)f(it)g(do)q(es)f(not)189 1549 y(impact)17 b(the)h(outcome)f(of)g(the)h(computation.)26 b(The)18 b(user)f(can)h(\\force")f(this)h(optimization)g(b)o(y)189 1606 y(explicitly)e(including)h(padding)e(as)e(part)g(of)h(the)f (message.)19 b(\()p Fj(End)c(of)g(advic)n(e)g(to)g(implementors.)p Fu(\))75 1728 y Fl(1.12.6)49 b(Co)o(rrect)15 b(use)h(of)g(addresses)75 1813 y Fu(Successiv)o(ely)23 b(declared)f(v)m(ariables)h(in)e(C)g(or)g (F)l(ortran)e(are)i(not)g(necessarily)h(stored)f(at)f(con)o(tiguous)75 1870 y(lo)q(cations.)i(Th)o(us,)16 b(care)g(m)o(ust)f(b)q(e)h (exercised)i(that)d(displacemen)o(ts)i(do)f(not)f(cross)h(from)f(one)h (v)m(ariable)75 1926 y(to)i(another.)28 b(Also,)19 b(in)g(mac)o(hines)g (with)g(a)f(segmen)o(ted)g(address)g(space,)h(addresses)g(are)f(not)f (unique)75 1983 y(and)f(address)g(arithmetic)g(has)g(some)f(p)q (eculiar)j(prop)q(erties.)k(Th)o(us,)16 b(the)g(use)g(of)f Fp(addresses)p Fu(,)g(that)g(is,)75 2039 y(displacemen)o(ts)i(relativ)o (e)e(to)g(the)g(start)f(address)h Fh(MPI)p 1008 2039 13 2 v 15 w(BOTTOM)p Fu(,)f(has)h(to)g(b)q(e)h(restricted.)166 2096 y(V)l(ariables)g(b)q(elong)f(to)f(the)g(same)g Fp(sequen)o(tial)k (storage)c Fu(if)h(they)f(b)q(elong)i(to)e(the)g(same)g(arra)o(y)l(,)g (to)75 2152 y(the)k(same)g Fq(COMMON)g Fu(blo)q(c)o(k)h(in)g(F)l (ortran,)e(or)h(to)f(the)h(same)g(structure)f(in)i(C.)f(V)l(alid)h (addresses)f(are)75 2209 y(de\014ned)f(recursiv)o(ely)f(as)f(follo)o (ws:)131 2315 y(1.)22 b(The)g(function)g Fq(MPI)p 558 2315 14 2 v 16 w(ADDRESS)h Fu(returns)e(a)h(v)m(alid)h(address,)h(when) e(passed)g(as)f(argumen)o(t)g(a)189 2371 y(v)m(ariable)16 b(of)f(the)g(calling)i(program.)131 2465 y(2.)22 b(The)d Fq(buf)h Fu(argumen)o(t)f(of)g(a)g(comm)o(unication)h(function)g(ev)m (aluates)h(to)d(a)h(v)m(alid)i(address,)f(when)189 2522 y(passed)15 b(as)g(argumen)o(t)f(a)h(v)m(ariable)i(of)e(the)g(calling)i (program.)131 2615 y(3.)22 b(If)15 b Fq(v)g Fu(is)h(a)f(v)m(alid)i (address,)d(and)i Fq(i)f Fu(is)g(an)h(in)o(teger,)f(then)g Fq(v+i)g Fu(is)h(a)f(v)m(alid)i(address,)e(pro)o(vided)h Fq(v)f Fu(and)189 2672 y Fq(v+i)g Fu(are)g(in)h(the)f(same)g(sequen)o (tial)h(storage.)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 62 64 62 63 bop 75 -100 a Fu(62)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)131 45 y Fu(4.)22 b(If)15 b Fq(v)g Fu(is)h(a)f(v)m(alid)i(address)e(then)g Fh(MPI)p 806 45 13 2 v 15 w(BOTTOM)e(+)h(v)i Fu(is)f(a)g(v)m(alid)i (address.)166 151 y(A)22 b(correct)g(program)g(uses)g(only)h(v)m(alid)i (addresses)d(to)g(iden)o(tify)i(the)e(lo)q(cations)h(of)f(en)o(tries)h (in)75 208 y(comm)o(unication)16 b(bu\013ers.)k(F)l(urthermore,)14 b(if)h Fq(u)h Fu(and)f Fq(v)g Fu(are)g(t)o(w)o(o)f(v)m(alid)j (addresses,)e(then)g(the)g(\(in)o(teger\))75 264 y(di\013erence)j Fq(u)g(-)g(v)f Fu(can)g(b)q(e)h(computed)g(only)f(if)h(b)q(oth)g Fq(u)f Fu(and)h Fq(v)f Fu(are)g(in)h(the)f(same)g(sequen)o(tial)i (storage.)75 321 y(No)c(other)g(arithmetic)h(op)q(erations)f(can)g(b)q (e)h(meaningfully)h(executed)f(on)g(addresses.)166 377 y(The)21 b(rules)h(ab)q(o)o(v)o(e)f(imp)q(ose)g(no)g(constrain)o(ts)g (on)g(the)g(use)g(of)g(deriv)o(ed)h(datat)o(yp)q(es,)f(as)g(long)g(as) 75 434 y(they)d(are)f(used)h(to)f(de\014ne)h(a)g(comm)o(unication)g (bu\013er)f(that)g(is)h(wholly)h(con)o(tained)f(within)h(the)e(same)75 490 y(sequen)o(tial)23 b(storage.)38 b(Ho)o(w)o(ev)o(er,)22 b(the)g(construction)g(of)f(a)h(comm)o(unication)g(bu\013er)g(that)f (con)o(tains)75 547 y(v)m(ariables)f(that)f(are)g(not)g(within)h(the)f (same)g(sequen)o(tial)h(storage)e(m)o(ust)h(ob)q(ey)g(certain)h (restrictions.)75 603 y(Basically)l(,)g(a)e(comm)o(unication)h (bu\013er)f(with)g(v)m(ariables)i(that)d(are)h(not)g(within)h(the)f (same)g(sequen)o(tial)75 659 y(storage)g(can)h(b)q(e)h(used)g(only)g(b) o(y)f(sp)q(ecifying)i(in)f(the)g(comm)o(unication)g(call)g Fq(buf)g(=)g(MPI)p 1651 659 14 2 v 16 w(BOTTOM)p Fu(,)75 716 y Fq(count)i(=)g(1)p Fu(,)g(and)f(using)h(a)f Fq(datat)o(yp)q(e)i Fu(argumen)o(t)d(where)i(all)g(displacemen)o(ts)h(are)d(v)m(alid)j (\(absolute\))75 772 y(addresses.)189 879 y Fj(A)n(dvic)n(e)15 b(to)i(users.)43 b Fu(It)15 b(is)h(not)g(exp)q(ected)g(that)f Fq(MPI)g Fu(implemen)o(tations)i(will)g(b)q(e)f(able)h(to)e(detect)189 935 y(erroneous,)20 b(\\out)f(of)g(b)q(ound")h(displacemen)o(ts)h(|)f (unless)g(those)f(o)o(v)o(er\015o)o(w)g(the)g(user)h(address)189 992 y(space)15 b(|)g(since)g(the)g Fq(MPI)f Fu(call)i(ma)o(y)e(not)g (kno)o(w)h(the)f(exten)o(t)h(of)f(the)h(arra)o(ys)e(and)i(records)f(in) i(the)189 1048 y(host)e(program.)19 b(\()p Fj(End)d(of)g(advic)n(e)g (to)h(users.)p Fu(\))189 1154 y Fj(A)n(dvic)n(e)h(to)h(implementors.)57 b Fu(There)18 b(is)g(no)g(need)h(to)f(distinguish)i(\(absolute\))e (addresses)g(and)189 1211 y(\(relativ)o(e\))12 b(displacemen)o(ts)i(on) e(a)g(mac)o(hine)h(with)g(con)o(tiguous)f(address)h(space:)18 b Fh(MPI)p 1638 1211 13 2 v 15 w(BOTTOM)11 b Fu(is)189 1267 y(zero,)j(and)g(b)q(oth)g(addresses)h(and)f(displacemen)o(ts)i (are)e(in)o(tegers.)19 b(On)c(mac)o(hines)g(where)g(the)f(dis-)189 1324 y(tinction)d(is)g(required,)h(addresses)f(are)f(recognized)i(as)e (expressions)i(that)d(in)o(v)o(olv)o(e)i Fh(MPI)p 1668 1324 V 15 w(BOTTOM)p Fu(.)189 1380 y(\()p Fj(End)k(of)i(advic)n(e)f(to) g(implementors.)p Fu(\))75 1502 y Fl(1.12.7)49 b(Alternative)17 b(to)f(p)o(revious)g(subsection)-160 1541 y Fi(>)75 1588 y Fu(The)h(use)f(of)g(addresses)h(and)f(displacemen)o(ts)i(in)g Fq(MPI)d Fu(is)i(b)q(est)g(understo)q(o)q(d)g(in)g(the)g(con)o(text)e (of)h(a)g(\015at)75 1644 y(address)h(space.)24 b(Then,)16 b(the)h(\\address")f(of)g(a)g(lo)q(cation,)h(as)g(computed)f(b)o(y)h (calls)g(to)f Fq(MPI)p 1659 1644 14 2 v 16 w(ADDRESS)75 1701 y Fu(can)k(b)q(e)g(the)g(regular)f(address)h(of)f(that)g(lo)q (cation)h(\(or)f(a)g(shift)h(of)f(it\),)h(and)g(in)o(teger)g (arithmetics)g(on)75 1757 y Fq(MPI)15 b Fu(\\addresses")f(yields)j(the) e(exp)q(ected)i(result.)j(Ho)o(w)o(ev)o(er,)14 b(the)h(use)h(of)e(a)h (\015at)g(address)g(space)h(is)f(not)75 1813 y(mandated)h(b)o(y)h(C)f (or)g(F)l(ortran.)23 b(Another)17 b(p)q(oten)o(tial)g(source)g(of)f (problems)h(is)g(that)f(\(32)f(bit\))i(F)l(ortran)75 1870 y Fo(INTEGER)p Fu('s)d(ma)o(y)g(b)q(e)i(to)q(o)f(short)f(to)h (store)f(full)j(\(64)d(bit\))h(addresses.)166 1926 y(V)l(ariables)h(b)q (elong)f(to)f(the)g(same)g Fp(sequen)o(tial)k(storage)c Fu(if)h(they)f(b)q(elong)i(to)e(the)g(same)g(arra)o(y)l(,)g(to)75 1983 y(the)g(same)f Fq(COMMON)h Fu(blo)q(c)o(k)h(in)f(F)l(ortran,)f(or) g(to)g(the)g(same)h(structure)f(in)i(C.)e Fq(MPI)g Fu(guaran)o(tees)f (p)q(orta-)75 2039 y(bilit)o(y)i(of)d(co)q(de)i(where)f(the)g Fq(bu\013er)g Fu(argumen)o(t)f(in)i(a)f(comm)o(unication)h(call)g(is)f (alw)o(a)o(ys)g(a)f(regular)i(memory)75 2096 y(lo)q(cation)h(\(rather)f (than)h Fh(MPI)p 581 2096 13 2 v 14 w(BOTTOM)p Fu(\),)f(and)g(the)h Fq(datat)o(yp)q(e)i Fu(argumen)o(t)c(sp)q(eci\014es)k(a)d(comm)o (unication)75 2152 y(bu\013er)18 b(that)g(is)g(within)i(the)e(same)g (sequen)o(tial)i(storage)d(as)g(the)i Fq(bu\013er)f Fu(lo)q(cation.)30 b(Implemen)o(tations)75 2209 y(ma)o(y)14 b(restrict)h(the)h(use)f(of)g (absolute)g(addresses)g(to)g(only)h(part)e(of)h(the)g(pro)q(cess)g (memory)l(,)g(and)g(restrict)75 2265 y(the)g(use)h(of)f(relativ)o(e)g (displacemen)o(ts)i(to)e(subranges)g(of)g(the)g(pro)q(cess)g(memory)l (.)189 2371 y Fj(A)n(dvic)n(e)h(to)h(users.)44 b Fu(Curren)o(t)16 b Fq(MPI)f Fu(implemen)o(tations)i(imp)q(ose)g(no)f(restrictions)g(on)g (the)g(use)g(of)189 2428 y(addresses.)k(\()p Fj(End)15 b(of)i(advic)n(e)f(to)g(users.)p Fu(\))-160 2489 y Fi(?)75 2599 y Fl(1.12.8)49 b(Examples)75 2685 y Fu(The)15 b(follo)o(wing)h (examples)g(illustrate)h(the)e(use)g(of)g(deriv)o(ed)h(datat)o(yp)q (es.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 63 65 63 64 bop 75 -100 a Fm(1.12.)29 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1124 b Fu(63)75 45 y Fp(Example)18 b(1.30)23 b Fu(Send)16 b(and)f(receiv)o(e)h(a)f(section)h(of)f(a)f(3D)h(arra)o(y)l(.)218 151 y Fo(REAL)23 b(a\(100,100,100\),)f(e\(9,9,9\))218 208 y(INTEGER)h(oneslice,)g(twoslice,)f(threeslice,)h(sizeofreal,)f (myrank,)h(ierr)218 264 y(INTEGER)g(status\(MPI_STATUS_SIZE\))75 377 y(C)143 b(extract)23 b(the)g(section)g(a\(1:17:2,)g(3:11,)g(2:10\)) 75 434 y(C)143 b(and)23 b(store)h(it)f(in)h(e\(:,:,:\).)218 547 y(CALL)f(MPI_COMM_RANK\(MPI_COMM_WORLD,)d(myrank\))218 659 y(CALL)j(MPI_TYPE_EXTENT\()f(MPI_REAL,)h(sizeofreal,)f(ierr\))75 772 y(C)119 b(create)23 b(datatype)g(for)g(a)h(1D)g(section)218 829 y(CALL)f(MPI_TYPE_VECTOR\()f(9,)i(1,)f(2,)h(MPI_REAL,)f(oneslice,)f (ierr\))75 942 y(C)119 b(create)23 b(datatype)g(for)g(a)h(2D)g(section) 218 998 y(CALL)f(MPI_TYPE_HVECTOR\(9,)f(1,)h(100*sizeofreal,)f (oneslice,)h(twoslice,)f(ierr\))75 1111 y(C)119 b(create)23 b(datatype)g(for)g(the)h(entire)f(section)218 1168 y(CALL)g (MPI_TYPE_HVECTOR\()f(9,)i(1,)f(100*100*sizeofreal,)e(twoslice,)i(1,) 767 1224 y(threeslice,)f(ierr\))218 1337 y(CALL)h(MPI_TYPE_COMMIT\()f (threeslice,)h(ierr\))218 1393 y(CALL)g(MPI_SENDRECV\(a\(1,3,2\),)e(1,) j(threeslice,)e(myrank,)h(0,)h(e,)f(9*9*9,)648 1450 y(MPI_REAL,)f (myrank,)h(0,)h(MPI_COMM_WORLD,)e(status,)h(ierr\))75 1556 y Fp(Example)18 b(1.31)23 b Fu(Cop)o(y)14 b(the)h(\(strictly\))h (lo)o(w)o(er)e(triangular)i(part)e(of)h(a)g(matrix.)218 1662 y Fo(REAL)23 b(a\(100,100\),)g(b\(100,100\))218 1719 y(INTEGER)47 b(disp\(100\),)22 b(blocklen\(100\),)g(ltype,)h (myrank,)g(ierr)218 1775 y(INTEGER)g(status\(MPI_STATUS_SIZE\))75 1888 y(C)119 b(copy)23 b(lower)h(triangular)e(part)h(of)h(array)f(a)75 1945 y(C)119 b(onto)23 b(lower)h(triangular)e(part)h(of)h(array)f(b)218 2058 y(CALL)g(MPI_COMM_RANK\(MPI_COMM_WORLD,)d(myrank\))75 2170 y(C)119 b(compute)23 b(start)g(and)h(size)f(of)h(each)f(column)218 2227 y(DO)h(i=1,)f(100)266 2283 y(disp\(i\))g(=)h(100*\(i-1\))e(+)i(i) 266 2340 y(block\(i\))f(=)g(100-i)218 2396 y(END)h(DO)75 2509 y(C)119 b(create)23 b(datatype)g(for)g(lower)h(triangular)e(part) 218 2566 y(CALL)h(MPI_TYPE_INDEXED\()f(100,)h(block,)g(disp,)h (MPI_REAL,)e(ltype,)h(ierr\))218 2679 y(CALL)g(MPI_TYPE_COMMIT\(ltype,) e(ierr\))-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 64 66 64 65 bop 75 -100 a Fu(64)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)218 45 y Fo(CALL)23 b(MPI_SENDRECV\()g(a,)g(1,)h(ltype,)f(myrank,)g(0,)g(b,)h(1,)552 102 y(ltype,)f(myrank,)g(0,)h(MPI_COMM_WORLD,)e(status,)h(ierr\))75 205 y Fp(Example)18 b(1.32)23 b Fu(T)l(ransp)q(ose)15 b(a)g(matrix.)218 307 y Fo(REAL)23 b(a\(100,100\),)g(b\(100,100\))218 364 y(INTEGER)g(row,)g(xpose,)g(sizeofreal,)g(myrank,)g(ierr)218 420 y(INTEGER)g(status\(MPI_STATUS_SIZE\))75 533 y(C)119 b(transpose)23 b(matrix)g(a)h(onto)f(b)218 646 y(CALL)g (MPI_COMM_RANK\(MPI_COMM_WORLD,)d(myrank\))218 759 y(CALL)j (MPI_TYPE_EXTENT\()f(MPI_REAL,)h(sizeofreal,)f(ierr\))75 872 y(C)119 b(create)23 b(datatype)g(for)g(one)h(row)218 928 y(CALL)f(MPI_TYPE_VECTOR\()f(100,)h(1,)h(100,)f(MPI_REAL,)g(row,)g (ierr\))75 1041 y(C)119 b(create)23 b(datatype)g(for)g(matrix)g(in)h (row-major)f(order)218 1098 y(CALL)g(MPI_TYPE_HVECTOR\()f(100,)h(1,)h (sizeofreal,)e(row,)i(xpose,)f(ierr\))218 1211 y(CALL)g (MPI_TYPE_COMMIT\()f(xpose,)h(ierr\))75 1324 y(C)119 b(send)23 b(matrix)h(in)f(row-major)g(order)g(and)g(receive)g(in)h (column)f(major)g(order)218 1380 y(CALL)g(MPI_SENDRECV\()g(a,)g(1,)h (xpose,)f(myrank,)g(0,)g(b,)h(100*100,)457 1437 y(MPI_REAL,)e(myrank,)h (0,)h(MPI_COMM_WORLD,)e(status,)h(ierr\))75 1540 y Fp(Example)18 b(1.33)23 b Fu(Another)15 b(approac)o(h)f(to)h(the)g(transp)q(ose)g (problem:)218 1631 y Fo(REAL)23 b(a\(100,100\),)g(b\(100,100\))218 1687 y(INTEGER)47 b(disp\(2\),)23 b(blocklen\(2\),)f(type\(2\),)h(row,) g(row1,)g(sizeofreal)218 1744 y(INTEGER)47 b(myrank,)23 b(ierr)218 1800 y(INTEGER)g(status\(MPI_STATUS_SIZE\))218 1913 y(CALL)g(MPI_COMM_RANK\(MPI_COMM_WORLD,)d(myrank\))75 2026 y(C)119 b(transpose)23 b(matrix)g(a)h(onto)f(b)218 2139 y(CALL)g(MPI_TYPE_EXTENT\()f(MPI_REAL,)h(sizeofreal,)f(ierr\))75 2252 y(C)119 b(create)23 b(datatype)g(for)g(one)h(row)218 2308 y(CALL)f(MPI_TYPE_VECTOR\()f(100,)h(1,)h(100,)f(MPI_REAL,)g(row,)g (ierr\))75 2421 y(C)119 b(create)23 b(datatype)g(for)g(one)h(row,)f (with)h(the)f(extent)g(of)h(one)f(real)g(number)218 2478 y(disp\(1\))g(=)h(0)218 2534 y(disp\(2\))f(=)h(sizeofreal)218 2591 y(type\(1\))47 b(=)24 b(row)218 2647 y(type\(2\))47 b(=)24 b(MPI_UB)218 2704 y(blocklen\(1\))46 b(=)24 b(1)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 65 67 65 66 bop 75 -100 a Fm(1.12.)29 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1124 b Fu(65)218 45 y Fo(blocklen\(2\))46 b(=)24 b(1)218 102 y(CALL)f(MPI_TYPE_STRUCT\()f(2,)i(blocklen,)e(disp,)i(type,)f (row1,)g(ierr\))218 214 y(CALL)g(MPI_TYPE_COMMIT\()f(row1,)h(ierr\))75 327 y(C)119 b(send)23 b(100)h(rows)f(and)h(receive)f(in)g(column)g (major)g(order)218 384 y(CALL)g(MPI_SENDRECV\()g(a,)g(100,)g(row1,)h (myrank,)f(0,)g(b,)h(100*100,)457 440 y(MPI_REAL,)e(myrank,)h(0,)h (MPI_COMM_WORLD,)e(status,)h(ierr\))75 547 y Fp(Example)18 b(1.34)23 b Fu(W)l(e)15 b(manipulate)h(an)f(arra)o(y)f(of)h (structures.)75 653 y Fo(struct)23 b(Partstruct)147 709 y({)147 766 y(int)95 b(class;)47 b(/*)23 b(particle)g(class)g(*/)147 822 y(double)g(d[6];)71 b(/*)23 b(particle)g(coordinates)f(*/)147 879 y(char)71 b(b[7];)g(/*)23 b(some)g(additional)g(information)f(*/) 147 935 y(};)75 1048 y(struct)h(Partstruct)94 b(particle[1000];)75 1161 y(int)429 b(i,)24 b(dest,)f(rank;)75 1217 y(MPI_Comm)118 b(comm;)75 1387 y(/*)24 b(build)f(datatype)g(describing)f(structure)h (*/)75 1500 y(MPI_Datatype)f(Particletype;)75 1556 y(MPI_Datatype)g (type[3])h(=)h({MPI_INT,)e(MPI_DOUBLE,)h(MPI_CHAR};)75 1613 y(int)238 b(blocklen[3])23 b(=)g({1,)h(6,)f(7};)75 1669 y(MPI_Aint)118 b(disp[3];)75 1725 y(int)238 b(base;)75 1895 y(/*)24 b(compute)e(displacements)h(of)g(structure)g(components)f (*/)75 2008 y(MPI_Address\()g(particle,)h(disp\);)75 2064 y(MPI_Address\()f(particle[0].d,)g(disp+1\);)75 2121 y(MPI_Address\()g(particle[0].b,)g(disp+2\);)75 2177 y(base)h(=)h(disp[0];)75 2234 y(for)f(\(i=0;)h(i)f(<3;)h(i++\))f (disp[i])g(-=)h(base;)75 2346 y(MPI_Type_struct\()e(3,)h(blocklen,)g (disp,)g(type,)g(&Particletype\);)147 2459 y(/*)g(If)h(compiler)f(does) g(padding)g(in)g(mysterious)g(ways,)147 2516 y(the)g(following)g(may)g (be)h(safer)f(*/)75 2629 y(MPI_Datatype)f(type1[4])h(=)h({MPI_INT,)e (MPI_DOUBLE,)h(MPI_CHAR,)f(MPI_UB};)75 2685 y(int)238 b(blocklen1[4])22 b(=)i({1,)g(6,)f(7,)h(1};)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 66 68 66 67 bop 75 -100 a Fu(66)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fo(MPI_Aint)118 b(disp1[4];)75 158 y(/*)24 b(compute)e(displacements)h(of)g(structure)g (components)f(*/)75 271 y(MPI_Address\()g(particle,)h(disp1\);)75 327 y(MPI_Address\()f(particle[0].d,)g(disp1+1\);)75 384 y(MPI_Address\()g(particle[0].b,)g(disp1+2\);)75 440 y(MPI_Address\()g(particle+1,)h(disp1+3\);)75 497 y(base)g(=)h(disp1[0];)75 553 y(for)f(\(i=0;)h(i)f(<4;)h(i++\))f (disp1[i])g(-=)g(base;)75 666 y(/*)h(build)f(datatype)g(describing)f (structure)h(*/)75 779 y(MPI_Type_struct\()f(4,)h(blocklen1,)g(disp1,)g (type1,)g(&Particletype\);)409 948 y(/*)h(4.1:)266 1005 y(send)f(the)h(entire)f(array)g(*/)75 1118 y(MPI_Type_commit\()f (&Particletype\);)75 1174 y(MPI_Send\()h(particle,)f(1000,)h (Particletype,)g(dest,)g(tag,)g(comm\);)409 1344 y(/*)h(4.2:)266 1400 y(send)f(only)h(the)f(entries)g(of)g(class)h(zero)f(particles,)266 1456 y(preceded)g(by)g(the)h(number)f(of)g(such)h(entries)f(*/)75 1569 y(MPI_Datatype)f(Zparticles;)70 b(/*)24 b(datatype)f(describing)f (all)i(particles)791 1626 y(with)f(class)g(zero)h(\(needs)f(to)g(be)h (recomputed)791 1682 y(if)f(classes)g(change\))g(*/)75 1739 y(MPI_Datatype)f(Ztype;)75 1852 y(MPI_Aint)118 b(zdisp[1000];)75 1908 y(int)23 b(zblock[1000],)g(j,)g(k;)75 1965 y(int)g(zzblock[2])g(=) h({1,1};)75 2021 y(MPI_Aint)118 b(zzdisp[2];)75 2077 y(MPI_Datatype)22 b(zztype[2];)75 2190 y(/*)i(compute)e(displacements)h (of)g(class)g(zero)h(particles)e(*/)75 2247 y(j)i(=)f(0;)75 2303 y(for\(i=0;)g(i)g(<)h(1000;)f(i++\))123 2360 y(if)g (\(particle[i].class==0\))194 2416 y({)194 2473 y(zdisp[j])g(=)h(i;)194 2529 y(zblock[j])f(=)h(1;)194 2586 y(j++;)194 2642 y(})1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 67 69 67 68 bop 75 -100 a Fm(1.12.)29 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1124 b Fu(67)75 45 y Fo(/*)24 b(create)f(datatype)f(for)i(class)f(zero) g(particles)47 b(*/)75 102 y(MPI_Type_indexed\()22 b(j,)h(zblock,)g (zdisp,)g(Particletype,)f(&Zparticles\);)75 214 y(/*)i(prepend)e (particle)h(count)g(*/)75 271 y(MPI_Address\(&j,)f(zzdisp\);)75 327 y(MPI_Address\(particle,)f(zzdisp+1\);)75 384 y(zztype[0])i(=)g (MPI_INT;)75 440 y(zztype[1])g(=)g(Zparticles;)75 497 y(MPI_Type_struct\(2,)e(zzblock,)i(zzdisp,)g(zztype,)g(&Ztype\);)75 610 y(MPI_Type_commit\()f(&Ztype\);)75 666 y(MPI_Send\()h(MPI_BOTTOM,)f (1,)i(Ztype,)f(dest,)g(tag,)g(comm\);)242 835 y(/*)h(A)f(probably)g (more)g(efficient)g(way)h(of)f(defining)g(Zparticles)f(*/)75 948 y(/*)i(consecutive)e(particles)h(with)g(index)g(zero)g(are)h (handled)f(as)g(one)h(block)f(*/)75 1005 y(j=0;)75 1061 y(for)g(\(i=0;)h(i)f(<)h(1000;)f(i++\))123 1118 y(if)g (\(particle[i].index==0\))170 1174 y({)170 1231 y(for)h(\(k=i+1;)f(\(k) g(<)h(1000\)&&\(particle[k].index)d(==)i(0\))h(;)f(k++\);)170 1287 y(zdisp[j])g(=)h(i;)170 1344 y(zblock[j])f(=)h(k-i;)170 1400 y(j++;)170 1456 y(i)g(=)g(k;)170 1513 y(})75 1569 y(MPI_Type_indexed\()e(j,)h(zblock,)g(zdisp,)g(Particletype,)f (&Zparticles\);)457 1739 y(/*)h(4.3:)314 1795 y(send)g(the)g(first)h (two)f(coordinates)f(of)i(all)f(entries)g(*/)75 1908 y(MPI_Datatype)f(Allpairs;)142 b(/*)24 b(datatype)f(for)g(all)g(pairs)h (of)f(coordinates)g(*/)75 2021 y(MPI_Aint)g(sizeofentry;)75 2134 y(MPI_Type_extent\()f(Particletype,)g(&sizeofentry\);)194 2247 y(/*)i(sizeofentry)e(can)i(also)f(be)h(computed)e(by)i (subtracting)e(the)i(address)266 2303 y(of)f(particle[0])g(from)g(the)h (address)f(of)g(particle[1])f(*/)75 2416 y(MPI_Type_hvector\()g(1000,)h (2,)g(sizeofentry,)g(MPI_DOUBLE,)f(&Allpairs\);)75 2473 y(MPI_Type_commit\()g(&Allpairs\);)75 2529 y(MPI_Send\()h (particle[0].d,)f(1,)h(Allpairs,)g(dest,)g(tag,)g(comm\);)218 2642 y(/*)h(an)f(alternative)g(solution)f(to)i(4.3)g(*/)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 68 70 68 69 bop 75 -100 a Fu(68)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fo(MPI_Datatype)22 b(Onepair;)71 b(/*)23 b(datatype)g(for)h(one)f(pair)g(of)h (coordinates,)e(with)695 102 y(the)i(extent)f(of)h(one)f(particle)g (entry)g(*/)75 158 y(MPI_Aint)g(disp2[3];)75 214 y(MPI_Datatype)f (type2[3])h(=)h({MPI_LB,)e(MPI_DOUBLE,)h(MPI_UB};)75 271 y(int)g(blocklen2[3])g(=)g({1,)h(2,)f(1};)75 384 y(MPI_Address\()f(particle,)h(disp2\);)75 440 y(MPI_Address\()f (particle[0].d,)g(disp2+1\);)75 497 y(MPI_Address\()g(particle+1,)h (disp2+2\);)75 553 y(base)g(=)h(disp2[0];)75 610 y(for)f(\(i=0;)h(i<2;) f(i++\))g(disp2[i])g(-=)h(base;)75 723 y(MPI_Type_struct\()e(3,)h (blocklen2,)g(disp2,)g(type2,)g(&Onepair\);)75 779 y(MPI_Type_commit\() f(&Onepair\);)75 835 y(MPI_Send\()h(particle[0].d,)f(1000,)h(Onepair,)g (dest,)g(tag,)g(comm\);)75 998 y Fp(Example)18 b(1.35)23 b Fu(The)15 b(same)g(manipulations)i(as)e(in)h(the)g(previous)g (example,)g(but)f(use)h(absolute)g(ad-)75 1055 y(dresses)f(in)h(datat)o (yp)q(es.)75 1161 y Fo(struct)23 b(Partstruct)147 1217 y({)147 1274 y(int)g(class;)147 1330 y(double)g(d[6];)147 1387 y(char)g(b[7];)147 1443 y(};)75 1556 y(struct)g(Partstruct)g (particle[1000];)337 1669 y(/*)h(build)f(datatype)g(describing)g(first) g(array)g(entry)g(*/)75 1782 y(MPI_Datatype)f(Particletype;)75 1838 y(MPI_Datatype)g(type[3])h(=)h({MPI_INT,)e(MPI_DOUBLE,)h (MPI_CHAR};)75 1895 y(int)238 b(block[3])23 b(=)h({1,)f(6,)h(7};)75 1951 y(MPI_Aint)118 b(disp[3];)75 2064 y(MPI_Address\()22 b(particle,)h(disp\);)75 2121 y(MPI_Address\()f(particle[0].d,)g (disp+1\);)75 2177 y(MPI_Address\()g(particle[0].b,)g(disp+2\);)75 2234 y(MPI_Type_struct\()g(3,)h(block,)g(disp,)g(type,)h (&Particletype\);)75 2346 y(/*)g(Particletype)e(describes)g(first)i (array)f(entry)g(--)h(using)f(absolute)147 2403 y(addresses)f(*/)505 2516 y(/*)h(5.1:)361 2572 y(send)h(the)f(entire)g(array)g(*/)75 2685 y(MPI_Type_commit\()f(&Particletype\);)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 69 71 69 70 bop 75 -100 a Fm(1.12.)29 b(DERIVED)15 b(D)o(A)l(T)l(A)l(TYPES) 1124 b Fu(69)75 45 y Fo(MPI_Send\()23 b(MPI_BOTTOM,)f(1000,)h (Particletype,)f(dest,)h(tag,)h(comm\);)481 214 y(/*)f(5.2:)290 271 y(send)g(the)h(entries)e(of)i(class)f(zero,)290 327 y(preceded)g(by)g(the)h(number)f(of)g(such)h(entries)e(*/)75 440 y(MPI_Datatype)g(Zparticles,)h(Ztype;)75 553 y(MPI_Aint)g (zdisp[1000])75 610 y(int)g(zblock[1000],)g(i,)g(j,)h(k;)75 666 y(int)f(zzblock[2])g(=)h({1,1};)75 723 y(MPI_Datatype)e(zztype[2];) 75 779 y(MPI_Aint)118 b(zzdisp[2];)75 892 y(j=0;)75 948 y(for)23 b(\(i=0;)h(i)f(<)h(1000;)f(i++\))123 1005 y(if)g (\(particle[i].index==0\))170 1061 y({)170 1118 y(for)h(\(k=i+1;)f(\(k) g(<)h(1000\)&&\(particle[k].index)d(=)i(0\))h(;)g(k++\);)170 1174 y(zdisp[j])f(=)h(i;)170 1231 y(zblock[j])f(=)h(k-i;)170 1287 y(j++;)170 1344 y(i)g(=)g(k;)170 1400 y(})75 1456 y(MPI_Type_indexed\()e(j,)h(zblock,)g(zdisp,)g(Particletype,)f (&Zparticles\);)75 1513 y(/*)i(Zparticles)e(describe)h(particles)f (with)i(class)f(zero,)g(using)147 1569 y(their)g(absolute)g (addresses*/)75 1682 y(/*)h(prepend)e(particle)h(count)g(*/)75 1739 y(MPI_Address\(&j,)f(zzdisp\);)75 1795 y(zzdisp[1])h(=)g (MPI_BOTTOM;)75 1852 y(zztype[0])g(=)g(MPI_INT;)75 1908 y(zztype[1])g(=)g(Zparticles;)75 1965 y(MPI_Type_struct\(2,)e(zzblock,) i(zzdisp,)g(zztype,)g(&Ztype\);)75 2077 y(MPI_Type_commit\()f (&Ztype\);)75 2134 y(MPI_Send\()h(MPI_BOTTOM,)f(1,)i(Ztype,)f(dest,)g (tag,)g(comm\);)75 2297 y Fp(Example)18 b(1.36)23 b Fu(Handling)16 b(of)f(unions.)75 2403 y Fo(union)23 b({)147 2459 y(int)118 b(ival;)147 2516 y(float)70 b(fval;)218 2572 y(})24 b(u[1000])75 2685 y(int)119 b(utype;)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 70 72 70 71 bop 75 -100 a Fu(70)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 102 y Fo(/*)24 b(All)f(entries)g(of)h(u)f(have)h(identical)e(type;)h(variable)147 158 y(utype)g(keeps)g(track)g(of)h(their)f(current)g(type)g(*/)75 271 y(MPI_Datatype)70 b(type[2];)75 327 y(int)286 b(blocklen[2])22 b(=)i({1,1};)75 384 y(MPI_Aint)166 b(disp[2];)75 440 y(MPI_Datatype)70 b(mpi_utype[2];)75 497 y(MPI_Aint)166 b(i,j;)75 610 y(/*)24 b(compute)e(an)i(MPI)g(datatype)e(for)i(each)f (possible)g(union)g(type;)147 666 y(assume)g(values)g(are)g (left-aligned)f(in)i(union)f(storage.)g(*/)75 779 y(MPI_Address\()f(u,) i(&i\);)75 835 y(MPI_Address\()e(u+1,)i(&j\);)75 892 y(disp[0])f(=)h(0;)f(disp[1])g(=)h(j-i;)75 948 y(type[1])f(=)h(MPI_UB;) 75 1061 y(type[0])f(=)h(MPI_INT;)75 1118 y(MPI_Type_struct\(2,)d (blocklen,)i(disp,)g(type,)g(&mpi_utype[0]\);)75 1231 y(type[0])g(=)h(MPI_FLOAT;)75 1287 y(MPI_Type_struct\(2,)d(blocklen,)i (disp,)g(type,)g(&mpi_utype[1]\);)75 1400 y(for\(i=0;)g(i<2;)g(i++\))g (MPI_Type_commit\(&mpi_utype[i])o(\);)75 1513 y(/*)h(actual)f (communication)f(*/)75 1626 y(MPI_Send\(u,)g(1000,)i(mpi_utype[utype],) d(dest,)i(tag,)h(comm\);)75 1769 y Fr(1.13)59 b(P)n(ack)20 b(and)f(unpack)75 1871 y Fu(Some)c(existing)i(comm)o(unication)e (libraries)i(pro)o(vide)f(pac)o(k/unpac)o(k)f(functions)h(for)f (sending)h(noncon-)75 1927 y(tiguous)c(data.)19 b(In)13 b(these,)f(the)h(user)f(explicitly)j(pac)o(ks)d(data)g(in)o(to)g(a)g (con)o(tiguous)h(bu\013er)f(b)q(efore)h(sending)75 1983 y(it,)h(and)h(unpac)o(ks)g(it)f(from)g(a)g(con)o(tiguous)h(bu\013er)f (after)g(receiving)i(it.)k(Deriv)o(ed)14 b(datat)o(yp)q(es,)g(whic)o(h) h(are)75 2040 y(describ)q(ed)g(in)e(Section)h(1.12,)e(allo)o(w)h(one,)g (in)h(most)e(cases,)g(to)h(a)o(v)o(oid)f(explicit)j(pac)o(king)e(and)g (unpac)o(king.)75 2096 y(The)19 b(user)h(sp)q(eci\014es)h(the)e(la)o(y) o(out)g(of)g(the)g(data)f(to)h(b)q(e)h(sen)o(t)f(or)g(receiv)o(ed,)i (and)e(the)g(comm)o(unication)75 2153 y(library)h(directly)g(accesses)f (a)f(noncon)o(tiguous)h(bu\013er.)31 b(The)19 b(pac)o(k/unpac)o(k)g (routines)g(are)f(pro)o(vided)75 2209 y(for)d(compatibilit)o(y)i(with)f (previous)h(libraries.)22 b(Also,)16 b(they)g(pro)o(vide)g(some)f (functionalit)o(y)i(that)e(is)h(not)75 2266 y(otherwise)f(a)o(v)m (ailable)i(in)f Fq(MPI)p Fu(.)e(F)l(or)g(instance,)i(a)e(message)h(can) g(b)q(e)h(receiv)o(ed)g(in)g(sev)o(eral)f(parts,)f(where)75 2322 y(the)19 b(receiv)o(e)h(op)q(eration)g(done)f(on)h(a)f(later)g (part)f(ma)o(y)h(dep)q(end)i(on)e(the)g(con)o(ten)o(t)g(of)g(a)f (former)h(part.)75 2379 y(Another)f(use)h(is)f(that)g(outgoing)g (messages)f(ma)o(y)h(b)q(e)h(explicitly)i(bu\013ered)d(in)h(user)g (supplied)h(space,)75 2435 y(th)o(us)f(o)o(v)o(erriding)h(the)f(system) g(bu\013ering)g(p)q(olicy)l(.)34 b(Finally)l(,)22 b(the)d(a)o(v)m (ailabilit)o(y)i(of)e(pac)o(k)g(and)h(unpac)o(k)75 2492 y(op)q(erations)14 b(facilitates)h(the)f(dev)o(elopmen)o(t)h(of)e (additional)j(comm)o(unication)f(libraries)g(la)o(y)o(ered)f(on)g(top) 75 2548 y(of)h Fq(MPI)p Fu(.)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 71 73 71 72 bop 75 -100 a Fm(1.13.)34 b(P)l(A)o(CK)15 b(AND)g(UNP)l(A)o(CK) 1169 b Fu(71)75 45 y Fq(MPI)p 160 45 14 2 v 16 w(P)l(A)o(CK\(inbuf,)15 b(incount,)i(datat)o(yp)q(e,)f(outbuf,)g(outsize,)g(p)q(osition,)g (comm\))117 122 y Fk(IN)155 b Fq(inbuf)493 b Fk(input)14 b(bu\013er)h(start)f(\(c)o(hoice\))117 197 y(IN)155 b Fq(incount)448 b Fk(n)o(um)o(b)q(er)13 b(of)h(input)f(data)h(items)f (\(in)o(teger\))117 273 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(input)g(data)f(item)g (\(handle\))117 348 y(OUT)108 b Fq(outbuf)465 b Fk(output)14 b(bu\013er)h(start)g(\(c)o(hoice\))117 423 y(IN)155 b Fq(outsize)457 b Fk(output)14 b(bu\013er)h(size,)f(in)g(b)o(ytes)g (\(in)o(teger\))117 498 y(INOUT)62 b Fq(p)q(osition)439 b Fk(curren)o(t)16 b(p)q(osition)d(in)g(bu\013er,)i(in)e(b)o(ytes)i (\(in)o(teger\))117 573 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(for)j(pac)o(k)o(ed)g(message)g(\(handle\))75 698 y Fo(int)23 b(MPI)p 245 698 15 2 v 17 w(Pack\(void*)g(inbuf,)g(int)g (incount,)g(MPI)p 1074 698 V 17 w(Datatype)g(datatype,)f(void)h (*outbuf,)393 754 y(int)h(outsize,)e(int)i(*position,)e(MPI)p 1136 754 V 17 w(Comm)h(comm\))75 840 y(MPI)p 150 840 V 17 w(PACK\(INBUF,)f(INCOUNT,)h(DATATYPE,)g(OUTBUF,)f(OUTSIZE,)h (POSITION,)g(COMM,)g(IERROR\))170 897 y()g(INBUF\(*\),)g (OUTBUF\(*\))170 953 y(INTEGER)g(INCOUNT,)g(DATATYPE,)g(OUTSIZE,)g (POSITION,)f(COMM,)h(IERROR)166 1040 y Fu(P)o(ac)o(ks)11 b(the)i(message)e(in)i(the)g(send)f(bu\013er)h(sp)q(eci\014ed)h(b)o(y)e Fq(inbuf,)i(incount,)g(datat)o(yp)q(e)g Fu(in)o(to)e(the)g(bu\013er)75 1096 y(space)j(sp)q(eci\014ed)i(b)o(y)e Fq(outbuf)h Fu(and)f Fq(outcount)p Fu(.)22 b(The)15 b(input)h(bu\013er)e(can)h(b)q(e)h(an)o (y)e(comm)o(unication)i(bu\013er)75 1153 y(allo)o(w)o(ed)k(in)g Fq(MPI)p 383 1153 14 2 v 16 w(SEND)p Fu(.)g(The)g(output)f(bu\013er)h (is)g(a)f(con)o(tiguous)g(storage)g(area)g(con)o(taining)h Fq(outsize)75 1209 y Fu(b)o(ytes,)15 b(starting)f(at)h(the)g(address)h Fq(outbuf)g Fu(\(length)g(is)g(coun)o(ted)f(in)h Fq(b)o(ytes)p Fu(,)h(not)d(elemen)o(ts,)i(as)f(if)h(it)f(w)o(ere)75 1266 y(a)g(comm)o(unication)h(bu\013er)f(for)g(a)f(message)h(of)g(t)o (yp)q(e)g Fq(MPI)p 1081 1266 V 16 w(P)l(A)o(CKED)p Fu(\).)166 1322 y(The)21 b(input)g(v)m(alue)h(of)e Fq(p)q(osition)h Fu(is)g(the)g(\014rst)f(lo)q(cation)h(in)g(the)g(output)f(bu\013er)h (to)e(b)q(e)j(used)f(for)75 1379 y(pac)o(king.)27 b Fq(p)q(osition)19 b Fu(is)f(incremen)o(ted)g(b)o(y)g(the)f(size)h(of)f(the)h(pac)o(k)o (ed)f(message,)g(and)h(the)g(output)f(v)m(alue)75 1435 y(of)e Fq(p)q(osition)i Fu(is)f(the)g(\014rst)f(lo)q(cation)i(in)f(the) g(output)f(bu\013er)h(follo)o(wing)h(the)e(lo)q(cations)i(o)q(ccupied)g (b)o(y)f(the)75 1491 y(pac)o(k)o(ed)g(message.)k(The)c Fq(comm)e Fu(argumen)o(t)g(is)i(the)g(comm)o(unicator)f(that)g(will)i (b)q(e)g(subsequen)o(tly)f(used)75 1548 y(for)f(sending)h(the)f(pac)o (k)o(ed)h(message.)75 1699 y Fq(MPI)p 160 1699 V 16 w(UNP)l(A)o (CK\(inbuf,)g(insize,)f(p)q(osition,)h(outbuf,)g(outcount,)h(datat)o (yp)q(e,)g(comm\))117 1776 y Fk(IN)155 b Fq(inbuf)493 b Fk(input)14 b(bu\013er)h(start)f(\(c)o(hoice\))117 1851 y(IN)155 b Fq(insize)485 b Fk(size)15 b(of)e(input)h(bu\013er,)g (in)g(b)o(ytes)g(\(in)o(teger\))117 1926 y(INOUT)62 b Fq(p)q(osition)439 b Fk(curren)o(t)16 b(p)q(osition)d(in)g(b)o(ytes)i (\(in)o(teger\))117 2002 y(OUT)108 b Fq(outbuf)465 b Fk(output)14 b(bu\013er)h(start)g(\(c)o(hoice\))117 2077 y(IN)155 b Fq(outcount)420 b Fk(n)o(um)o(b)q(er)13 b(of)h(items)f(to)g (b)q(e)i(unpac)o(k)o(ed)f(\(in)o(teger\))117 2152 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(of)g(eac)o(h)g(output) g(data)g(item)e(\(handle\))117 2227 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(for)j(pac)o(k)o(ed)g(message)g(\(handle\))75 2351 y Fo(int)23 b(MPI)p 245 2351 15 2 v 17 w(Unpack\(void*)f(inbuf,)h (int)h(insize,)f(int)g(*position,)g(void)g(*outbuf,)393 2408 y(int)h(outcount,)e(MPI)p 802 2408 V 17 w(Datatype)h(datatype,)f (MPI)p 1344 2408 V 17 w(Comm)i(comm\))75 2494 y(MPI)p 150 2494 V 17 w(UNPACK\(INBUF,)e(INSIZE,)h(POSITION,)f(OUTBUF,)h (OUTCOUNT,)g(DATATYPE,)g(COMM,)393 2551 y(IERROR\))170 2607 y()g(INBUF\(*\),)g(OUTBUF\(*\))170 2664 y(INTEGER)g(INSIZE,) g(POSITION,)g(OUTCOUNT,)g(DATATYPE,)f(COMM,)h(IERROR)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 72 74 72 73 bop 75 -100 a Fu(72)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)166 45 y Fu(Unpac)o(ks)e(a)g (message)f(in)o(to)h(the)g(receiv)o(e)h(bu\013er)f(sp)q(eci\014ed)i(b)o (y)e Fq(outbuf,)h(outcount,)g(datat)o(yp)q(e)h Fu(from)75 102 y(the)d(bu\013er)g(space)g(sp)q(eci\014ed)i(b)o(y)e Fq(inbuf)i Fu(and)e Fq(insize)p Fu(.)20 b(The)14 b(output)g(bu\013er)g (can)g(b)q(e)h(an)o(y)e(comm)o(unication)75 158 y(bu\013er)h(allo)o(w)o (ed)g(in)g Fq(MPI)p 500 158 14 2 v 16 w(RECV)p Fu(.)g(The)g(input)h (bu\013er)e(is)h(a)g(con)o(tiguous)g(storage)e(area)h(con)o(taining)h Fq(insize)75 214 y Fu(b)o(ytes,)e(starting)f(at)g(address)h Fq(inbuf)p Fu(.)20 b(The)12 b(input)h(v)m(alue)g(of)e Fq(p)q(osition)i Fu(is)g(the)f(\014rst)f(lo)q(cation)i(in)f(the)g (output)75 271 y(bu\013er)18 b(o)q(ccupied)h(b)o(y)f(the)f(pac)o(k)o (ed)h(message.)27 b Fq(p)q(osition)18 b Fu(is)g(incremen)o(ted)h(b)o(y) f(the)g(size)g(of)f(the)h(pac)o(k)o(ed)75 327 y(message,)d(so)g(that)f (the)i(output)f(v)m(alue)i(of)e Fq(p)q(osition)i Fu(is)e(the)h(\014rst) f(lo)q(cation)h(in)h(the)e(output)g(bu\013er)h(after)75 384 y(the)e(lo)q(cations)g(o)q(ccupied)i(b)o(y)e(the)g(message)f(that)g (w)o(as)g(unpac)o(k)o(ed.)20 b Fq(comm)12 b Fu(is)i(the)g(comm)o (unicator)f(used)75 440 y(to)i(receiv)o(e)h(the)f(pac)o(k)o(ed)g (message.)189 547 y Fj(A)n(dvic)n(e)21 b(to)i(users.)83 b Fu(Note)22 b(the)g(di\013erence)h(b)q(et)o(w)o(een)g Fq(MPI)p 1280 547 V 16 w(RECV)g Fu(and)f Fq(MPI)p 1611 547 V 16 w(UNP)l(A)o(CK)p Fu(:)g(in)189 603 y Fq(MPI)p 274 603 V 15 w(RECV)p Fu(,)g(the)g Fq(count)h Fu(argumen)o(t)e(sp)q (eci\014es)i(the)f(maxim)o(um)f(n)o(um)o(b)q(er)h(of)f(items)h(that)f (can)189 659 y(b)q(e)g(receiv)o(ed.)39 b(The)22 b(actual)f(n)o(um)o(b)q (er)h(of)e(items)i(receiv)o(ed)g(is)g(determined)g(b)o(y)f(the)h (length)f(of)189 716 y(the)h(incoming)h(message.)40 b(In)23 b Fq(MPI)p 837 716 V 15 w(UNP)l(A)o(CK)p Fu(,)f(the)g Fq(count)i Fu(argumen)o(t)d(sp)q(eci\014es)j(the)e(actual)189 772 y(n)o(um)o(b)q(er)c(of)g(items)h(that)f(are)g(unpac)o(k)o(ed;)i (the)f(\\size")g(of)f(the)g(corresp)q(onding)i(message)e(is)h(the)189 829 y(incremen)o(t)c(in)g Fq(p)q(osition)p Fu(.)21 b(The)14 b(reason)g(for)g(this)g(c)o(hange)h(is)f(that)g(the)g(\\incoming)h (message)f(size")189 885 y(is)19 b(not)g(predetermined)i(since)g(the)e (user)g(decides)i(ho)o(w)e(m)o(uc)o(h)g(to)g(unpac)o(k;)i(nor)e(is)h (it)g(easy)f(to)189 942 y(determine)c(the)g(\\message)f(size")i(from)e (the)h(n)o(um)o(b)q(er)g(of)f(items)h(to)g(b)q(e)g(unpac)o(k)o(ed.)20 b(In)c(fact,)e(in)h(a)189 998 y(heterogeneous)i(system,)f(this)i(n)o (um)o(b)q(er)f(ma)o(y)f(not)h(b)q(e)g(determined)h Fj(a)g(priori)p Fu(.)26 b(\()p Fj(End)17 b(of)h(advic)n(e)189 1055 y(to)e(users.)p Fu(\))166 1161 y(T)l(o)g(understand)h(the)f(b)q(eha)o(vior)h(of)e(pac)o (k)h(and)h(unpac)o(k,)f(it)h(is)f(con)o(v)o(enien)o(t)h(to)f(think)h (of)e(the)i(data)75 1217 y(part)11 b(of)g(a)g(message)g(as)g(b)q(eing)i (the)e(sequence)i(obtained)f(b)o(y)g(concatenating)f(the)h(successiv)o (e)h(v)m(alues)f(sen)o(t)75 1274 y(in)k(that)f(message.)20 b(The)c(pac)o(k)f(op)q(eration)h(stores)f(this)g(sequence)i(in)f(the)g (bu\013er)f(space,)h(as)f(if)h(sending)75 1330 y(the)d(message)g(to)g (that)f(bu\013er.)19 b(The)14 b(unpac)o(k)f(op)q(eration)h(retriev)o (es)f(this)h(sequence)g(from)f(bu\013er)g(space,)75 1387 y(as)h(if)h(receiving)h(a)f(message)f(from)g(that)g(bu\013er.)19 b(\(It)c(is)g(helpful)h(to)e(think)i(of)e(in)o(ternal)h(F)l(ortran)f (\014les)h(or)75 1443 y Fq(sscanf)h Fu(in)g(C,)f(for)g(a)g(similar)h (function.\))166 1500 y(Sev)o(eral)h(messages)g(can)g(b)q(e)h (successiv)o(ely)g(pac)o(k)o(ed)f(in)o(to)g(one)h Fp(pac)o(king)i(unit) p Fu(.)26 b(This)17 b(is)h(e\013ected)75 1556 y(b)o(y)c(sev)o(eral)h (successiv)o(e)h Fp(related)f Fu(calls)g(to)f Fq(MPI)p 909 1556 V 16 w(P)l(A)o(CK)p Fu(,)g(where)g(the)h(\014rst)f(call)h(pro) o(vides)g Fq(p)q(osition)h(=)f(0)p Fu(,)75 1613 y(and)i(eac)o(h)g (successiv)o(e)h(call)g(inputs)g(the)f(v)m(alue)i(of)d Fq(p)q(osition)i Fu(that)f(w)o(as)f(output)h(b)o(y)f(the)h(previous)h (call,)75 1669 y(and)g(the)g(same)f(v)m(alues)i(for)e Fq(outbuf,)i(outcount)h Fu(and)e Fq(comm)p Fu(.)25 b(This)18 b(pac)o(king)g(unit)h(no)o(w)e(con)o(tains)h(the)75 1725 y(equiv)m(alen)o(t)h(information)f(that)e(w)o(ould)i(ha)o(v)o(e)f(b)q (een)h(stored)f(in)h(a)f(message)g(b)o(y)h(one)f(send)h(call)h(with)e (a)75 1782 y(send)f(bu\013er)f(that)f(is)i(the)f(\\concatenation")g(of) g(the)g(individual)k(send)d(bu\013ers.)166 1838 y(A)g(pac)o(king)g (unit)g(can)g(b)q(e)h(sen)o(t)e(using)i(t)o(yp)q(e)f Fq(MPI)p 1029 1838 V 15 w(P)l(A)o(CKED)p Fu(.)g(An)o(y)f(p)q(oin)o(t)i (to)e(p)q(oin)o(t)h(or)f(collectiv)o(e)75 1895 y(comm)o(unication)g (function)h(can)f(b)q(e)g(used)g(to)f(mo)o(v)o(e)g(the)h(sequence)g(of) g(b)o(ytes)f(that)g(forms)g(the)g(pac)o(king)75 1951 y(unit)i(from)e(one)h(pro)q(cess)g(to)f(another.)19 b(This)d(pac)o (king)f(unit)h(can)f(no)o(w)f(b)q(e)i(receiv)o(ed)g(using)g(an)o(y)e (receiv)o(e)75 2008 y(op)q(eration,)j(with)g(an)o(y)f(datat)o(yp)q(e:) 22 b(the)16 b(t)o(yp)q(e)h(matc)o(hing)g(rules)g(are)f(relaxed)h(for)f (messages)g(sen)o(t)h(with)75 2064 y(t)o(yp)q(e)e Fq(MPI)p 262 2064 V 16 w(P)l(A)o(CKED)p Fu(.)166 2121 y(A)e(message)g(sen)o(t)g (with)h(an)o(y)e(t)o(yp)q(e)i(\(including)h Fq(MPI)p 1062 2121 V 16 w(P)l(A)o(CKED)p Fu(\))e(can)g(b)q(e)h(receiv)o(ed)h (using)f(the)f(t)o(yp)q(e)75 2177 y Fq(MPI)p 160 2177 V 16 w(P)l(A)o(CKED)p Fu(.)h(Suc)o(h)i(a)f(message)g(can)g(then)h(b)q (e)g(unpac)o(k)o(ed)f(b)o(y)h(calls)g(to)e Fq(MPI)p 1452 2177 V 16 w(UNP)l(A)o(CK)p Fu(.)166 2234 y(A)19 b(pac)o(king)h(unit)g (\(or)f(a)g(message)g(created)g(b)o(y)g(a)g(regular,)h(\\t)o(yp)q(ed")f (send\))h(can)f(b)q(e)h(unpac)o(k)o(ed)75 2290 y(in)o(to)j(sev)o(eral)g (successiv)o(e)h(messages.)42 b(This)23 b(is)h(e\013ected)f(b)o(y)f (sev)o(eral)h(successiv)o(e)h(related)g(calls)g(to)75 2346 y Fq(MPI)p 160 2346 V 16 w(UNP)l(A)o(CK)p Fu(,)19 b(where)h(the)f(\014rst)g(call)i(pro)o(vides)f Fq(p)q(osition)g(=)g(0)p Fu(,)g(and)f(eac)o(h)h(successiv)o(e)g(call)h(inputs)75 2403 y(the)d(v)m(alue)h(of)e Fq(p)q(osition)i Fu(that)e(w)o(as)g (output)h(b)o(y)f(the)h(previous)h(call,)g(and)f(the)g(same)f(v)m (alues)i(for)e Fq(inbuf,)75 2459 y(insize)f Fu(and)f Fq(comm)p Fu(.)166 2516 y(The)22 b(concatenation)f(of)g(t)o(w)o(o)g (pac)o(king)h(units)g(is)g(not)f(necessarily)i(a)e(pac)o(king)h(unit;)j (nor)c(is)h(a)75 2572 y(substring)17 b(of)g(a)f(pac)o(king)h(unit)h (necessarily)g(a)f(pac)o(king)g(unit.)25 b(Th)o(us,)17 b(one)g(cannot)g(concatenate)f(t)o(w)o(o)75 2629 y(pac)o(king)11 b(units)g(and)g(then)g(unpac)o(k)g(the)f(result)h(as)g(one)f(pac)o (king)h(unit;)i(nor)d(can)h(one)f(unpac)o(k)h(a)g(substring)75 2685 y(of)f(a)g(pac)o(king)h(unit)g(as)f(a)g(separate)g(pac)o(king)h (unit.)19 b(Eac)o(h)11 b(pac)o(king)f(unit,)i(that)e(w)o(as)g(created)g (b)o(y)g(a)h(related)1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 73 75 73 74 bop 75 -100 a Fm(1.13.)29 b(P)l(A)o(CK)15 b(AND)g(UNP)l(A)o(CK) 1174 b Fu(73)75 45 y(sequence)17 b(of)e(pac)o(k)h(calls,)g(or)f(b)o(y)h (a)f(regular)h(send,)g(m)o(ust)f(b)q(e)h(unpac)o(k)o(ed)h(as)e(a)g (unit,)i(b)o(y)e(a)h(sequence)g(of)75 102 y(related)g(unpac)o(k)f (calls.)189 203 y Fj(R)n(ationale.)74 b Fu(The)21 b(restriction)h(on)f (\\atomic")f(pac)o(king)h(and)g(unpac)o(king)h(of)f(pac)o(king)g(units) 189 260 y(allo)o(ws)13 b(the)f(implemen)o(tation)j(to)d(add)h(at)f(the) h(head)g(of)f(pac)o(king)h(units)h(additional)g(information,)189 316 y(suc)o(h)i(as)g(a)g(description)h(of)f(the)g(sender)h(arc)o (hitecture)f(\(to)f(b)q(e)i(used)g(for)e(t)o(yp)q(e)h(con)o(v)o (ersion,)g(in)h(a)189 373 y(heterogeneous)e(en)o(vironmen)o(t\))g(\()p Fj(End)h(of)g(r)n(ationale.)p Fu(\))166 475 y(The)21 b(follo)o(wing)g(call)g(allo)o(ws)g(the)g(user)f(to)g(\014nd)h(out)f (ho)o(w)g(m)o(uc)o(h)h(space)f(is)h(needed)h(to)e(pac)o(k)g(a)75 531 y(message)15 b(and,)g(th)o(us,)f(manage)h(space)h(allo)q(cation)g (for)e(bu\013ers.)75 682 y Fq(MPI)p 160 682 14 2 v 16 w(P)l(A)o(CK)p 291 682 V 16 w(SIZE\(incount,)i(datat)o(yp)q(e,)g(comm,) d(size\))117 759 y Fk(IN)155 b Fq(incount)448 b Fk(coun)o(t)14 b(argumen)o(t)f(to)h(pac)o(king)f(call)g(\(in)o(teger\))117 834 y(IN)155 b Fq(datat)o(yp)q(e)424 b Fk(datat)o(yp)q(e)14 b(argumen)o(t)f(to)h(pac)o(king)f(call)g(\(handle\))117 908 y(IN)155 b Fq(comm)470 b Fk(comm)o(unicator)11 b(argumen)o(t)i(to)h (pac)o(king)f(call)g(\(handle\))117 983 y(OUT)108 b Fq(size)519 b Fk(upp)q(er)16 b(b)q(ound)f(on)g(size)g(of)g(pac)o(k)o(ed)g(message,) f(in)h(b)o(ytes)g(\(in-)905 1039 y(teger\))75 1164 y Fo(int)23 b(MPI)p 245 1164 15 2 v 17 w(Pack)p 358 1164 V 17 w(size\(int)g(incount,)f(MPI)p 876 1164 V 17 w(Datatype)h (datatype,)g(MPI)p 1419 1164 V 16 w(Comm)h(comm,)393 1220 y(int)g(*size\))75 1307 y(MPI)p 150 1307 V 17 w(PACK)p 263 1307 V 16 w(SIZE\(INCOUNT,)e(DATATYPE,)h(COMM,)g(SIZE,)g(IERROR\)) 170 1363 y(INTEGER)g(INCOUNT,)g(DATATYPE,)g(COMM,)g(SIZE,)g(IERROR)166 1449 y Fu(A)12 b(call)h(to)f Fq(MPI)p 430 1449 14 2 v 16 w(P)l(A)o(CK)p 561 1449 V 16 w(SIZE\(incount,)h(datat)o(yp)q(e,)h (comm,)d(size\))h Fu(returns)g(in)h Fq(size)f Fu(an)g(upp)q(er)h(b)q (ound)75 1506 y(on)h(the)g(incremen)o(t)g(in)h Fq(p)q(osition)g Fu(that)e(is)i(e\013ected)f(b)o(y)f(a)h(call)h(to)e Fq(MPI)p 1263 1506 V 16 w(P)l(A)o(CK\(inbuf,)h(incount,)i(datat)o(yp)q(e,)75 1562 y(outbuf,)g(outcount,)h(p)q(osition,)f(comm\))p Fu(.)189 1664 y Fj(R)n(ationale.)43 b Fu(The)16 b(call)h(returns)f(an)g (upp)q(er)h(b)q(ound,)f(rather)f(than)h(an)g(exact)f(b)q(ound,)i(since) g(the)189 1721 y(exact)e(amoun)o(t)g(of)g(space)g(needed)i(to)e(pac)o (k)g(the)h(message)f(ma)o(y)g(dep)q(end)i(on)e(the)h(con)o(text)f (\(e.g.,)189 1777 y(\014rst)f(message)h(pac)o(k)o(ed)g(in)h(a)f(pac)o (king)h(unit)g(ma)o(y)e(tak)o(e)h(more)g(space\).)20 b(\()p Fj(End)15 b(of)i(r)n(ationale.)p Fu(\))75 1879 y Fp(Example)h(1.37)23 b Fu(An)15 b(example)h(using)g Fq(MPI)p 863 1879 V 16 w(P)l(A)o(CK)p Fu(.)75 1970 y Fo(int)23 b(position,)g(i,)h(j,)f(a[2];)75 2026 y(char)g(buff[1000];)75 2139 y(....)75 2252 y(MPI_Comm_rank\(MPI_COMM_WOR)o(LD,)e(&myrank\);)75 2308 y(if)j(\(myrank)e(==)i(0\))75 2365 y({)147 2421 y(/)f(*)h(SENDER)f(CODE)g(*/)123 2534 y(position)f(=)i(0;)123 2591 y(MPI_Pack\(&i,)e(1,)i(MPI_INT,)e(buff,)h(1000,)h(&position,)e (MPI_COMM_WORLD\);)123 2647 y(MPI_Pack\(&j,)g(1,)i(MPI_INT,)e(buff,)h (1000,)h(&position,)e(MPI_COMM_WORLD\);)123 2704 y(MPI_Send\()g(buff,)i (position,)e(MPI_PACKED,)h(1,)g(0,)h(MPI_COMM_WORLD\);)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 74 76 74 75 bop 75 -100 a Fu(74)613 b Fm(CHAPTER)16 b(1.)29 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fo(})75 102 y(else)47 b(/*)24 b(RECEIVER)f(CODE)g(*/)123 158 y(MPI_Recv\()f(a,)i(2,)g(MPI_INT,)e(0,)i(0,)f(MPI_COMM_WORLD\))75 271 y(})75 362 y Fp(Example)18 b(1.38)23 b Fu(A)15 b(elab)q(orate)g (example.)75 445 y Fo(int)23 b(position,)g(i;)75 502 y(float)g(a[1000];)75 558 y(char)g(buff[1000])75 671 y(....)75 784 y(MPI_Comm_rank\(MPI_Comm_wor)o(ld,)e(&myrank\);)75 841 y(if)j(\(myrank)e(==)i(0\))75 897 y({)123 953 y(/)f(*)h(SENDER)f (CODE)h(*/)123 1066 y(int)f(len[2];)123 1123 y(MPI_Aint)f(disp[2];)123 1179 y(MPI_Datatype)g(type[2],)h(newtype;)123 1292 y(/*)g(build)g (datatype)g(for)h(i)f(followed)g(by)h(a[0]...a[i-1])e(*/)123 1405 y(len[0])h(=)g(1;)123 1462 y(len[1])g(=)g(i;)123 1518 y(MPI_Address\()f(&i,)h(disp\);)123 1574 y(MPI_Address\()f(a,)i (disp+1\);)123 1631 y(type[0])f(=)g(MPI_INT;)123 1687 y(type[1])g(=)g(MPI_FLOAT;)123 1744 y(MPI_Type_struct\()e(2,)j(len,)f (disp,)g(type,)h(&newtype\);)123 1800 y(MPI_Type_commit\()d (&newtype\);)123 1913 y(/*)i(Pack)h(i)f(followed)g(by)h (a[0]...a[i-1]*/)123 2026 y(position)e(=)i(0;)123 2083 y(MPI_Pack\()e(MPI_BOTTOM,)h(1,)g(newtype,)g(buff,)g(1000,)g (&position,)g(MPI_COMM_WORLD\);)123 2195 y(/*)g(Send)h(*/)123 2308 y(MPI_Send\()e(buff,)i(position,)e(MPI_PACKED,)h(1,)g(0,)361 2365 y(MPI_COMM_WORLD\))75 2478 y(/*)h(*****)147 2534 y(One)f(can)g(replace)g(the)h(last)f(three)g(lines)h(with)147 2591 y(MPI_Send\()e(MPI_BOTTOM,)h(1,)g(newtype,)g(1,)h(0,)f (MPI_COMM_WORLD\);)147 2647 y(*****)g(*/)75 2704 y(})1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Page: 75 77 75 76 bop 75 -100 a Fm(1.13.)29 b(P)l(A)o(CK)15 b(AND)g(UNP)l(A)o(CK) 1174 b Fu(75)75 45 y Fo(else)23 b(/*)h(myrank)f(==)h(1)f(*/)75 102 y({)147 158 y(/*)g(RECEIVER)g(CODE)g(*/)123 271 y(MPI_Status)f (status;)123 384 y(/*)h(Receive)g(*/)123 497 y(MPI_Recv\()f(buff,)i (1000,)f(MPI_PACKED,)f(0,)i(0,)f(&status\);)123 610 y(/*)g(Unpack)g(i)h (*/)99 723 y(position)f(=)g(0;)99 779 y(MPI_Unpack\(buff,)f(1000,)h (&position,)f(&i,)i(1,)f(MPI_INT,)g(MPI_COMM_WORLD\);)99 892 y(/*)g(Unpack)g(a[0]...a[i-1])g(*/)99 948 y(MPI_Unpack\(buff,)f (1000,)h(&position,)f(a,)i(i,)f(MPI_FLOAT,)g(MPI_COMM_WORLD\);)75 1005 y(})75 1096 y Fp(Example)18 b(1.39)23 b Fu(Eac)o(h)16 b(pro)q(cess)g(sends)h(a)f(coun)o(t,)f(follo)o(w)o(ed)i(b)o(y)f(coun)o (t)g(c)o(haracters)g(to)f(the)h(ro)q(ot;)g(the)75 1153 y(ro)q(ot)e(concatenate)h(all)h(c)o(haracters)f(in)o(to)g(one)g (string.)75 1236 y Fo(int)23 b(count,)g(gsize,)h(counts[64],)e (totalcount,)g(k1,)i(k2,)f(k,)170 1292 y(displs[64],)g(position,)f (concat_pos;)75 1349 y(char)h(chr[100],)g(*lbuf,)g(*rbuf,)g(*cbuf;)75 1405 y(...)75 1462 y(MPI_Comm_size\(comm,)e(&gsize\);)75 1518 y(MPI_Comm_rank\(comm,)g(&myrank\);)218 1631 y(/*)j(allocate)f (local)g(pack)g(buffer)g(*/)75 1687 y(MPI_Pack_size\(1,)f(MPI_INT,)g (comm,)i(&k1\);)75 1744 y(MPI_Pack_size\(count,)d(MPI_CHAR,)i(&k2\);)75 1800 y(k)h(=)f(k1+k2;)75 1857 y(lbuf)g(=)h(\(char)f(*\)malloc\(k\);)218 1970 y(/*)h(pack)f(count,)g(followed)g(by)g(count)h(characters)e(*/)75 2026 y(position)h(=)g(0;)75 2083 y(MPI_Pack\(&count,)f(1,)h(MPI_INT,)g (lbuf,)g(k,)h(&position,)e(comm\);)75 2139 y(MPI_Pack\(chr,)g(count,)h (MPI_CHAR,)g(&lbuf,)g(k,)g(&position,)g(comm\);)75 2252 y(if)h(\(myrank)e(!=)i(root\))218 2308 y(/*)g(gather)f(at)g(root)h (sizes)f(of)g(all)h(packed)f(messages)g(*/)147 2365 y(MPI_Gather\()f (&position,)g(1,)i(MPI_INT,)f(NULL,)g(NULL,)385 2421 y(NULL,)g(root,)h(comm\);)218 2534 y(/*)g(gather)f(at)g(root)h(packed)f (messages)g(*/)123 2591 y(MPI_Gatherv\()f(&buf,)h(position,)g (MPI_PACKED,)f(NULL,)337 2647 y(NULL,)i(NULL,)f(NULL,)g(root,)g (comm\);)-32 46 y Fn(1)-32 103 y(2)-32 159 y(3)-32 215 y(4)-32 272 y(5)-32 328 y(6)-32 385 y(7)-32 441 y(8)-32 498 y(9)-40 554 y(10)-40 611 y(11)-40 667 y(12)-40 724 y(13)-40 780 y(14)-40 836 y(15)-40 893 y(16)-40 949 y(17)-40 1006 y(18)-40 1062 y(19)-40 1119 y(20)-40 1175 y(21)-40 1232 y(22)-40 1288 y(23)-40 1345 y(24)-40 1401 y(25)-40 1457 y(26)-40 1514 y(27)-40 1570 y(28)-40 1627 y(29)-40 1683 y(30)-40 1740 y(31)-40 1796 y(32)-40 1853 y(33)-40 1909 y(34)-40 1966 y(35)-40 2022 y(36)-40 2078 y(37)-40 2135 y(38)-40 2191 y(39)-40 2248 y(40)-40 2304 y(41)-40 2361 y(42)-40 2417 y(43)-40 2474 y(44)-40 2530 y(45)-40 2587 y(46)-40 2643 y(47)-40 2699 y(48)p eop %%Page: 76 78 76 77 bop 75 -100 a Fu(76)608 b Fm(CHAPTER)15 b(1.)35 b(POINT-TO-POINT)17 b(COMMUNICA)l(TION)75 45 y Fo(else)23 b({)72 b(/*)23 b(root)h(code)f(*/)218 102 y(/*)h(gather)f(sizes)g(of)h (all)f(packed)g(messages)g(*/)147 158 y(MPI_Gather\()f(&position,)g(1,) i(MPI_INT,)f(counts,)g(1,)385 214 y(MPI_INT,)g(root,)g(comm\);)218 327 y(/*)h(gather)f(all)g(packed)g(messages)g(*/)123 384 y(displs[0])f(=)i(0;)123 440 y(for)f(\(i=1;)g(i)h(<)g(gsize;)f (i++\))170 497 y(displs[i])g(=)h(displs[i-1])e(+)i(counts[i-1];)123 553 y(totalcount)e(=)i(dipls[gsize-1])e(+)i(counts[gsize-1];)123 610 y(rbuf)f(=)h(\(char)f(*\)malloc\(totalcount\);)123 666 y(cbuf)g(=)h(\(char)f(*\)malloc\(totalcount\);)123 723 y(MPI_Gatherv\()f(lbuf,)h(position,)g(MPI_PACKED,)f(rbuf,)337 779 y(counts,)h(displs,)g(MPI_PACKED,)g(root,)g(comm\);)218 892 y(/*)h(unpack)f(all)g(messages)g(and)g(concatenate)g(strings)g(*/) 123 948 y(concat_pos)f(=)i(0;)123 1005 y(for)f(\(i=0;)g(i)h(<)g(gsize;) f(i++\))g({)170 1061 y(position)g(=)h(0;)170 1118 y(MPI_Unpack\()f (rbuf+displs[i],)f(totalcount-displs[i],)314 1174 y(&position,)g (&count,)h(1,)h(MPI_INT,)e(comm\);)170 1231 y(MPI_Unpack\()h (rbuf+displs[i],)f(totalcount-displs[i],)314 1287 y(&position,)g (cbuf+concat_pos,)g(count,)h(MPI_CHAR,)f(comm\);)170 1344 y(concat_pos)h(+=)h(count;)170 1400 y(})123 1456 y(cbuf[concat_pos])d(=)j(`\\0';)123 1513 y(})1967 46 y Fn(1)1967 103 y(2)1967 159 y(3)1967 215 y(4)1967 272 y(5)1967 328 y(6)1967 385 y(7)1967 441 y(8)1967 498 y(9)1959 554 y(10)1959 611 y(11)1959 667 y(12)1959 724 y(13)1959 780 y(14)1959 836 y(15)1959 893 y(16)1959 949 y(17)1959 1006 y(18)1959 1062 y(19)1959 1119 y(20)1959 1175 y(21)1959 1232 y(22)1959 1288 y(23)1959 1345 y(24)1959 1401 y(25)1959 1457 y(26)1959 1514 y(27)1959 1570 y(28)1959 1627 y(29)1959 1683 y(30)1959 1740 y(31)1959 1796 y(32)1959 1853 y(33)1959 1909 y(34)1959 1966 y(35)1959 2022 y(36)1959 2078 y(37)1959 2135 y(38)1959 2191 y(39)1959 2248 y(40)1959 2304 y(41)1959 2361 y(42)1959 2417 y(43)1959 2474 y(44)1959 2530 y(45)1959 2587 y(46)1959 2643 y(47)1959 2699 y(48)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF .