Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/d0/d3b/MPI_8h_source.html
DOLFINx 0.7.3
DOLFINx C++ interface
Loading...
Searching...
No Matches
MPI.h
1// Copyright (C) 2007-2014 Magnus Vikstrøm and Garth N. Wells
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include <algorithm>
10#include <array>
11#include <cassert>
12#include <complex>
13#include <cstdint>
14#include <dolfinx/common/Timer.h>
15#include <dolfinx/common/log.h>
16#include <dolfinx/common/types.h>
17#include <dolfinx/graph/AdjacencyList.h>
18#include <numeric>
19#include <set>
20#include <span>
21#include <tuple>
22#include <type_traits>
23#include <utility>
24#include <vector>
25
26#define MPICH_IGNORE_CXX_SEEK 1
27#include <mpi.h>
28
30namespace dolfinx::MPI
31{
32
34enum class tag : int
35{
36 consensus_pcx,
37 consensus_pex
38};
39
42class Comm
43{
44public:
46 explicit Comm(MPI_Comm comm, bool duplicate = true);
47
49 Comm(const Comm& comm) noexcept;
50
52 Comm(Comm&& comm) noexcept;
53
54 // Disable copy assignment operator
55 Comm& operator=(const Comm& comm) = delete;
56
58 Comm& operator=(Comm&& comm) noexcept;
59
61 ~Comm();
62
64 MPI_Comm comm() const noexcept;
65
66private:
67 // MPI communicator
68 MPI_Comm _comm;
69};
70
72int rank(MPI_Comm comm);
73
76int size(MPI_Comm comm);
77
82void check_error(MPI_Comm comm, int code);
83
91constexpr std::array<std::int64_t, 2> local_range(int rank, std::int64_t N,
92 int size)
93{
94 assert(rank >= 0);
95 assert(N >= 0);
96 assert(size > 0);
97
98 // Compute number of items per rank and remainder
99 const std::int64_t n = N / size;
100 const std::int64_t r = N % size;
101
102 // Compute local range
103 if (rank < r)
104 return {rank * (n + 1), rank * (n + 1) + n + 1};
105 else
106 return {rank * n + r, rank * n + r + n};
107}
108
115constexpr int index_owner(int size, std::size_t index, std::size_t N)
116{
117 assert(index < N);
118
119 // Compute number of items per rank and remainder
120 const std::size_t n = N / size;
121 const std::size_t r = N % size;
122
123 if (index < r * (n + 1))
124 {
125 // First r ranks own n + 1 indices
126 return index / (n + 1);
127 }
128 else
129 {
130 // Remaining ranks own n indices
131 return r + (index - r * (n + 1)) / n;
132 }
133}
134
158std::vector<int> compute_graph_edges_pcx(MPI_Comm comm,
159 std::span<const int> edges);
160
185std::vector<int> compute_graph_edges_nbx(MPI_Comm comm,
186 std::span<const int> edges);
187
207template <typename U>
208std::pair<std::vector<std::int32_t>,
209 std::vector<typename std::remove_reference_t<typename U::value_type>>>
210distribute_to_postoffice(MPI_Comm comm, const U& x,
211 std::array<std::int64_t, 2> shape,
212 std::int64_t rank_offset);
213
235template <typename U>
236std::vector<typename std::remove_reference_t<typename U::value_type>>
237distribute_from_postoffice(MPI_Comm comm, std::span<const std::int64_t> indices,
238 const U& x, std::array<std::int64_t, 2> shape,
239 std::int64_t rank_offset);
240
264template <typename U>
265std::vector<typename std::remove_reference_t<typename U::value_type>>
266distribute_data(MPI_Comm comm, std::span<const std::int64_t> indices,
267 const U& x, int shape1);
268
269template <typename T>
270struct dependent_false : std::false_type
271{
272};
273
275template <typename T>
276constexpr MPI_Datatype mpi_type()
277{
278 if constexpr (std::is_same_v<T, float>)
279 return MPI_FLOAT;
280 else if constexpr (std::is_same_v<T, double>)
281 return MPI_DOUBLE;
282 else if constexpr (std::is_same_v<T, std::complex<double>>)
283 return MPI_C_DOUBLE_COMPLEX;
284 else if constexpr (std::is_same_v<T, std::complex<float>>)
285 return MPI_C_FLOAT_COMPLEX;
286 else if constexpr (std::is_same_v<T, short int>)
287 return MPI_SHORT;
288 else if constexpr (std::is_same_v<T, int>)
289 return MPI_INT;
290 else if constexpr (std::is_same_v<T, unsigned int>)
291 return MPI_UNSIGNED;
292 else if constexpr (std::is_same_v<T, long int>)
293 return MPI_LONG;
294 else if constexpr (std::is_same_v<T, unsigned long>)
295 return MPI_UNSIGNED_LONG;
296 else if constexpr (std::is_same_v<T, long long>)
297 return MPI_LONG_LONG;
298 else if constexpr (std::is_same_v<T, unsigned long long>)
299 return MPI_UNSIGNED_LONG_LONG;
300 else if constexpr (std::is_same_v<T, bool>)
301 return MPI_C_BOOL;
302 else if constexpr (std::is_same_v<T, std::int8_t>)
303 return MPI_INT8_T;
304 else
305 // Issue compile time error
306 static_assert(!std::is_same_v<T, T>);
307}
308
309//---------------------------------------------------------------------------
310template <typename U>
311std::pair<std::vector<std::int32_t>,
312 std::vector<typename std::remove_reference_t<typename U::value_type>>>
313distribute_to_postoffice(MPI_Comm comm, const U& x,
314 std::array<std::int64_t, 2> shape,
315 std::int64_t rank_offset)
316{
317 using T = typename std::remove_reference_t<typename U::value_type>;
318
319 const int size = dolfinx::MPI::size(comm);
320 const int rank = dolfinx::MPI::rank(comm);
321 assert(x.size() % shape[1] == 0);
322 const std::int32_t shape0_local = x.size() / shape[1];
323
324 LOG(2) << "Sending data to post offices (distribute_to_postoffice)";
325
326 // Post office ranks will receive data from this rank
327 std::vector<int> row_to_dest(shape0_local);
328 for (std::int32_t i = 0; i < shape0_local; ++i)
329 {
330 int dest = MPI::index_owner(size, i + rank_offset, shape[0]);
331 row_to_dest[i] = dest;
332 }
333
334 // Build list of (dest, positions) for each row that doesn't belong to
335 // this rank, then sort
336 std::vector<std::array<std::int32_t, 2>> dest_to_index;
337 dest_to_index.reserve(shape0_local);
338 for (std::int32_t i = 0; i < shape0_local; ++i)
339 {
340 std::size_t idx = i + rank_offset;
341 if (int dest = MPI::index_owner(size, idx, shape[0]); dest != rank)
342 dest_to_index.push_back({dest, i});
343 }
344 std::sort(dest_to_index.begin(), dest_to_index.end());
345
346 // Build list of neighbour src ranks and count number of items (rows
347 // of x) to receive from each src post office (by neighbourhood rank)
348 std::vector<int> dest;
349 std::vector<std::int32_t> num_items_per_dest,
350 pos_to_neigh_rank(shape0_local, -1);
351 {
352 auto it = dest_to_index.begin();
353 while (it != dest_to_index.end())
354 {
355 const int neigh_rank = dest.size();
356
357 // Store global rank
358 dest.push_back((*it)[0]);
359
360 // Find iterator to next global rank
361 auto it1
362 = std::find_if(it, dest_to_index.end(),
363 [r = dest.back()](auto& idx) { return idx[0] != r; });
364
365 // Store number of items for current rank
366 num_items_per_dest.push_back(std::distance(it, it1));
367
368 // Map from local x index to local destination rank
369 for (auto e = it; e != it1; ++e)
370 pos_to_neigh_rank[(*e)[1]] = neigh_rank;
371
372 // Advance iterator
373 it = it1;
374 }
375 }
376
377 // Determine source ranks
378 const std::vector<int> src = MPI::compute_graph_edges_nbx(comm, dest);
379 LOG(INFO)
380 << "Number of neighbourhood source ranks in distribute_to_postoffice: "
381 << src.size();
382
383 // Create neighbourhood communicator for sending data to post offices
384 MPI_Comm neigh_comm;
385 int err = MPI_Dist_graph_create_adjacent(
386 comm, src.size(), src.data(), MPI_UNWEIGHTED, dest.size(), dest.data(),
387 MPI_UNWEIGHTED, MPI_INFO_NULL, false, &neigh_comm);
388 dolfinx::MPI::check_error(comm, err);
389
390 // Compute send displacements
391 std::vector<std::int32_t> send_disp = {0};
392 std::partial_sum(num_items_per_dest.begin(), num_items_per_dest.end(),
393 std::back_inserter(send_disp));
394
395 // Pack send buffers
396 std::vector<T> send_buffer_data(shape[1] * send_disp.back());
397 std::vector<std::int64_t> send_buffer_index(send_disp.back());
398 {
399 std::vector<std::int32_t> send_offsets = send_disp;
400 for (std::int32_t i = 0; i < shape0_local; ++i)
401 {
402 if (int neigh_dest = pos_to_neigh_rank[i]; neigh_dest != -1)
403 {
404 std::size_t pos = send_offsets[neigh_dest];
405 send_buffer_index[pos] = i + rank_offset;
406 std::copy_n(std::next(x.begin(), i * shape[1]), shape[1],
407 std::next(send_buffer_data.begin(), shape[1] * pos));
408 ++send_offsets[neigh_dest];
409 }
410 }
411 }
412
413 // Send number of items to post offices (destination) that I will be
414 // sending
415 std::vector<int> num_items_recv(src.size());
416 num_items_per_dest.reserve(1);
417 num_items_recv.reserve(1);
418 err = MPI_Neighbor_alltoall(num_items_per_dest.data(), 1, MPI_INT,
419 num_items_recv.data(), 1, MPI_INT, neigh_comm);
420 dolfinx::MPI::check_error(comm, err);
421
422 // Prepare receive displacement and buffers
423 std::vector<std::int32_t> recv_disp(num_items_recv.size() + 1, 0);
424 std::partial_sum(num_items_recv.begin(), num_items_recv.end(),
425 std::next(recv_disp.begin()));
426
427 // Send/receive global indices
428 std::vector<std::int64_t> recv_buffer_index(recv_disp.back());
429 err = MPI_Neighbor_alltoallv(
430 send_buffer_index.data(), num_items_per_dest.data(), send_disp.data(),
431 MPI_INT64_T, recv_buffer_index.data(), num_items_recv.data(),
432 recv_disp.data(), MPI_INT64_T, neigh_comm);
433 dolfinx::MPI::check_error(comm, err);
434
435 // Send/receive data (x)
436 MPI_Datatype compound_type;
437 MPI_Type_contiguous(shape[1], dolfinx::MPI::mpi_type<T>(), &compound_type);
438 MPI_Type_commit(&compound_type);
439 std::vector<T> recv_buffer_data(shape[1] * recv_disp.back());
440 err = MPI_Neighbor_alltoallv(
441 send_buffer_data.data(), num_items_per_dest.data(), send_disp.data(),
442 compound_type, recv_buffer_data.data(), num_items_recv.data(),
443 recv_disp.data(), compound_type, neigh_comm);
444 dolfinx::MPI::check_error(comm, err);
445 err = MPI_Type_free(&compound_type);
446 dolfinx::MPI::check_error(comm, err);
447 err = MPI_Comm_free(&neigh_comm);
448 dolfinx::MPI::check_error(comm, err);
449
450 LOG(2) << "Completed send data to post offices.";
451
452 // Convert to local indices
453 const std::int64_t r0 = MPI::local_range(rank, shape[0], size)[0];
454 std::vector<std::int32_t> index_local(recv_buffer_index.size());
455 std::transform(recv_buffer_index.cbegin(), recv_buffer_index.cend(),
456 index_local.begin(), [r0](auto idx) { return idx - r0; });
457
458 return {index_local, recv_buffer_data};
459}
460//---------------------------------------------------------------------------
461template <typename U>
462std::vector<typename std::remove_reference_t<typename U::value_type>>
463distribute_from_postoffice(MPI_Comm comm, std::span<const std::int64_t> indices,
464 const U& x, std::array<std::int64_t, 2> shape,
465 std::int64_t rank_offset)
466{
467 using T = typename std::remove_reference_t<typename U::value_type>;
468
469 common::Timer timer("Distribute row-wise data (scalable)");
470 assert(shape[1] > 0);
471
472 const int size = dolfinx::MPI::size(comm);
473 const int rank = dolfinx::MPI::rank(comm);
474 assert(x.size() % shape[1] == 0);
475 const std::int64_t shape0_local = x.size() / shape[1];
476
477 // 0. Send x data to/from post offices
478
479 // Send receive x data to post office (only for rows that need to be
480 // communicated)
481 auto [post_indices, post_x] = MPI::distribute_to_postoffice(
482 comm, x, {shape[0], shape[1]}, rank_offset);
483 assert(post_indices.size() == post_x.size() / shape[1]);
484
485 // 1. Send request to post office ranks for data
486
487 // Build list of (src, global index, global, index positions) for each
488 // entry in 'indices' that doesn't belong to this rank, then sort
489 std::vector<std::tuple<int, std::int64_t, std::int32_t>> src_to_index;
490 for (std::size_t i = 0; i < indices.size(); ++i)
491 {
492 std::size_t idx = indices[i];
493 if (int src = MPI::index_owner(size, idx, shape[0]); src != rank)
494 src_to_index.push_back({src, idx, i});
495 }
496 std::sort(src_to_index.begin(), src_to_index.end());
497
498 // Build list is neighbour src ranks and count number of items (rows
499 // of x) to receive from each src post office (by neighbourhood rank)
500 std::vector<std::int32_t> num_items_per_src;
501 std::vector<int> src;
502 {
503 auto it = src_to_index.begin();
504 while (it != src_to_index.end())
505 {
506 src.push_back(std::get<0>(*it));
507 auto it1 = std::find_if(it, src_to_index.end(),
508 [r = src.back()](auto& idx)
509 { return std::get<0>(idx) != r; });
510 num_items_per_src.push_back(std::distance(it, it1));
511 it = it1;
512 }
513 }
514
515 // Determine 'delivery' destination ranks (ranks that want data from
516 // me)
517 const std::vector<int> dest
519 LOG(INFO) << "Neighbourhood destination ranks from post office in "
520 "distribute_data (rank, num dests, num dests/mpi_size): "
521 << rank << ", " << dest.size() << ", "
522 << static_cast<double>(dest.size()) / size;
523
524 // Create neighbourhood communicator for sending data to post offices
525 // (src), and receiving data form my send my post office
526 MPI_Comm neigh_comm0;
527 int err = MPI_Dist_graph_create_adjacent(
528 comm, dest.size(), dest.data(), MPI_UNWEIGHTED, src.size(), src.data(),
529 MPI_UNWEIGHTED, MPI_INFO_NULL, false, &neigh_comm0);
530 dolfinx::MPI::check_error(comm, err);
531
532 // Communicate number of requests to each source
533 std::vector<int> num_items_recv(dest.size());
534 num_items_per_src.reserve(1);
535 num_items_recv.reserve(1);
536 err = MPI_Neighbor_alltoall(num_items_per_src.data(), 1, MPI_INT,
537 num_items_recv.data(), 1, MPI_INT, neigh_comm0);
538 dolfinx::MPI::check_error(comm, err);
539
540 // Prepare send/receive displacements
541 std::vector<std::int32_t> send_disp = {0};
542 std::partial_sum(num_items_per_src.begin(), num_items_per_src.end(),
543 std::back_inserter(send_disp));
544 std::vector<std::int32_t> recv_disp = {0};
545 std::partial_sum(num_items_recv.begin(), num_items_recv.end(),
546 std::back_inserter(recv_disp));
547
548 // Pack my requested indices (global) in send buffer ready to send to
549 // post offices
550 assert(send_disp.back() == (int)src_to_index.size());
551 std::vector<std::int64_t> send_buffer_index(src_to_index.size());
552 std::transform(src_to_index.cbegin(), src_to_index.cend(),
553 send_buffer_index.begin(),
554 [](auto& x) { return std::get<1>(x); });
555
556 // Prepare the receive buffer
557 std::vector<std::int64_t> recv_buffer_index(recv_disp.back());
558 err = MPI_Neighbor_alltoallv(
559 send_buffer_index.data(), num_items_per_src.data(), send_disp.data(),
560 MPI_INT64_T, recv_buffer_index.data(), num_items_recv.data(),
561 recv_disp.data(), MPI_INT64_T, neigh_comm0);
562 dolfinx::MPI::check_error(comm, err);
563
564 err = MPI_Comm_free(&neigh_comm0);
565 dolfinx::MPI::check_error(comm, err);
566
567 // 2. Send data (rows of x) back to requesting ranks (transpose of the
568 // preceding communication pattern operation)
569
570 // Build map from local index to post_indices position. Set to -1 for
571 // data that was already on this rank and was therefore was not
572 // sent/received via a postoffice.
573 const std::array<std::int64_t, 2> postoffice_range
574 = MPI::local_range(rank, shape[0], size);
575 std::vector<std::int32_t> post_indices_map(
576 postoffice_range[1] - postoffice_range[0], -1);
577 for (std::size_t i = 0; i < post_indices.size(); ++i)
578 {
579 assert(post_indices[i] < (int)post_indices_map.size());
580 post_indices_map[post_indices[i]] = i;
581 }
582
583 // Build send buffer
584 std::vector<T> send_buffer_data(shape[1] * recv_disp.back());
585 for (std::size_t p = 0; p < recv_disp.size() - 1; ++p)
586 {
587 int offset = recv_disp[p];
588 for (std::int32_t i = recv_disp[p]; i < recv_disp[p + 1]; ++i)
589 {
590 std::int64_t index = recv_buffer_index[i];
591 if (index >= rank_offset and index < (rank_offset + shape0_local))
592 {
593 // I already had this index before any communication
594 std::int32_t local_index = index - rank_offset;
595 std::copy_n(std::next(x.begin(), shape[1] * local_index), shape[1],
596 std::next(send_buffer_data.begin(), shape[1] * offset));
597 }
598 else
599 {
600 // Take from my 'post bag'
601 auto local_index = index - postoffice_range[0];
602 std::int32_t pos = post_indices_map[local_index];
603 assert(pos != -1);
604 std::copy_n(std::next(post_x.begin(), shape[1] * pos), shape[1],
605 std::next(send_buffer_data.begin(), shape[1] * offset));
606 }
607
608 ++offset;
609 }
610 }
611
612 err = MPI_Dist_graph_create_adjacent(
613 comm, src.size(), src.data(), MPI_UNWEIGHTED, dest.size(), dest.data(),
614 MPI_UNWEIGHTED, MPI_INFO_NULL, false, &neigh_comm0);
615 dolfinx::MPI::check_error(comm, err);
616
617 MPI_Datatype compound_type0;
618 MPI_Type_contiguous(shape[1], dolfinx::MPI::mpi_type<T>(), &compound_type0);
619 MPI_Type_commit(&compound_type0);
620
621 std::vector<T> recv_buffer_data(shape[1] * send_disp.back());
622 err = MPI_Neighbor_alltoallv(
623 send_buffer_data.data(), num_items_recv.data(), recv_disp.data(),
624 compound_type0, recv_buffer_data.data(), num_items_per_src.data(),
625 send_disp.data(), compound_type0, neigh_comm0);
626 dolfinx::MPI::check_error(comm, err);
627
628 err = MPI_Type_free(&compound_type0);
629 dolfinx::MPI::check_error(comm, err);
630 err = MPI_Comm_free(&neigh_comm0);
631 dolfinx::MPI::check_error(comm, err);
632
633 std::vector<std::int32_t> index_pos_to_buffer(indices.size(), -1);
634 for (std::size_t i = 0; i < src_to_index.size(); ++i)
635 index_pos_to_buffer[std::get<2>(src_to_index[i])] = i;
636
637 // Extra data to return
638 std::vector<T> x_new(shape[1] * indices.size());
639 for (std::size_t i = 0; i < indices.size(); ++i)
640 {
641 const std::int64_t index = indices[i];
642 if (index >= rank_offset and index < (rank_offset + shape0_local))
643 {
644 // Had data from the start in x
645 auto local_index = index - rank_offset;
646 std::copy_n(std::next(x.begin(), shape[1] * local_index), shape[1],
647 std::next(x_new.begin(), shape[1] * i));
648 }
649 else
650 {
651 if (int src = MPI::index_owner(size, index, shape[0]); src == rank)
652 {
653 // In my post office bag
654 auto local_index = index - postoffice_range[0];
655 std::int32_t pos = post_indices_map[local_index];
656 assert(pos != -1);
657 std::copy_n(std::next(post_x.begin(), shape[1] * pos), shape[1],
658 std::next(x_new.begin(), shape[1] * i));
659 }
660 else
661 {
662 // In my received post
663 std::int32_t pos = index_pos_to_buffer[i];
664 assert(pos != -1);
665 std::copy_n(std::next(recv_buffer_data.begin(), shape[1] * pos),
666 shape[1], std::next(x_new.begin(), shape[1] * i));
667 }
668 }
669 }
670
671 return x_new;
672}
673//---------------------------------------------------------------------------
674template <typename U>
675std::vector<typename std::remove_reference_t<typename U::value_type>>
676distribute_data(MPI_Comm comm, std::span<const std::int64_t> indices,
677 const U& x, int shape1)
678{
679 assert(shape1 > 0);
680 assert(x.size() % shape1 == 0);
681 const std::int64_t shape0_local = x.size() / shape1;
682
683 std::int64_t shape0(0), rank_offset(0);
684 int err
685 = MPI_Allreduce(&shape0_local, &shape0, 1, MPI_INT64_T, MPI_SUM, comm);
686 dolfinx::MPI::check_error(comm, err);
687 err = MPI_Exscan(&shape0_local, &rank_offset, 1, MPI_INT64_T, MPI_SUM, comm);
688 dolfinx::MPI::check_error(comm, err);
689
690 return distribute_from_postoffice(comm, indices, x, {shape0, shape1},
691 rank_offset);
692}
693//---------------------------------------------------------------------------
694
695} // namespace dolfinx::MPI
A duplicate MPI communicator and manage lifetime of the communicator.
Definition MPI.h:43
~Comm()
Destructor (frees wrapped communicator)
Definition MPI.cpp:36
MPI_Comm comm() const noexcept
Return the underlying MPI_Comm object.
Definition MPI.cpp:62
A timer can be used for timing tasks. The basic usage is.
Definition Timer.h:31
MPI support functionality.
Definition MPI.h:31
std::vector< typename std::remove_reference_t< typename U::value_type > > distribute_data(MPI_Comm comm, std::span< const std::int64_t > indices, const U &x, int shape1)
Distribute rows of a rectangular data array to ranks where they are required (scalable version).
Definition MPI.h:676
std::pair< std::vector< std::int32_t >, std::vector< typename std::remove_reference_t< typename U::value_type > > > distribute_to_postoffice(MPI_Comm comm, const U &x, std::array< std::int64_t, 2 > shape, std::int64_t rank_offset)
Distribute row data to 'post office' ranks.
Definition MPI.h:313
std::vector< int > compute_graph_edges_nbx(MPI_Comm comm, std::span< const int > edges)
Determine incoming graph edges using the NBX consensus algorithm.
Definition MPI.cpp:164
constexpr int index_owner(int size, std::size_t index, std::size_t N)
Return which rank owns index in global range [0, N - 1] (inverse of MPI::local_range).
Definition MPI.h:115
std::vector< typename std::remove_reference_t< typename U::value_type > > distribute_from_postoffice(MPI_Comm comm, std::span< const std::int64_t > indices, const U &x, std::array< std::int64_t, 2 > shape, std::int64_t rank_offset)
Distribute rows of a rectangular data array from post office ranks to ranks where they are required.
Definition MPI.h:463
std::vector< int > compute_graph_edges_pcx(MPI_Comm comm, std::span< const int > edges)
Determine incoming graph edges using the PCX consensus algorithm.
Definition MPI.cpp:97
void check_error(MPI_Comm comm, int code)
Check MPI error code. If the error code is not equal to MPI_SUCCESS, then std::abort is called.
Definition MPI.cpp:80
int size(MPI_Comm comm)
Return size of the group (number of processes) associated with the communicator.
Definition MPI.cpp:72
int rank(MPI_Comm comm)
Return process rank for the communicator.
Definition MPI.cpp:64
constexpr std::array< std::int64_t, 2 > local_range(int rank, std::int64_t N, int size)
Return local range for the calling process, partitioning the global [0, N - 1] range across all ranks...
Definition MPI.h:91
constexpr MPI_Datatype mpi_type()
MPI Type.
Definition MPI.h:276
tag
MPI communication tags.
Definition MPI.h:35
Definition MPI.h:271