47 #ifndef ZOLTAN2_DIRECTORY_COMM_H_
48 #define ZOLTAN2_DIRECTORY_COMM_H_
50 #include <Teuchos_CommHelpers.hpp>
53 #include <Teuchos_ArrayRCP.hpp>
67 void print(
const std::string& headerMessage)
const;
114 Teuchos::RCP<const Teuchos::Comm<int> >
comm;
134 const Teuchos::ArrayRCP<int> &assign,
135 Teuchos::RCP<
const Teuchos::Comm<int> > comm,
142 const Teuchos::ArrayRCP<char> &send_data,
144 Teuchos::ArrayRCP<char> &recv_data);
148 const Teuchos::ArrayRCP<char> &send_data,
150 const Teuchos::ArrayRCP<int> &sizes,
151 Teuchos::ArrayRCP<char> &recv_data);
159 int resize(
const Teuchos::ArrayRCP<int> &sizes,
int tag,
160 int *sum_recv_sizes);
164 const Teuchos::ArrayRCP<int> &sizes,
int tag,
int *sum_recv_sizes);
167 const Teuchos::ArrayRCP<char> &send_data,
169 Teuchos::ArrayRCP<char> &recv_data);
172 const Teuchos::ArrayRCP<char> &send_data,
174 Teuchos::ArrayRCP<char> &recv_data);
177 const Teuchos::ArrayRCP<char> &send_data,
179 Teuchos::ArrayRCP<char> &recv_data);
181 int sort_ints(Teuchos::ArrayRCP<int> &vals_sort, Teuchos::ArrayRCP<int> &vals_other);
183 int invert_map(
const Teuchos::ArrayRCP<int> &lengths_to,
184 const Teuchos::ArrayRCP<int> &procs_to,
int nsends,
int self_msg,
185 Teuchos::ArrayRCP<int> &lengths_from, Teuchos::ArrayRCP<int> &procs_from,
186 int *pnrecvs,
int my_proc,
int nprocs,
int out_of_mem,
int tag,
187 Teuchos::RCP<
const Teuchos::Comm<int> > comm);
189 int exchange_sizes(
const Teuchos::ArrayRCP<int> &sizes_to,
190 const Teuchos::ArrayRCP<int> &procs_to,
int nsends,
191 int self_msg, Teuchos::ArrayRCP<int> &sizes_from,
192 const Teuchos::ArrayRCP<int> &procs_from,
193 int nrecvs,
int *total_recv_size,
int my_proc,
int tag,
194 Teuchos::RCP<
const Teuchos::Comm<int> > comm);
198 int create_reverse_plan(
int tag,
const Teuchos::ArrayRCP<int> &sizes);
200 MPI_Comm getRawComm() {
202 return Teuchos::getRawMpiComm(*comm_);
204 return MPI_COMM_WORLD;
208 Teuchos::RCP<const Teuchos::Comm<int> > comm_;
209 Zoltan2_Directory_Plan * plan_forward;
218 #ifndef MPI_RECV_LIMIT
227 #define MPI_RECV_LIMIT 0
~Zoltan2_Directory_Plan()
Teuchos::ArrayRCP< int > procs_from
Teuchos::ArrayRCP< int > indices_to
Teuchos::ArrayRCP< int > lengths_to
Teuchos::ArrayRCP< char > recv_buff
Teuchos::ArrayRCP< int > indices_from_ptr
Teuchos::ArrayRCP< int > starts_from
void print(const std::string &headerMessage) const
Teuchos::ArrayRCP< int > procs_to
int do_reverse(int tag, const Teuchos::ArrayRCP< char > &send_data, int nbytes, const Teuchos::ArrayRCP< int > &sizes, Teuchos::ArrayRCP< char > &recv_data)
Teuchos::ArrayRCP< char > getRecvBuff() const
std::vector< MPI_Request > request
~Zoltan2_Directory_Comm()
Teuchos::ArrayRCP< int > starts_to
int get_plan_forward_recv_size() const
Teuchos::ArrayRCP< int > indices_to_ptr
Teuchos::ArrayRCP< int > indices_from
Teuchos::ArrayRCP< int > starts_from_ptr
Teuchos::ArrayRCP< int > sizes_from
std::vector< MPI_Status > status
Teuchos::ArrayRCP< int > sizes_to
int do_forward(int tag, const Teuchos::ArrayRCP< char > &send_data, int nbytes, Teuchos::ArrayRCP< char > &recv_data)
int resize(const Teuchos::ArrayRCP< int > &sizes, int tag, int *sum_recv_sizes)
Teuchos::ArrayRCP< int > lengths_from
Teuchos::ArrayRCP< int > sizes
Zoltan2_Directory_Plan * plan_reverse
Teuchos::RCP< const Teuchos::Comm< int > > comm
Zoltan2_Directory_Comm(int nvals, const Teuchos::ArrayRCP< int > &assign, Teuchos::RCP< const Teuchos::Comm< int > > comm, int tag)
Teuchos::ArrayRCP< int > starts_to_ptr
void getInvertedValues(Zoltan2_Directory_Plan *from)