1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class communicator</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../mpi/reference.html#header.boost.mpi.communicator_hpp" title="Header <boost/mpi/communicator.hpp>">
<link rel="prev" href="scan.html" title="Function scan">
<link rel="next" href="comm_create_kind.html" title="Type comm_create_kind">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="scan.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.communicator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="comm_create_kind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.mpi.communicator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class communicator</span></h2>
<p>boost::mpi::communicator — A communicator that permits communication and synchronization among a set of processes. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../mpi/reference.html#header.boost.mpi.communicator_hpp" title="Header <boost/mpi/communicator.hpp>">boost/mpi/communicator.hpp</a>>
</span>
<span class="keyword">class</span> <a class="link" href="communicator.html" title="Class communicator">communicator</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// <a class="link" href="communicator.html#boost.mpi.communicatorconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="communicator.html#idp95111160-bb"><span class="identifier">communicator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="communicator.html#idp95101048-bb"><span class="identifier">communicator</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MPI_Comm</span> <span class="special">&</span><span class="special">,</span> <span class="identifier">comm_create_kind</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="communicator.html#idp95096472-bb"><span class="identifier">communicator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="communicator.html" title="Class communicator">communicator</a> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="group.html" title="Class group">boost::mpi::group</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="communicator.html#idp95239528-bb">public member functions</a></span>
<span class="keyword">int</span> <a class="link" href="communicator.html#idp95239736-bb"><span class="identifier">rank</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">int</span> <a class="link" href="communicator.html#idp95241272-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="group.html" title="Class group">boost::mpi::group</a> <a class="link" href="communicator.html#idp95242760-bb"><span class="identifier">group</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="keyword">void</span> <a class="link" href="communicator.html#idp95227592-bb"><span class="identifier">send</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="keyword">void</span> <a class="link" href="communicator.html#idp95223752-bb"><span class="identifier">send</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="keyword">void</span> <a class="link" href="communicator.html#idp95214392-bb"><span class="identifier">send</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="communicator.html#idp95204888-bb"><span class="identifier">send</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95207848-bb"><span class="identifier">recv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95202280-bb"><span class="identifier">recv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95195896-bb"><span class="identifier">recv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95189448-bb"><span class="identifier">recv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95184264-bb"><span class="identifier">recv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95176552-bb"><span class="identifier">isend</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95164840-bb"><span class="identifier">isend</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95171640-bb"><span class="identifier">isend</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95161400-bb"><span class="identifier">isend</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95157288-bb"><span class="identifier">irecv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95149416-bb"><span class="identifier">irecv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="request.html" title="Class request">request</a> <a class="link" href="communicator.html#idp95140712-bb"><span class="identifier">irecv</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="status.html" title="Class status">status</a> <a class="link" href="communicator.html#idp95136952-bb"><span class="identifier">probe</span></a><span class="special">(</span><span class="keyword">int</span> <span class="special">=</span> <span class="identifier">any_source</span><span class="special">,</span> <span class="keyword">int</span> <span class="special">=</span> <span class="identifier">any_tag</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">optional</span><span class="special"><</span> <a class="link" href="status.html" title="Class status">status</a> <span class="special">></span> <a class="link" href="communicator.html#idp95133464-bb"><span class="identifier">iprobe</span></a><span class="special">(</span><span class="keyword">int</span> <span class="special">=</span> <span class="identifier">any_source</span><span class="special">,</span> <span class="keyword">int</span> <span class="special">=</span> <span class="identifier">any_tag</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="communicator.html#idp95130456-bb"><span class="identifier">barrier</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="communicator.html#idp95120152-bb"><span class="keyword">operator</span> <span class="keyword">bool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="communicator.html#idp95121608-bb"><span class="keyword">operator</span> <span class="identifier">MPI_Comm</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="communicator.html" title="Class communicator">communicator</a> <a class="link" href="communicator.html#idp95122984-bb"><span class="identifier">split</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<a class="link" href="communicator.html" title="Class communicator">communicator</a> <a class="link" href="communicator.html#idp95126104-bb"><span class="identifier">split</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">optional</span><span class="special"><</span> <a class="link" href="intercommunicator.html" title="Class intercommunicator">intercommunicator</a> <span class="special">></span> <a class="link" href="communicator.html#idp95114984-bb"><span class="identifier">as_intercommunicator</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">optional</span><span class="special"><</span> <a class="link" href="graph_communicator.html" title="Class graph_communicator">graph_communicator</a> <span class="special">></span> <a class="link" href="communicator.html#idp95116920-bb"><span class="identifier">as_graph_communicator</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="communicator.html#idp95107800-bb"><span class="identifier">has_cartesian_topology</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="communicator.html#idp95108536-bb"><span class="identifier">abort</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp160867448"></a><h2>Description</h2>
<p>The <code class="computeroutput">communicator</code> class abstracts a set of communicating processes in MPI. All of the processes that belong to a certain communicator can determine the size of the communicator, their rank within the communicator, and communicate with any other processes in the communicator. </p>
<div class="refsect2">
<a name="idp160868408"></a><h3>
<a name="boost.mpi.communicatorconstruct-copy-destruct"></a><code class="computeroutput">communicator</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idp95111160-bb"></a><span class="identifier">communicator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Build a new Boost.MPI communicator for <code class="computeroutput">MPI_COMM_WORLD</code>.</p>
<p>Constructs a Boost.MPI communicator that attaches to <code class="computeroutput">MPI_COMM_WORLD</code>. This is the equivalent of constructing with <code class="computeroutput"></code>(MPI_COMM_WORLD, comm_attach). </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idp95101048-bb"></a><span class="identifier">communicator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">MPI_Comm</span> <span class="special">&</span> comm<span class="special">,</span> <span class="identifier">comm_create_kind</span> kind<span class="special">)</span><span class="special">;</span></pre>
<p>Build a new Boost.MPI communicator based on the MPI communicator <code class="computeroutput">comm</code>.</p>
<p><code class="computeroutput">comm</code> may be any valid MPI communicator. If <code class="computeroutput">comm</code> is MPI_COMM_NULL, an empty communicator (that cannot be used for communication) is created and the <code class="computeroutput">kind</code> parameter is ignored. Otherwise, the <code class="computeroutput">kind</code> parameters determines how the Boost.MPI communicator will be related to <code class="computeroutput">comm:</code> </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>If <code class="computeroutput">kind</code> is <code class="computeroutput">comm_duplicate</code>, duplicate <code class="computeroutput">comm</code> to create a new communicator. This new communicator will be freed when the Boost.MPI communicator (and all copies of it) is destroyed. This option is only permitted if <code class="computeroutput">comm</code> is a valid MPI intracommunicator or if the underlying MPI implementation supports MPI 2.0 (which supports duplication of intercommunicators).</p></li>
<li class="listitem"><p>If <code class="computeroutput">kind</code> is <code class="computeroutput">comm_take_ownership</code>, take ownership of <code class="computeroutput">comm</code>. It will be freed automatically when all of the Boost.MPI communicators go out of scope. This option must not be used when <code class="computeroutput">comm</code> is MPI_COMM_WORLD.</p></li>
<li class="listitem"><p>If <code class="computeroutput">kind</code> is <code class="computeroutput">comm_attach</code>, this Boost.MPI communicator will reference the existing MPI communicator <code class="computeroutput">comm</code> but will not free <code class="computeroutput">comm</code> when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user or MPI library (e.g., MPI_COMM_WORLD). </p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idp95096472-bb"></a><span class="identifier">communicator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="communicator.html" title="Class communicator">communicator</a> <span class="special">&</span> comm<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="group.html" title="Class group">boost::mpi::group</a> <span class="special">&</span> subgroup<span class="special">)</span><span class="special">;</span></pre>
<p>Build a new Boost.MPI communicator based on a subgroup of another MPI communicator.</p>
<p>This routine will construct a new communicator containing all of the processes from communicator <code class="computeroutput">comm</code> that are listed within the group <code class="computeroutput">subgroup</code>. Equivalent to <code class="computeroutput">MPI_Comm_create</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">comm</code></span></p></td>
<td><p>An MPI communicator.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">subgroup</code></span></p></td>
<td><p>A subgroup of the MPI communicator, <code class="computeroutput">comm</code>, for which we will construct a new communicator. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idp160893080"></a><h3>
<a name="idp95239528-bb"></a><code class="computeroutput">communicator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">int</span> <a name="idp95239736-bb"></a><span class="identifier">rank</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Determine the rank of the executing process in a communicator. <p>This routine is equivalent to <code class="computeroutput">MPI_Comm_rank</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The rank of the process in the communicator, which will be a value in [0, size()) </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">int</span> <a name="idp95241272-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Determine the number of processes in a communicator. <p>This routine is equivalent to <code class="computeroutput">MPI_Comm_size</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of processes in the communicator. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="group.html" title="Class group">boost::mpi::group</a> <a name="idp95242760-bb"></a><span class="identifier">group</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>This routine constructs a new group whose members are the processes within this communicator. Equivalent to calling <code class="computeroutput">MPI_Comm_group</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <span class="keyword">void</span> <a name="idp95227592-bb"></a><span class="identifier">send</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send data to another process. <p>This routine executes a potentially blocking send with tag <code class="computeroutput">tag</code> to the process with rank <code class="computeroutput">dest</code>. It can be received by the destination process with a matching <code class="computeroutput">recv</code> call.</p>
<p>The given <code class="computeroutput">value</code> must be suitable for transmission over MPI. There are several classes of types that meet these requirements:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Types with mappings to MPI data types: If <code class="computeroutput">is_mpi_datatype<T></code> is convertible to <code class="computeroutput">mpl::true_</code>, then <code class="computeroutput">value</code> will be transmitted using the MPI data type <code class="computeroutput">get_mpi_datatype<T>()</code>. All primitive C++ data types that have MPI equivalents, e.g., <code class="computeroutput">int</code>, <code class="computeroutput">float</code>, <code class="computeroutput">char</code>, <code class="computeroutput">double</code>, etc., have built-in mappings to MPI data types. You may turn a Serializable type with fixed structure into an MPI data type by specializing <code class="computeroutput"><code class="computeroutput"><a class="link" href="is_mpi_datatype.html" title="Struct template is_mpi_datatype">is_mpi_datatype</a></code></code> for your type.</p></li>
<li class="listitem"><p>Serializable types: Any type that provides the <code class="computeroutput">serialize()</code> functionality required by the Boost.Serialization library can be transmitted and received.</p></li>
<li class="listitem"><p>Packed archives and skeletons: Data that has been packed into an <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_oarchive.html" title="Class packed_oarchive">mpi::packed_oarchive</a></code></code> or the skeletons of data that have been backed into an <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_oarchive.html" title="Class packed_skeleton_oarchive">mpi::packed_skeleton_oarchive</a></code></code> can be transmitted, but will be received as <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_iarchive.html" title="Class packed_iarchive">mpi::packed_iarchive</a></code></code> and <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_iarchive.html" title="Class packed_skeleton_iarchive">mpi::packed_skeleton_iarchive</a></code></code>, respectively, to allow the values (or skeletons) to be extracted by the destination process.</p></li>
<li class="listitem"><p>Content: Content associated with a previously-transmitted skeleton can be transmitted by <code class="computeroutput">send</code> and received by <code class="computeroutput">recv</code>. The receiving process may only receive content into the content of a value that has been constructed with the matching skeleton.</p></li>
</ul></div>
<p>
</p>
<p>For types that have mappings to an MPI data type (including the concent of a type), an invocation of this routine will result in a single MPI_Send call. For variable-length data, e.g., serialized types and packed archives, two messages will be sent via MPI_Send: one containing the length of the data and the second containing the data itself. Note that the transmission mode for variable-length data is an implementation detail that is subject to change.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The rank of the remote process to which the data will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
<td><p>The value that will be transmitted to the receiver. The type <code class="computeroutput">T</code> of this value must meet the aforementioned criteria for transmission. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<span class="keyword">void</span> <a name="idp95223752-bb"></a><span class="identifier">send</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span> proxy<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send the skeleton of an object. <p>This routine executes a potentially blocking send with tag <code class="computeroutput">tag</code> to the process with rank <code class="computeroutput">dest</code>. It can be received by the destination process with a matching <code class="computeroutput">recv</code> call. This variation on <code class="computeroutput">send</code> will be used when a send of a skeleton is explicitly requested via code such as:</p>
<pre class="programlisting">* comm.send(dest, tag, skeleton(object));
*
</pre>
<p>The semantics of this routine are equivalent to that of sending a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_oarchive.html" title="Class packed_skeleton_oarchive">packed_skeleton_oarchive</a></code></code> storing the skeleton of the <code class="computeroutput">object</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The rank of the remote process to which the skeleton will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">proxy</code></span></p></td>
<td><p>The <code class="computeroutput"><code class="computeroutput"><a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a></code></code> containing a reference to the object whose skeleton will be transmitted. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<span class="keyword">void</span> <a name="idp95214392-bb"></a><span class="identifier">send</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">*</span> values<span class="special">,</span> <span class="keyword">int</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send an array of values to another process. <p>This routine executes a potentially blocking send of an array of data with tag <code class="computeroutput">tag</code> to the process with rank <code class="computeroutput">dest</code>. It can be received by the destination process with a matching array <code class="computeroutput">recv</code> call.</p>
<p>If <code class="computeroutput">T</code> is an MPI datatype, an invocation of this routine will be mapped to a single call to MPI_Send, using the datatype <code class="computeroutput">get_mpi_datatype<T>()</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The process rank of the remote process to which the data will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of values stored in the array. The destination process must call receive with at least this many elements to correctly receive the message. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">values</code></span></p></td>
<td><p>The array of values that will be transmitted to the receiver. The type <code class="computeroutput">T</code> of these values must be mapped to an MPI data type.</p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idp95204888-bb"></a><span class="identifier">send</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send a message to another process without any data. <p>This routine executes a potentially blocking send of a message to another process. The message contains no extra data, and can therefore only be received by a matching call to <code class="computeroutput">recv()</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The process rank of the remote process to which the message will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="status.html" title="Class status">status</a> <a name="idp95207848-bb"></a><span class="identifier">recv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Receive data from a remote process. <p>This routine blocks until it receives a message from the process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code>. The type <code class="computeroutput">T</code> of the <code class="computeroutput">value</code> must be suitable for transmission over MPI, which includes serializable types, types that can be mapped to MPI data types (including most built-in C++ types), packed MPI archives, skeletons, and content associated with skeletons; see the documentation of <code class="computeroutput">send</code> for a complete description.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
<td><p>Will contain the value of the message after a successful receive. The type of this value must match the value transmitted by the sender, unless the sender transmitted a packed archive or skeleton: in these cases, the sender transmits a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_oarchive.html" title="Class packed_oarchive">packed_oarchive</a></code></code> or <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_oarchive.html" title="Class packed_skeleton_oarchive">packed_skeleton_oarchive</a></code></code> and the destination receives a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_iarchive.html" title="Class packed_iarchive">packed_iarchive</a></code></code> or <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_iarchive.html" title="Class packed_skeleton_iarchive">packed_skeleton_iarchive</a></code></code>, respectively.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Information about the received message. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="status.html" title="Class status">status</a> <a name="idp95202280-bb"></a><span class="identifier">recv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span> proxy<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Receive a skeleton from a remote process. <p>This routine blocks until it receives a message from the process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code> containing a skeleton.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">proxy</code></span></p></td>
<td><p>The <code class="computeroutput"><code class="computeroutput"><a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a></code></code> containing a reference to the object that will be reshaped to match the received skeleton.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Information about the received message. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="status.html" title="Class status">status</a> <a name="idp95195896-bb"></a><span class="identifier">recv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span> proxy<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Receive a skeleton from a remote process. <p>This routine blocks until it receives a message from the process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code> containing a skeleton.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">proxy</code></span></p></td>
<td><p>The <code class="computeroutput"><code class="computeroutput"><a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a></code></code> containing a reference to the object that will be reshaped to match the received skeleton.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Information about the received message. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="status.html" title="Class status">status</a> <a name="idp95189448-bb"></a><span class="identifier">recv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span> values<span class="special">,</span> <span class="keyword">int</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Receive an array of values from a remote process. <p>This routine blocks until it receives an array of values from the process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code>. If the type <code class="computeroutput">T</code> is</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of values that can be stored into the <code class="computeroutput">values</code> array. This shall not be smaller than the number of elements transmitted by the sender.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">values</code></span></p></td>
<td><p>Will contain the values in the message after a successful receive. The type of these elements must match the type of the elements transmitted by the sender.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Information about the received message. </p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>std::range_error if the message to be received contains more than <code class="computeroutput">n</code> values.</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="status.html" title="Class status">status</a> <a name="idp95184264-bb"></a><span class="identifier">recv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Receive a message from a remote process without any data. <p>This routine blocks until it receives a message from the process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending the message. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Information about the received message. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a name="idp95176552-bb"></a><span class="identifier">isend</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send a message to a remote process without blocking. <p>The <code class="computeroutput">isend</code> method is functionality identical to the <code class="computeroutput">send</code> method and transmits data in the same way, except that <code class="computeroutput">isend</code> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The rank of the remote process to which the data will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
<td><p>The value that will be transmitted to the receiver. The type <code class="computeroutput">T</code> of this value must meet the aforementioned criteria for transmission.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="request.html" title="Class request">request</a> <a name="idp95164840-bb"></a><span class="identifier">isend</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a><span class="special"><</span> <span class="identifier">T</span> <span class="special">></span> <span class="special">&</span> proxy<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send the skeleton of an object without blocking. <p>This routine is functionally identical to the <code class="computeroutput">send</code> method for <code class="computeroutput"><code class="computeroutput"><a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a></code></code> objects except that <code class="computeroutput">isend</code> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</p>
<p>The semantics of this routine are equivalent to a non-blocking send of a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_oarchive.html" title="Class packed_skeleton_oarchive">packed_skeleton_oarchive</a></code></code> storing the skeleton of the <code class="computeroutput">object</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The rank of the remote process to which the skeleton will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">proxy</code></span></p></td>
<td><p>The <code class="computeroutput"><code class="computeroutput"><a class="link" href="skeleton_proxy.html" title="Struct template skeleton_proxy">skeleton_proxy</a></code></code> containing a reference to the object whose skeleton will be transmitted.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="request.html" title="Class request">request</a> <a name="idp95171640-bb"></a><span class="identifier">isend</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">*</span> values<span class="special">,</span> <span class="keyword">int</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send an array of values to another process without blocking. <p>This routine is functionally identical to the <code class="computeroutput">send</code> method for arrays except that <code class="computeroutput">isend</code> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The process rank of the remote process to which the data will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of values stored in the array. The destination process must call receive with at least this many elements to correctly receive the message.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">values</code></span></p></td>
<td><p>The array of values that will be transmitted to the receiver. The type <code class="computeroutput">T</code> of these values must be mapped to an MPI data type.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="request.html" title="Class request">request</a> <a name="idp95161400-bb"></a><span class="identifier">isend</span><span class="special">(</span><span class="keyword">int</span> dest<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Send a message to another process without any data without blocking. <p>This routine is functionally identical to the <code class="computeroutput">send</code> method for sends with no data, except that <code class="computeroutput">isend</code> will not block while waiting for the message to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">dest</code></span></p></td>
<td><p>The process rank of the remote process to which the message will be sent.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <code class="computeroutput">environment::max_tag()</code>.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span> <a class="link" href="request.html" title="Class request">request</a> <a name="idp95157288-bb"></a><span class="identifier">irecv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="identifier">T</span> <span class="special">&</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Prepare to receive a message from a remote process. <p>The <code class="computeroutput">irecv</code> method is functionally identical to the <code class="computeroutput">recv</code> method and receive data in the same way, except that <code class="computeroutput">irecv</code> will not block while waiting for data to be transmitted. Instead, it immediately returns a request object that allows one to query the status of the receive or wait until it has completed.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">value</code></span></p></td>
<td><p>Will contain the value of the message after a successful receive. The type of this value must match the value transmitted by the sender, unless the sender transmitted a packed archive or skeleton: in these cases, the sender transmits a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_oarchive.html" title="Class packed_oarchive">packed_oarchive</a></code></code> or <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_oarchive.html" title="Class packed_skeleton_oarchive">packed_skeleton_oarchive</a></code></code> and the destination receives a <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_iarchive.html" title="Class packed_iarchive">packed_iarchive</a></code></code> or <code class="computeroutput"><code class="computeroutput"><a class="link" href="packed_skeleton_iarchive.html" title="Class packed_skeleton_iarchive">packed_skeleton_iarchive</a></code></code>, respectively.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> T<span class="special">></span>
<a class="link" href="request.html" title="Class request">request</a> <a name="idp95149416-bb"></a><span class="identifier">irecv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">,</span> <span class="identifier">T</span> <span class="special">*</span> values<span class="special">,</span> <span class="keyword">int</span> n<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Initiate receipt of an array of values from a remote process. <p>This routine initiates a receive operation for an array of values transmitted by process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>The number of values that can be stored into the <code class="computeroutput">values</code> array. This shall not be smaller than the number of elements transmitted by the sender.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending data. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">values</code></span></p></td>
<td><p>Will contain the values in the message after a successful receive. The type of these elements must match the type of the elements transmitted by the sender.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="request.html" title="Class request">request</a> <a name="idp95140712-bb"></a><span class="identifier">irecv</span><span class="special">(</span><span class="keyword">int</span> source<span class="special">,</span> <span class="keyword">int</span> tag<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Initiate receipt of a message from a remote process that carries no data. <p>This routine initiates a receive operation for a message from process <code class="computeroutput">source</code> with the given <code class="computeroutput">tag</code> that carries no data.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>The process that will be sending the message. This will either be a process rank within the communicator or the constant <code class="computeroutput">any_source</code>, indicating that we can receive the message from any process.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <code class="computeroutput">send</code>. Alternatively, the argument may be the constant <code class="computeroutput">any_tag</code>, indicating that this receive matches a message with any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a <code class="computeroutput">request</code> object that describes this communication. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="status.html" title="Class status">status</a> <a name="idp95136952-bb"></a><span class="identifier">probe</span><span class="special">(</span><span class="keyword">int</span> source <span class="special">=</span> <span class="identifier">any_source</span><span class="special">,</span> <span class="keyword">int</span> tag <span class="special">=</span> <span class="identifier">any_tag</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Waits until a message is available to be received. <p>This operation waits until a message matching (<code class="computeroutput">source</code>, <code class="computeroutput">tag</code>) is available to be received. It then returns information about that message. The functionality is equivalent to <code class="computeroutput">MPI_Probe</code>. To check if a message is available without blocking, use <code class="computeroutput">iprobe</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>Determine if there is a message available from this rank. If <code class="computeroutput">any_source</code>, then the message returned may come from any source.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>Determine if there is a message available with the given tag. If <code class="computeroutput">any_tag</code>, then the message returned may have any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Returns information about the first message that matches the given criteria. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">optional</span><span class="special"><</span> <a class="link" href="status.html" title="Class status">status</a> <span class="special">></span> <a name="idp95133464-bb"></a><span class="identifier">iprobe</span><span class="special">(</span><span class="keyword">int</span> source <span class="special">=</span> <span class="identifier">any_source</span><span class="special">,</span> <span class="keyword">int</span> tag <span class="special">=</span> <span class="identifier">any_tag</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Determine if a message is available to be received. <p>This operation determines if a message matching (<code class="computeroutput">source</code>, <code class="computeroutput">tag</code>) is available to be received. If so, it returns information about that message; otherwise, it returns immediately with an empty optional. The functionality is equivalent to <code class="computeroutput">MPI_Iprobe</code>. To wait until a message is available, use <code class="computeroutput">wait</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">source</code></span></p></td>
<td><p>Determine if there is a message available from this rank. If <code class="computeroutput">any_source</code>, then the message returned may come from any source.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">tag</code></span></p></td>
<td><p>Determine if there is a message available with the given tag. If <code class="computeroutput">any_tag</code>, then the message returned may have any tag.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>If a matching message is available, returns information about that message. Otherwise, returns an empty <code class="computeroutput">boost::optional</code>. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idp95130456-bb"></a><span class="identifier">barrier</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Wait for all processes within a communicator to reach the barrier. <p>This routine is a collective operation that blocks each process until all processes have entered it, then releases all of the processes "simultaneously". It is equivalent to <code class="computeroutput">MPI_Barrier</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idp95120152-bb"></a><span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Determine if this communicator is valid for communication. <p>Evaluates <code class="computeroutput">true</code> in a boolean context if this communicator is valid for communication, i.e., does not represent MPI_COMM_NULL. Otherwise, evaluates <code class="computeroutput">false</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idp95121608-bb"></a><span class="keyword">operator</span> <span class="identifier">MPI_Comm</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Access the MPI communicator associated with a Boost.MPI communicator. <p>This routine permits the implicit conversion from a Boost.MPI communicator to an MPI communicator.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The associated MPI communicator. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="communicator.html" title="Class communicator">communicator</a> <a name="idp95122984-bb"></a><span class="identifier">split</span><span class="special">(</span><span class="keyword">int</span> color<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Split the communicator into multiple, disjoint communicators each of which is based on a particular color. This is a collective operation that returns a new communicator that is a subgroup of <code class="computeroutput">this</code>. This routine is functionally equivalent to <code class="computeroutput">MPI_Comm_split</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">color</code></span></p></td>
<td><p>The color of this process. All processes with the same <code class="computeroutput">color</code> value will be placed into the same group.</p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A new communicator containing all of the processes in <code class="computeroutput">this</code> that have the same <code class="computeroutput">color</code>. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="communicator.html" title="Class communicator">communicator</a> <a name="idp95126104-bb"></a><span class="identifier">split</span><span class="special">(</span><span class="keyword">int</span> color<span class="special">,</span> <span class="keyword">int</span> key<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Split the communicator into multiple, disjoint communicators each of which is based on a particular color. This is a collective operation that returns a new communicator that is a subgroup of <code class="computeroutput">this</code>. This routine is functionally equivalent to <code class="computeroutput">MPI_Comm_split</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">color</code></span></p></td>
<td><p>The color of this process. All processes with the same <code class="computeroutput">color</code> value will be placed into the same group.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">key</code></span></p></td>
<td><p>A key value that will be used to determine the ordering of processes with the same color in the resulting communicator. If omitted, the rank of the processes in <code class="computeroutput">this</code> will determine the ordering of processes in the resulting group.</p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A new communicator containing all of the processes in <code class="computeroutput">this</code> that have the same <code class="computeroutput">color</code>. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">optional</span><span class="special"><</span> <a class="link" href="intercommunicator.html" title="Class intercommunicator">intercommunicator</a> <span class="special">></span> <a name="idp95114984-bb"></a><span class="identifier">as_intercommunicator</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Determine if the communicator is in fact an intercommunicator and, if so, return that intercommunicator.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>an <code class="computeroutput">optional</code> containing the intercommunicator, if this communicator is in fact an intercommunicator. Otherwise, returns an empty <code class="computeroutput">optional</code>. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">optional</span><span class="special"><</span> <a class="link" href="graph_communicator.html" title="Class graph_communicator">graph_communicator</a> <span class="special">></span> <a name="idp95116920-bb"></a><span class="identifier">as_graph_communicator</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Determine if the communicator has a graph topology and, if so, return that <code class="computeroutput"><code class="computeroutput"><a class="link" href="graph_communicator.html" title="Class graph_communicator">graph_communicator</a></code></code>. Even though the communicators have different types, they refer to the same underlying communication space and can be used interchangeably for communication.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>an <code class="computeroutput">optional</code> containing the graph communicator, if this communicator does in fact have a graph topology. Otherwise, returns an empty <code class="computeroutput">optional</code>. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="idp95107800-bb"></a><span class="identifier">has_cartesian_topology</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Determines whether this communicator has a Cartesian topology. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idp95108536-bb"></a><span class="identifier">abort</span><span class="special">(</span><span class="keyword">int</span> errcode<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Abort all tasks in the group of this communicator.</p>
<p>Makes a "best attempt" to abort all of the tasks in the group of this communicator. Depending on the underlying MPI implementation, this may either abort the entire program (and possibly return <code class="computeroutput">errcode</code> to the environment) or only abort some processes, allowing the others to continue. Consult the documentation for your MPI implementation. This is equivalent to a call to <code class="computeroutput">MPI_Abort</code> </p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">errcode</code></span></p></td>
<td><p>The error code to return from aborted processes. </p></td>
</tr></tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Will not return. </p></td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2005-2007 Douglas Gregor,
Matthias Troyer, Trustees of Indiana University<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">
http://www.boost.org/LICENSE_1_0.txt </a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="scan.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mpi/reference.html#header.boost.mpi.communicator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="comm_create_kind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|