11.3.1 Session Creation and Destruction Methods 501 11.3.2 Processes Sets 11.3.3 Runtime Query Functions 504 113.4 Sessions Model Examples 507 11 4 Common Elements of Both Process Models 513 11.4.1 MPI Functionality that is Always Available 513 1142 Aborting mpl processes 514 115 Portable MPl Process Startun 515 11 6 MPl and Threads 517 11 6 1 General 517 116.2 Clarifications 518 11.7 The Dynamic Process Model 521 1171 Starting pro Se. 117.2 The Runtime Environment 521 118 Pro s Manager Interface 522 11e1 ses in MPI 11Q9 Starting pro 522 1183 Starting Multiple Executables and Establishing Communication 527 11Q4 530 11Q5 Spa 531 533 119.1 s Addresses Ports and all Tha 53 11.9.2 5 1102 7 1194 Name Publishin 3 11.9.5 11.9.6 Clier 54 11.10 Other Fu Examp 544 ton MPI nitializ 44 Rele Another nmunication 12 One-Sided Communications 551 12 1 Introduction 551 12.2 Initialization 552 12.2.1 Window creatio 3 1229 Window That Allocates Memory 556 190.3 Window That Allocates Shared Memory 558 1004 amically Attached Men 562 1995 Window Destruction 565 102.6 Window attributes 566 122.7 Window Info 12.3 mication Calls 12.3.1 570 12.3.2 573 12.3.3 ples for Comm mnication Calls 574
11.3.1 Session Creation and Destruction Methods . . . . . . . . . . . . . 501 11.3.2 Processes Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 11.3.3 Runtime Query Functions . . . . . . . . . . . . . . . . . . . . . . . 504 11.3.4 Sessions Model Examples . . . . . . . . . . . . . . . . . . . . . . . 507 11.4 Common Elements of Both Process Models . . . . . . . . . . . . . . . . . . 513 11.4.1 MPI Functionality that is Always Available . . . . . . . . . . . . . 513 11.4.2 Aborting MPI Processes . . . . . . . . . . . . . . . . . . . . . . . . 514 11.5 Portable MPI Process Startup . . . . . . . . . . . . . . . . . . . . . . . . . 515 11.6 MPI and Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 11.6.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 11.6.2 Clarifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 11.7 The Dynamic Process Model . . . . . . . . . . . . . . . . . . . . . . . . . . 521 11.7.1 Starting Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 11.7.2 The Runtime Environment . . . . . . . . . . . . . . . . . . . . . . 521 11.8 Process Manager Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 11.8.1 Processes in MPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 11.8.2 Starting Processes and Establishing Communication . . . . . . . . 522 11.8.3 Starting Multiple Executables and Establishing Communication . 527 11.8.4 Reserved Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 11.8.5 Spawn Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 11.9 Establishing Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 533 11.9.1 Names, Addresses, Ports, and All That . . . . . . . . . . . . . . . 534 11.9.2 Server Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 11.9.3 Client Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 11.9.4 Name Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 11.9.5 Reserved Key Values . . . . . . . . . . . . . . . . . . . . . . . . . . 541 11.9.6 Client/Server Examples . . . . . . . . . . . . . . . . . . . . . . . . 541 11.10 Other Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 11.10.1 Universe Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 11.10.2 Singleton MPI Initialization . . . . . . . . . . . . . . . . . . . . . . 544 11.10.3 MPI_APPNUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 11.10.4 Releasing Connections . . . . . . . . . . . . . . . . . . . . . . . . . 546 11.10.5 Another Way to Establish MPI Communication . . . . . . . . . . . 548 12 One-Sided Communications 551 12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 12.2 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 12.2.1 Window Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 12.2.2 Window That Allocates Memory . . . . . . . . . . . . . . . . . . . 556 12.2.3 Window That Allocates Shared Memory . . . . . . . . . . . . . . . 558 12.2.4 Window of Dynamically Attached Memory . . . . . . . . . . . . . 562 12.2.5 Window Destruction . . . . . . . . . . . . . . . . . . . . . . . . . . 565 12.2.6 Window Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 566 12.2.7 Window Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 12.3 Communication Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 12.3.1 Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 12.3.2 Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 12.3.3 Examples for Communication Calls . . . . . . . . . . . . . . . . . 574 xi
12.3.4 accumulate functions A mulate function Get Ace ction Fetch and Op Function nd S 12.35Re 12.4 Memory Model 59 12.5 tion Calls 93 12.51 59 1259 eral Active Target Sy 598 12.5.3 602 12.5.4 Flush and Syn 605 12.55 607 Clarificati 609 12.6 609 609 Er 12.7 and C 12. Progres 12.7. Registers an ompile Optimi 12.8 Examples 13 External Interfaces 633 633 13.2 Generalized Req sts 633 13.2.1Exam 638 133 As with Status 141/0 643 14.1 Introduction 643 14.1.1 Definitions 643 14.2 File Manipulation 645 14.2.1 Opening a File 645 14.2.2 Closing a file 648 14.2.3 Deleting a file 648 14.2.4 Resizing a file 649 14.25 Preallocating space for a file 650 14.2.6 Querving the size of a file 651 14.2.7 Querying File Parameters 651 14.2.8 File Info 653 Reserved File Hints 654 14.3 File Views 14.4 Data Access 659 14.4.1 Data Access Routines 659 660 xii
12.3.4 Accumulate Functions . . . . . . . . . . . . . . . . . . . . . . . . . 576 Accumulate Function . . . . . . . . . . . . . . . . . . . . . . . . . 577 Get Accumulate Function . . . . . . . . . . . . . . . . . . . . . . . 579 Fetch and Op Function . . . . . . . . . . . . . . . . . . . . . . . . 582 Compare and Swap Function . . . . . . . . . . . . . . . . . . . . . 583 12.3.5 Request-based RMA Communication Operations . . . . . . . . . . 584 12.4 Memory Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 12.5 Synchronization Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 12.5.1 Fence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 12.5.2 General Active Target Synchronization . . . . . . . . . . . . . . . 598 12.5.3 Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 12.5.4 Flush and Sync . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 12.5.5 Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 12.5.6 Miscellaneous Clarifications . . . . . . . . . . . . . . . . . . . . . . 609 12.6 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 12.6.1 Error Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 12.6.2 Error Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 12.7 Semantics and Correctness . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 12.7.1 Atomicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 12.7.2 Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 12.7.3 Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 12.7.4 Registers and Compiler Optimizations . . . . . . . . . . . . . . . . 621 12.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 13 External Interfaces 633 13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 13.2 Generalized Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 13.2.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 13.3 Associating Information with Status . . . . . . . . . . . . . . . . . . . . . . 640 14 I/O 643 14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 14.1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 14.2 File Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 14.2.1 Opening a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 14.2.2 Closing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 14.2.3 Deleting a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 14.2.4 Resizing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 14.2.5 Preallocating Space for a File . . . . . . . . . . . . . . . . . . . . . 650 14.2.6 Querying the Size of a File . . . . . . . . . . . . . . . . . . . . . . 651 14.2.7 Querying File Parameters . . . . . . . . . . . . . . . . . . . . . . . 651 14.2.8 File Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Reserved File Hints . . . . . . . . . . . . . . . . . . . . . . . . . . 654 14.3 File Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 14.4 Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 14.4.1 Data Access Routines . . . . . . . . . . . . . . . . . . . . . . . . . 659 Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660 Synchronism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660 xii
Coordination 661 Data Access Conventions 661 14.42 Data Access with Explicit Offsets 662 1443 Data Access with Individual File Pointers 669 14.4.4 Data Access with Shared File Pointers 680 Noncollective Operations 681 Collective Operations 684 Seek 687 1445 Split Collective Data Access Routines 688 14.5 File Interoperability. 697 14.5.1 Datatypes for File Inte 699 1459 External Data Representation:"external32" 701 14.5.3 User-Defined Data Repre entations 704 Extent Callback 705 Dat ep Conversion Functions 706 14.5.4 Matching Data Representations 14.6 Consist antics 70 14G1Bl。Coneiston 709 146) random acces ntial Files 712 1462 1A6 Collective File Op atio 13 14.65 Nonblocking Collective File Op 1466 Matchi 714 147 71 1468 12 14.6.9 s.Phys 7 14.6.10 File Size 5 14.6.11Exa 715 chronous I/O 718 14.7 I/O E rror Ho 719 O E Classes 14.9 uble Buffering with Split Collective I/O barray Filetype 15 Tool Supp ort 72 15.1 Introduction 725 15.2 Profiling Interface 7 15.2.1 Requirements 25 15)9 Dis 72 15.2.3 Logic of the Desigr 15)4 Miscellaneous Control of Profiling 15.2.5 MPI Libra ry Implementation 728 15.26 729 Multiple Counting 729 Linke r Oddities 730 ort Methods 730 15.27 rception 730 xiii
Coordination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 Data Access Conventions . . . . . . . . . . . . . . . . . . . . . . . 661 14.4.2 Data Access with Explicit Offsets . . . . . . . . . . . . . . . . . . 662 14.4.3 Data Access with Individual File Pointers . . . . . . . . . . . . . . 669 14.4.4 Data Access with Shared File Pointers . . . . . . . . . . . . . . . . 680 Noncollective Operations . . . . . . . . . . . . . . . . . . . . . . . 681 Collective Operations . . . . . . . . . . . . . . . . . . . . . . . . . 684 Seek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 14.4.5 Split Collective Data Access Routines . . . . . . . . . . . . . . . . 688 14.5 File Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 14.5.1 Datatypes for File Interoperability . . . . . . . . . . . . . . . . . . 699 14.5.2 External Data Representation: "external32" . . . . . . . . . . . . . 701 14.5.3 User-Defined Data Representations . . . . . . . . . . . . . . . . . . 704 Extent Callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 Datarep Conversion Functions . . . . . . . . . . . . . . . . . . . . 706 14.5.4 Matching Data Representations . . . . . . . . . . . . . . . . . . . . 708 14.6 Consistency and Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . 709 14.6.1 File Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709 14.6.2 Random Access vs. Sequential Files . . . . . . . . . . . . . . . . . 712 14.6.3 Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 14.6.4 Collective File Operations . . . . . . . . . . . . . . . . . . . . . . . 713 14.6.5 Nonblocking Collective File Operations . . . . . . . . . . . . . . . 713 14.6.6 Type Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 14.6.7 Miscellaneous Clarifications . . . . . . . . . . . . . . . . . . . . . . 714 14.6.8 MPI_Offset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 14.6.9 Logical vs. Physical File Layout . . . . . . . . . . . . . . . . . . . 714 14.6.10 File Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 14.6.11 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 Asynchronous I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 14.7 I/O Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 14.8 I/O Error Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 14.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 14.9.1 Double Buffering with Split Collective I/O . . . . . . . . . . . . . 720 14.9.2 Subarray Filetype Constructor . . . . . . . . . . . . . . . . . . . . 723 15 Tool Support 725 15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 15.2 Profiling Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 15.2.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 15.2.2 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 15.2.3 Logic of the Design . . . . . . . . . . . . . . . . . . . . . . . . . . 726 15.2.4 Miscellaneous Control of Profiling . . . . . . . . . . . . . . . . . . 727 15.2.5 MPI Library Implementation . . . . . . . . . . . . . . . . . . . . . 728 15.2.6 Complications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 Multiple Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 Linker Oddities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 Fortran Support Methods . . . . . . . . . . . . . . . . . . . . . . . 730 15.2.7 Multiple Levels of Interception . . . . . . . . . . . . . . . . . . . . 730 xiii
15.3 The MPI Tool Information Interface 73 1531 2 1532 Binding MPI Tool Information Interface Variables to 732 1532 ntion for retur 733 1534 Initialization 734 15.35 735 1536 738 1。A1 34 Control Variable Ac ess Function 3 15.3.7 Per 745 e variable que ct 74 eE and 750 Ha 750 arting and St Variables 752 15.3.8 E 75 allba ck Sat ty Re CtioandDe 765 Handlin g vent Meta Data. 15.3.9 Variabl ry Functions 077777 Category Me ber Query Functions 15.3.10 Return Codes for the MPI Tool Information Interface 78 15.3.11 Profiling Interface 77 16 Dep 16.1 De cated Interfac since MPI-2.0 16.2 ated since MPL22 7 16.3 Depre cated since MPl-4.0 7 17 Removed Interfaces 787 17.1 Removed MPI-1 Bindings 787 17 11 Overview 787 17 12 Removed MPl-1 Functions 87 17.1.3 Removed MPl-1 Datatypes 78 17 14 Removed MPL1 Constants 87 17.1.5 Removed MPl-1 Callback Prototypes 788 17.2 C++Bindings 788 18 Semantic Changes and Warnings 789 18.1 Semantic Changes 789 18.1.1 Semantic Changes Starting in MPI-4.0................ 789 xiv
15.3 The MPI Tool Information Interface . . . . . . . . . . . . . . . . . . . . . . 731 15.3.1 Verbosity Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 15.3.2 Binding MPI Tool Information Interface Variables to MPI Objects 732 15.3.3 Convention for Returning Strings . . . . . . . . . . . . . . . . . . . 733 15.3.4 Initialization and Finalization . . . . . . . . . . . . . . . . . . . . . 734 15.3.5 Datatype System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 15.3.6 Control Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 Control Variable Query Functions . . . . . . . . . . . . . . . . . . 738 Handle Allocation and Deallocation . . . . . . . . . . . . . . . . . 742 Control Variable Access Functions . . . . . . . . . . . . . . . . . . 743 15.3.7 Performance Variables . . . . . . . . . . . . . . . . . . . . . . . . . 744 Performance Variable Classes . . . . . . . . . . . . . . . . . . . . . 745 Performance Variable Query Functions . . . . . . . . . . . . . . . 747 Performance Experiment Sessions . . . . . . . . . . . . . . . . . . 750 Handle Allocation and Deallocation . . . . . . . . . . . . . . . . . 750 Starting and Stopping of Performance Variables . . . . . . . . . . 752 Performance Variable Access Functions . . . . . . . . . . . . . . . 753 15.3.8 Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 Event Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Callback Safety Requirements . . . . . . . . . . . . . . . . . . . . 760 Event Type Query Functions . . . . . . . . . . . . . . . . . . . . . 762 Handle Allocation and Deallocation . . . . . . . . . . . . . . . . . 765 Handling Dropped Events . . . . . . . . . . . . . . . . . . . . . . . 769 Reading Event Data . . . . . . . . . . . . . . . . . . . . . . . . . . 771 Reading Event Meta Data . . . . . . . . . . . . . . . . . . . . . . . 772 15.3.9 Variable Categorization . . . . . . . . . . . . . . . . . . . . . . . . 773 Category Query Functions . . . . . . . . . . . . . . . . . . . . . . 774 Category Member Query Functions . . . . . . . . . . . . . . . . . 776 15.3.10 Return Codes for the MPI Tool Information Interface . . . . . . . 778 15.3.11 Profiling Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 778 16 Deprecated Interfaces 781 16.1 Deprecated since MPI-2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 16.2 Deprecated since MPI-2.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 16.3 Deprecated since MPI-4.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 17 Removed Interfaces 787 17.1 Removed MPI-1 Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 17.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 17.1.2 Removed MPI-1 Functions . . . . . . . . . . . . . . . . . . . . . . . 787 17.1.3 Removed MPI-1 Datatypes . . . . . . . . . . . . . . . . . . . . . . 787 17.1.4 Removed MPI-1 Constants . . . . . . . . . . . . . . . . . . . . . . 787 17.1.5 Removed MPI-1 Callback Prototypes . . . . . . . . . . . . . . . . . 788 17.2 C++ Bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 18 Semantic Changes and Warnings 789 18.1 Semantic Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 18.1.1 Semantic Changes Starting in MPI-4.0 . . . . . . . . . . . . . . . . 789 xiv
18.2 Additional Warnings 789 18.2.1 Warnings Starting in MPl-4.0 789 19 Language Bindings 79 19.1 Support for Fortran 1 19.1.1 Overview 791 19.1. Fortran Support Through the mpi_fo8 Module 792 19.1. Fortran Support Through the mpi Module 795 19.1. Fortran Support Through the mpif.h Include File 791 19.1.5 Interface Specifications,Procedure Names,and the Profiling Interface798 19.1.6 MPI for Different Fortran Standard Versions 803 19.1. Requirements on Fortran Compilers 。, 807 19.1.8 Additional Support for Fortran Register-Memory-Synchronization 0 19.1.9 Additional Support for Fortran Numeric Intrinsic Types Parameterized Datatypes with Specified Precision and Exponent Range. 810 Support for size specific MPI Datatypes 814 Communication with size-specific type 816 19.1.10 Problems With Fortran Bindings for MPl 817 19.1.11 Problems Due to Strong Typing 819 19.1.12 Problems Due to Data Copying and Sequence Association with Sub- script.Triplets 19.1.13 Problems Due to Data Copying and Sequence Association with Vec- tor Subscripts 821 19.114 Special Constants 82 191 15 Fortran Derived Types 82 19.1.16 Optimization Problems,an Overview 82 19.1.17 Problems with Code Movement and Register Optimization 82 Nonblocking Operations 82 Persistent operations 827 One-sided Communication g27 MPI_BOTTOM and Combining Independent Variables in Datatypes 827 Solutions 827 The fortran asyNcHroNous Attribute 820 Calling mpi f SYNC REG 830 A User Defined routine Instead of MPI F SYNC REG 831 Module variables and comMON Blocks 39 The(Poorly Performing)Fortran VOLATILE Attribute 83 The Fortron TARCET Attribute R30 rary Memory Modification 832 ent 834 19.120 Comparison with C 19.2 arge Count and Large Byte Displacement 839 19.3 84d 19.3.1 Introductio 840 1029 840 1033 Initialization 19.3.4 sfer of Handles
18.2 Additional Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 18.2.1 Warnings Starting in MPI-4.0 . . . . . . . . . . . . . . . . . . . . . 789 19 Language Bindings 791 19.1 Support for Fortran . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 19.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 19.1.2 Fortran Support Through the mpi_f08 Module . . . . . . . . . . . 792 19.1.3 Fortran Support Through the mpi Module . . . . . . . . . . . . . . 795 19.1.4 Fortran Support Through the mpif.h Include File . . . . . . . . . 797 19.1.5 Interface Specifications, Procedure Names, and the Profiling Interface798 19.1.6 MPI for Different Fortran Standard Versions . . . . . . . . . . . . 803 19.1.7 Requirements on Fortran Compilers . . . . . . . . . . . . . . . . . 807 19.1.8 Additional Support for Fortran Register-Memory-Synchronization 808 19.1.9 Additional Support for Fortran Numeric Intrinsic Types . . . . . . 809 Parameterized Datatypes with Specified Precision and Exponent Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 Support for Size-specific MPI Datatypes . . . . . . . . . . . . . . . 814 Communication With Size-specific Types . . . . . . . . . . . . . . 816 19.1.10 Problems With Fortran Bindings for MPI . . . . . . . . . . . . . . 817 19.1.11 Problems Due to Strong Typing . . . . . . . . . . . . . . . . . . . 819 19.1.12 Problems Due to Data Copying and Sequence Association with Subscript Triplets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819 19.1.13 Problems Due to Data Copying and Sequence Association with Vector Subscripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822 19.1.14 Special Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . 823 19.1.15 Fortran Derived Types . . . . . . . . . . . . . . . . . . . . . . . . . 823 19.1.16 Optimization Problems, an Overview . . . . . . . . . . . . . . . . 825 19.1.17 Problems with Code Movement and Register Optimization . . . . 826 Nonblocking Operations . . . . . . . . . . . . . . . . . . . . . . . . 826 Persistent Operations . . . . . . . . . . . . . . . . . . . . . . . . . 827 One-sided Communication . . . . . . . . . . . . . . . . . . . . . . 827 MPI_BOTTOM and Combining Independent Variables in Datatypes 827 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827 The Fortran ASYNCHRONOUS Attribute . . . . . . . . . . . . . . . . 829 Calling MPI_F_SYNC_REG . . . . . . . . . . . . . . . . . . . . . 830 A User Defined Routine Instead of MPI_F_SYNC_REG . . . . . . 831 Module Variables and COMMON Blocks . . . . . . . . . . . . . . 832 The (Poorly Performing) Fortran VOLATILE Attribute . . . . . . 832 The Fortran TARGET Attribute . . . . . . . . . . . . . . . . . . . 832 19.1.18 Temporary Data Movement and Temporary Memory Modification 832 19.1.19 Permanent Data Movement . . . . . . . . . . . . . . . . . . . . . . 834 19.1.20 Comparison with C . . . . . . . . . . . . . . . . . . . . . . . . . . 834 19.2 Support for Large Count and Large Byte Displacement . . . . . . . . . . . 839 19.3 Language Interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 19.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 19.3.2 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840 19.3.3 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841 19.3.4 Transfer of Handles . . . . . . . . . . . . . . . . . . . . . . . . . . 841 xv