19.35 Status Dat. 846 Err 84S Reduce Operation 84S 103.7 849 1038 Extra-State 1020 85 19.3.10 Interlanguage A Language Bindings Summary 857 A.1 Defined Values and Handles 851 A11 Defined Constants 857 A.12 Types 871 A13 Prototype Definitions 872 C Bindings 872 Fortran 2008 Bindings with the mpi_fo8 Module 873 Fortran Bindings with mpif.h or the mpi Module 876 A.1.4 Deprecated Prototype Definitions 878 A1.5 String values 8 Default communicator names 79 erved Data Representation 87 Process Set Names 70 70 Info Value 88 A.2 Sun nmary of the Semantics of all Op.-Related Routines A.3 431 Point-to-Point Co Partitioned Communication C Binding 43 s c Binding A.3.4 A.3.5 ts Con nd Caching C Bindings A.3.6 D C Binding 00 A.3. A38 ement C Bindi ng The Info Obi ct C Binding and Ma ent C Binding C Bin C Bindings 01 I/OC Bin C Bindi Tools/MPI T mation tr C Bindings A.4 Deps Bindi Bi th th Poin n Fortran 2008 Bindi ortran 2008 Bindings Datatypes Fortran 2008 dings xvi
19.3.5 Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843 19.3.6 MPI Opaque Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 846 Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846 Callback Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 Error Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 Reduce Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 848 19.3.7 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849 19.3.8 Extra-State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 19.3.9 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853 19.3.10 Interlanguage Communication . . . . . . . . . . . . . . . . . . . . 854 A Language Bindings Summary 857 A.1 Defined Values and Handles . . . . . . . . . . . . . . . . . . . . . . . . . . 857 A.1.1 Defined Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 857 A.1.2 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871 A.1.3 Prototype Definitions . . . . . . . . . . . . . . . . . . . . . . . . . 872 C Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872 Fortran 2008 Bindings with the mpi_f08 Module . . . . . . . . . . 873 Fortran Bindings with mpif.h or the mpi Module . . . . . . . . . 876 A.1.4 Deprecated Prototype Definitions . . . . . . . . . . . . . . . . . . 878 A.1.5 String Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879 Default Communicator Names . . . . . . . . . . . . . . . . . . . . 879 Reserved Data Representations . . . . . . . . . . . . . . . . . . . . 879 Process Set Names . . . . . . . . . . . . . . . . . . . . . . . . . . . 879 Info Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 879 Info Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880 A.2 Summary of the Semantics of all Op.-Related Routines . . . . . . . . . . . 881 A.3 C Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 882 A.3.1 Point-to-Point Communication C Bindings . . . . . . . . . . . . . 882 A.3.2 Partitioned Communication C Bindings . . . . . . . . . . . . . . . 885 A.3.3 Datatypes C Bindings . . . . . . . . . . . . . . . . . . . . . . . . . 886 A.3.4 Collective Communication C Bindings . . . . . . . . . . . . . . . . 889 A.3.5 Groups, Contexts, Communicators, and Caching C Bindings . . . 897 A.3.6 Process Topologies C Bindings . . . . . . . . . . . . . . . . . . . . 900 A.3.7 MPI Environmental Management C Bindings . . . . . . . . . . . . 904 A.3.8 The Info Object C Bindings . . . . . . . . . . . . . . . . . . . . . . 906 A.3.9 Process Creation and Management C Bindings . . . . . . . . . . . 906 A.3.10 One-Sided Communications C Bindings . . . . . . . . . . . . . . . 907 A.3.11 External Interfaces C Bindings . . . . . . . . . . . . . . . . . . . . 910 A.3.12 I/O C Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911 A.3.13 Language Bindings C Bindings . . . . . . . . . . . . . . . . . . . . 915 A.3.14 Tools / Profiling Interface C Bindings . . . . . . . . . . . . . . . . 916 A.3.15 Tools / MPI Tool Information Interface C Bindings . . . . . . . . 916 A.3.16 Deprecated C Bindings . . . . . . . . . . . . . . . . . . . . . . . . 919 A.4 Fortran 2008 Bindings with the mpi_f08 Module . . . . . . . . . . . . . . . 920 A.4.1 Point-to-Point Communication Fortran 2008 Bindings . . . . . . . 920 A.4.2 Partitioned Communication Fortran 2008 Bindings . . . . . . . . . 930 A.4.3 Datatypes Fortran 2008 Bindings . . . . . . . . . . . . . . . . . . . 931 xvi
A.4.4 Collective Communication Fortran 2008 Bindings. 939 A.4.5 Groups,Contexts,Communicators,and Caching Fortran 2008 Bind- ings 96 A4.6 Process Topologies Fortran 2008 Bindings A47 MPI Environmental Management Fortran 2008 Bindings 978 A48 The Info Object Fortran 2008 Bindings 981 A40 Process Creation and Management Fortran 2008 Bindings A 4 10 One-Sided Communications fortran 2008 Bindings 84 A.4.11 External Interfaces Fortran 2008 Bindings 99 A.4.12 I/O Fortran 2008 Bindings 993 A 4 13 Lano age bindings fort an 2008 Binding 1006 A.4.14 ToolsProfiling Interface Fortran 2008 Bindings 1007 A.4.15 Deprecated Fortran 2008 Binding 1007 45 i module 1009 A51 1008 A.5 Partitioned Communication Fortran Bindings 1011 A5 Dat an binding 1011 A.5.4 Collective Com munication Fortran Binding 1014 A.5.5 ups,Contexts.Comn and Caching Fortran Bindings 10p A.5.6 D es fortran bindir 1024 A57 ss Topolo MPI Envin ent Fo tran Bindings 102 A58 The fo Object Fortran Bdn 1030 A.5.9 t 1030 A.5.10 1 1032 es Fortran Bindings 1036 I/O Fortran Bindi 1037 1041 A5.14 Pr 1042 A5.15 Depreca ted Fo ran Bi ng 1042 B Change-Log 104 B.1 Changes from Version 3.1 to Version 4.0 1045 B11 Fixes to Errata in Previous Versions of Mpl 1045 R12 Changes in MPl-4.0 1046 B.2 Changes from Version 3.0 to Version 3.1 1049 B21 Fixes to errata in previous versions of Mpl 104d B.2.2 Changes in MPL-3.1 1051 B.3 Changes from Version 2.2 to Version 3.0 1051 R31 Fixes to Errata in Previous Versions of MPI 1051 B.3.2 Changes in MPI-3.0 1052 B.4 Changes from Version 2.1 to Version 2.2 1057 B.5 Chan s from Version 2.0 to Version 2.1 1060 Bibliography 1065 General Index 1071 Examples index 1079 xvii
A.4.4 Collective Communication Fortran 2008 Bindings . . . . . . . . . . 939 A.4.5 Groups, Contexts, Communicators, and Caching Fortran 2008 Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961 A.4.6 Process Topologies Fortran 2008 Bindings . . . . . . . . . . . . . . 969 A.4.7 MPI Environmental Management Fortran 2008 Bindings . . . . . . 978 A.4.8 The Info Object Fortran 2008 Bindings . . . . . . . . . . . . . . . 981 A.4.9 Process Creation and Management Fortran 2008 Bindings . . . . . 982 A.4.10 One-Sided Communications Fortran 2008 Bindings . . . . . . . . . 984 A.4.11 External Interfaces Fortran 2008 Bindings . . . . . . . . . . . . . . 992 A.4.12 I/O Fortran 2008 Bindings . . . . . . . . . . . . . . . . . . . . . . 993 A.4.13 Language Bindings Fortran 2008 Bindings . . . . . . . . . . . . . . 1006 A.4.14 Tools / Profiling Interface Fortran 2008 Bindings . . . . . . . . . . 1007 A.4.15 Deprecated Fortran 2008 Bindings . . . . . . . . . . . . . . . . . . 1007 A.5 Fortran Bindings with mpif.h or the mpi Module . . . . . . . . . . . . . . 1008 A.5.1 Point-to-Point Communication Fortran Bindings . . . . . . . . . . 1008 A.5.2 Partitioned Communication Fortran Bindings . . . . . . . . . . . . 1011 A.5.3 Datatypes Fortran Bindings . . . . . . . . . . . . . . . . . . . . . . 1011 A.5.4 Collective Communication Fortran Bindings . . . . . . . . . . . . . 1014 A.5.5 Groups, Contexts, Communicators, and Caching Fortran Bindings 1020 A.5.6 Process Topologies Fortran Bindings . . . . . . . . . . . . . . . . . 1024 A.5.7 MPI Environmental Management Fortran Bindings . . . . . . . . . 1028 A.5.8 The Info Object Fortran Bindings . . . . . . . . . . . . . . . . . . 1030 A.5.9 Process Creation and Management Fortran Bindings . . . . . . . . 1030 A.5.10 One-Sided Communications Fortran Bindings . . . . . . . . . . . . 1032 A.5.11 External Interfaces Fortran Bindings . . . . . . . . . . . . . . . . . 1036 A.5.12 I/O Fortran Bindings . . . . . . . . . . . . . . . . . . . . . . . . . 1037 A.5.13 Language Bindings Fortran Bindings . . . . . . . . . . . . . . . . . 1041 A.5.14 Tools / Profiling Interface Fortran Bindings . . . . . . . . . . . . . 1042 A.5.15 Deprecated Fortran Bindings . . . . . . . . . . . . . . . . . . . . . 1042 B Change-Log 1045 B.1 Changes from Version 3.1 to Version 4.0 . . . . . . . . . . . . . . . . . . . 1045 B.1.1 Fixes to Errata in Previous Versions of MPI . . . . . . . . . . . . . 1045 B.1.2 Changes in MPI-4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . 1046 B.2 Changes from Version 3.0 to Version 3.1 . . . . . . . . . . . . . . . . . . . 1049 B.2.1 Fixes to Errata in Previous Versions of MPI . . . . . . . . . . . . . 1049 B.2.2 Changes in MPI-3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 1051 B.3 Changes from Version 2.2 to Version 3.0 . . . . . . . . . . . . . . . . . . . 1051 B.3.1 Fixes to Errata in Previous Versions of MPI . . . . . . . . . . . . . 1051 B.3.2 Changes in MPI-3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . 1052 B.4 Changes from Version 2.1 to Version 2.2 . . . . . . . . . . . . . . . . . . . 1057 B.5 Changes from Version 2.0 to Version 2.1 . . . . . . . . . . . . . . . . . . . 1060 Bibliography 1065 General Index 1071 Examples Index 1079 xvii
MPI Constant and predefined handle index 1082 MPI Declarations Index 1088 MPI Callback Function Prototype Index 108g MPI Function Index 1091 xviii
MPI Constant and Predefined Handle Index 1082 MPI Declarations Index 1088 MPI Callback Function Prototype Index 1089 MPI Function Index 1091 xviii
List of Figures 2.1 State transition diagram for blocking operations 14 2.2 State transition diagram for nonblocking operations 2.3 State transition diagram for persistent operations 6.1 Collective communications,an overview 4。。。·。。4。。。。4。。。+。。。 6.2 Inter-communicator allgather,··, 6.3 Inter-communicator reduce-scatter ...................... 6.9 Gather example . 6.5 Gatherv example with strides ........................ 202 6.6 Gatherv example,2-dimensional 6.7 Gatherv example,2-dimensional,subarrays with different sizes. 28 6.8 Gatherv example,2-dimensional,subarrays with different sizes and strides. 20月 6.9 Scatter example . 。。。。。。。。。。。。。。。。。。。。。。。。。。 6.10 Scatterv example with strides... 。。。。。。。。。。。。。 211 6.11 Scatterv example with different strides and counts..... 212 6.12 Race conditions with point-to-point and collective communications..... 304 6.l3 Overlapping Communicators Example,,,,·,···,,··,,·,,,· 30s 7.1 Inter-communicator creation using MPI_COMM_CREATE 33g ”””””” vith MPI COMM SPLIT 337 7.3 Recu nith MPL-COMM_SPLIT-TYPE 240 74 ee-group pip 269 7.5 Three-group ring········ 363 8.1 Neighborhood gather communication example.. ,。。 419 8.2 Cartesian neighborhood allgather example for 3 and 1 processes in a dimension420 8.3 Cartesian neighborhood alltoall example for 3 and 1 processes in a dimension 424 8.4 Set-up of process structure for two-dimensional parallel Poisson solver...447 8.5 Communication routine with local data copying and sparse neighborhood all-to-all 448 8.6 Communication routine with sparse neighborhood all-to-all-w and without local data copying 449 8.7 Two-dimensional parallel Poisson solver with persistent sparse neighborhood all-to-all-w and without local data copying. 450 11.1 Session handle to communicator 1l.2 Process set examples············ 509 12.1 Schematic description of the public/private window operations in the MPI_WIN_SEPARATE memory model for two overlapping windows......592 xix
List of Figures 2.1 State transition diagram for blocking operations . . . . . . . . . . . . . . . 14 2.2 State transition diagram for nonblocking operations . . . . . . . . . . . . . 14 2.3 State transition diagram for persistent operations . . . . . . . . . . . . . . . 14 6.1 Collective communications, an overview . . . . . . . . . . . . . . . . . . . . 189 6.2 Inter-communicator allgather . . . . . . . . . . . . . . . . . . . . . . . . . . 193 6.3 Inter-communicator reduce-scatter . . . . . . . . . . . . . . . . . . . . . . . 193 6.4 Gather example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 6.5 Gatherv example with strides . . . . . . . . . . . . . . . . . . . . . . . . . . 202 6.6 Gatherv example, 2-dimensional . . . . . . . . . . . . . . . . . . . . . . . . 202 6.7 Gatherv example, 2-dimensional, subarrays with different sizes . . . . . . . 203 6.8 Gatherv example, 2-dimensional, subarrays with different sizes and strides . 205 6.9 Scatter example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 6.10 Scatterv example with strides . . . . . . . . . . . . . . . . . . . . . . . . . . 211 6.11 Scatterv example with different strides and counts . . . . . . . . . . . . . . 212 6.12 Race conditions with point-to-point and collective communications . . . . . 304 6.13 Overlapping Communicators Example . . . . . . . . . . . . . . . . . . . . . 308 7.1 Inter-communicator creation using MPI_COMM_CREATE . . . . . . . . . . 333 7.2 Inter-communicator construction with MPI_COMM_SPLIT . . . . . . . . . . 337 7.3 Recursive communicator creation with MPI_COMM_SPLIT_TYPE . . . . . 342 7.4 Three-group pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 7.5 Three-group ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 8.1 Neighborhood gather communication example . . . . . . . . . . . . . . . . . 419 8.2 Cartesian neighborhood allgather example for 3 and 1 processes in a dimension420 8.3 Cartesian neighborhood alltoall example for 3 and 1 processes in a dimension 424 8.4 Set-up of process structure for two-dimensional parallel Poisson solver . . . 447 8.5 Communication routine with local data copying and sparse neighborhood all-to-all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 8.6 Communication routine with sparse neighborhood all-to-all-w and without local data copying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 8.7 Two-dimensional parallel Poisson solver with persistent sparse neighborhood all-to-all-w and without local data copying . . . . . . . . . . . . . . . . . . . 450 11.1 Session handle to communicator . . . . . . . . . . . . . . . . . . . . . . . . 500 11.2 Process set examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 12.1 Schematic description of the public/private window operations in the MPI_WIN_SEPARATE memory model for two overlapping windows . . . . . . 592 xix
12.2 Active target communication 595 12 3 Active ta 12.4 Pass uo ta mm 12.5 Active tar nication with several proceses 601 12.6 nication. 620 12.7 Deadlock situation 690 12.8 No deadlock 620 14.1 Etypes and filetypes .. 644 14.2 Partitioning a file among parallel processes................. 644 14.3 Displacements.. 657 14.4 Example array file layout ...... 723 14.5 Example local array filetype for process 1.................. 724 l9.Status conversion routines.··············· 845
12.2 Active target communication . . . . . . . . . . . . . . . . . . . . . . . . . . 595 12.3 Active target communication, with weak synchronization . . . . . . . . . . . 596 12.4 Passive target communication . . . . . . . . . . . . . . . . . . . . . . . . . . 597 12.5 Active target communication with several processes . . . . . . . . . . . . . . 601 12.6 Symmetric communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 12.7 Deadlock situation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 12.8 No deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 14.1 Etypes and filetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 14.2 Partitioning a file among parallel processes . . . . . . . . . . . . . . . . . . 644 14.3 Displacements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 14.4 Example array file layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 14.5 Example local array filetype for process 1 . . . . . . . . . . . . . . . . . . . 724 19.1 Status conversion routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845 xx