1 // --------------------------------------------------------------------- 2 // 3 // Copyright (C) 2019 - 2020 by the deal.II authors 4 // 5 // This file is part of the deal.II library. 6 // 7 // The deal.II library is free software; you can use it, redistribute 8 // it, and/or modify it under the terms of the GNU Lesser General 9 // Public License as published by the Free Software Foundation; either 10 // version 2.1 of the License, or (at your option) any later version. 11 // The full text of the license can be found in the file LICENSE.md at 12 // the top level directory of deal.II. 13 // 14 // --------------------------------------------------------------------- 15 16 #ifndef dealii_mpi_tags_h 17 #define dealii_mpi_tags_h 18 19 #include <deal.II/base/config.h> 20 21 DEAL_II_NAMESPACE_OPEN 22 23 24 namespace Utilities 25 { 26 namespace MPI 27 { 28 namespace internal 29 { 30 /** 31 * This enum holds all MPI tags used in point to point MPI communications 32 * inside the deal.II library. 33 * 34 * We keep these tags in a central location so that they are unique within 35 * the library. Otherwise, communication that receives packages might pick 36 * up packets from a different algorithm. This is especially true if 37 * MPI_ANY_SOURCE is used. 38 * 39 * The list of MPI functions that use an MPI tag is: 40 * - MPI_Send, MPI_Recv, MPI_Sendrecv 41 * - MPI_Isend, MPI_Irecv 42 * - MPI_Probe, MPI_Iprobe 43 * - MPI_Comm_create_group, MPI_Intercomm_create, 44 * Utilities::MPI::create_group 45 */ 46 namespace Tags 47 { 48 /** 49 * The enum with the tags. 50 */ 51 enum enumeration : std::uint16_t 52 { 53 /// Utilities::MPI::some_to_some() 54 mpi_some_to_some = 300, 55 56 /// Utilities::MPI::compute_point_to_point_communication_pattern() 57 compute_point_to_point_communication_pattern, 58 59 /// GridTools::exchange_cell_data_to_ghosts(): 60 exchange_cell_data_to_ghosts, 61 62 /// Triangulation<dim, spacedim>::communicate_locally_moved_vertices() 63 triangulation_communicate_locally_moved_vertices, 64 65 /// grid_tools.h: exchange_cell_ghosts() 66 exchange_cell_data_request, 67 68 /// grid_tools.h: exchange_cell_ghosts() 69 exchange_cell_data_reply, 70 71 /// mg_transfer_internal.cc: fill_copy_indices() 72 mg_transfer_fill_copy_indices, 73 74 /// SparsityTools::sparsity_tools_distribute_sparsity_pattern() 75 sparsity_tools_distribute_sparsity_pattern, 76 77 /// Dictionary::reinit() 78 dictionary_reinit, 79 80 /// ConsensusAlgorithms::Payload::get_requesters() 81 consensus_algorithm_payload_get_requesters, 82 83 /// FETools::extrapolate() 84 fe_tools_extrapolate, 85 /// FETools::extrapolate(), allocate space for 10 rounds: 86 fe_tools_extrapolate_end = fe_tools_extrapolate + 10, 87 88 /// ConsensusAlgorithms::NBX::process 89 consensus_algorithm_nbx_answer_request, 90 /// ConsensusAlgorithms::NBX::process 91 consensus_algorithm_nbx_process_deliver, 92 93 /// ConsensusAlgorithms::PEX::process 94 consensus_algorithm_pex_answer_request, 95 /// ConsensusAlgorithms::PEX::process 96 consensus_algorithm_pex_process_deliver, 97 98 /// TriangulationDescription::Utilities::create_description_from_triangulation() 99 fully_distributed_create, 100 101 /// TriangulationBase<dim, spacedim>::fill_level_ghost_owners() 102 triangulation_base_fill_level_ghost_owners, 103 104 /// GridTools::compute_local_to_global_vertex_index_map 105 grid_tools_compute_local_to_global_vertex_index_map, 106 /// GridTools::compute_local_to_global_vertex_index_map second tag 107 grid_tools_compute_local_to_global_vertex_index_map2, 108 109 /// ParticleHandler<dim, spacedim>::send_recv_particles 110 particle_handler_send_recv_particles_setup, 111 /// ParticleHandler<dim, spacedim>::send_recv_particles 112 particle_handler_send_recv_particles_send, 113 114 /// ScaLAPACKMatrix<NumberType>::copy_to 115 scalapack_copy_to, 116 /// ScaLAPACKMatrix<NumberType>::copy_to 117 scalapack_copy_to2, 118 /// ScaLAPACKMatrix<NumberType>::copy_from 119 scalapack_copy_from, 120 121 /// ProcessGrid::ProcessGrid 122 process_grid_constructor, 123 124 /// 200 tags for Partitioner::import_from_ghosted_array_start 125 partitioner_import_start, 126 partitioner_import_end = partitioner_import_start + 200, 127 128 /// 200 tags for Partitioner::export_to_ghosted_array_start 129 partitioner_export_start, 130 partitioner_export_end = partitioner_export_start + 200, 131 132 /// NoncontiguousPartitioner::update_values 133 noncontiguous_partitioner_update_ghost_values, 134 135 // Utilities::MPI::compute_union 136 compute_union, 137 138 }; 139 } // namespace Tags 140 } // namespace internal 141 } // namespace MPI 142 } // namespace Utilities 143 144 145 DEAL_II_NAMESPACE_CLOSE 146 147 #endif 148