3#define TIMPI_UNIT_ASSERT(expr) \
37 for (
int p=0;
p<
N; ++
p)
44 for (
int p=0;
p<
N; ++
p)
50 template <
class Gettable>
75 for (
int p=0;
p<
N; ++
p)
82 for (
int p=0;
p<
N; ++
p)
90 std::vector<processor_id_type>
vals;
102 std::vector<std::string>
vals;
114 std::vector<processor_id_type>
vals;
124 std::vector<std::string>
vals;
145 std::vector<std::string>
vals;
159 std::vector<int>
vals;
162 std::vector<std::vector<int>>
allvals;
175 std::vector<std::vector<double>>
allvals;
196 int r =
i > 0 ? (
i+1) :
i;
205 std::vector<std::string>
vals;
208 std::vector<std::vector<std::string>>
allvals;
221 std::vector<std::string>
vals;
231 std::vector<std::string>
vals;
234 vals.push_back(
"Proc 0 only");
243 template <
class Container>
254 for (std::size_t
i=0;
i<
src.size();
i++)
260 std::string
src =
"hello";
270 for (std::size_t
i=0;
i<
src.size();
i++)
281 aa x{{ {0,1,2},{3,4,5} }};
308 for (std::size_t
i=0;
i<
src.size();
i++)
309 for (std::size_t
j=0;
j<2;
j++)
310 for (std::size_t
k=0;
k<3;
k++)
318 std::vector<pppp>
src(3),
dest(3);
320 src[0].first.first.first.first=0;
321 src[0].first.first.first.second=-1;
322 src[0].first.second = -2;
324 src[1].first.first.first.first=10;
325 src[1].first.first.first.second=9;
326 src[1].first.second = 8;
328 src[2].first.first.first.first=20;
329 src[2].first.first.first.second=19;
330 src[2].first.second = 18;
338 for (std::size_t
i=0;
i<
src.size();
i++)
341 dest[
i].first.first.first.first);
343 dest[
i].first.first.first.second);
345 dest[
i].first.first.second);
347 dest[
i].first.second);
359 std::vector<processor_id_type>
src;
376 std::vector<unsigned int>
src;
377 std::vector<unsigned int>
dest;
383 for (std::size_t
i=0;
i<
src.size();
i++)
395 std::vector<unsigned int>
src;
396 std::vector<unsigned int>
dest;
405 for (std::size_t
i=0;
i<
src.size();
i++)
420 std::vector<std::vector<unsigned int>>
src;
421 std::vector<unsigned int>
dest;
427 for (std::size_t
i=0;
i<
src.size(); ++
i)
431 for (std::size_t
i=0;
i<
src.size();
i++)
432 for (std::size_t
j=0;
j<
src[
i].size();
j++)
455 unsigned int min = std::numeric_limits<unsigned int>::max();
462 while(!
req.test()) {}
480 "More than 64 bytes to avoid false positives with Small String Optimization libraries";
502 constexpr std::size_t
N=5;
504 min_vals(
N, std::numeric_limits<unsigned int>::max());
509 std::vector<Request>
reqs;
510 for (std::size_t
i=0;
i !=
N; ++
i)
525 std::size_t
i = std::size_t(-1);
528 while (
i != std::size_t(-1))
561 unsigned int min = std::numeric_limits<unsigned int>::max();
590 constexpr std::size_t
vec_size = 2345;
615 unsigned long min = 1;
617 min = std::numeric_limits<unsigned long>::max();
627 template <
typename T>
633 min = std::numeric_limits<T>::max();
677 constexpr std::size_t
vec_size = 2345;
714 for (
int p=0;
p<
N; ++
p)
729 data[std::string(
"key") + std::to_string(rank)] = rank;
735 for (
int p=0;
p<
N; ++
p)
744 unsigned int minid = 0;
757 unsigned int maxid = 0;
771 unsigned int minid = 0;
784 unsigned int minid = 0;
797 unsigned int maxid = 0;
810 unsigned int maxid = 0;
825 unsigned int minid = 0;
827 std::pair<int, int>
p{min,
min_tag};
842 unsigned int maxid = 0;
844 std::pair<int, int>
p{max,
max_tag};
859 double min = std::numeric_limits<double>::infinity();
865 min = -std::numeric_limits<double>::infinity();
876 double max = std::numeric_limits<double>::infinity();
882 max = -std::numeric_limits<double>::infinity();
1037 for (std::set<unsigned int>::const_iterator
1075 for (std::size_t
i = 0;
i != 3; ++
i)
1118 for (std::size_t
i = 0;
i != 3; ++
i)
1133 double inf = std::numeric_limits<double>::infinity();
1139 inf = -std::numeric_limits<double>::infinity();
1147 const std::string
s =
"Violin";
1157 const std::vector<int>
v = {1, 2, 3};
1165 template<
typename T>
1180 unsigned int color = rank % 2;
1195#ifdef TIMPI_HAVE_MPI
1205 template <
typename NonBuiltin>
Encapsulates the MPI_Comm object.
void max(const T &r, T &o, Request &req) const
Non-blocking maximum of the local value r into o with the request req.
processor_id_type size() const
void maxloc(T &r, unsigned int &max_id) const
Take a local variable and replace it with the maximum of it's values on all processors,...
void split(int color, int key, Communicator &target) const
processor_id_type rank() const
void barrier() const
Pause execution until all processors reach a certain point.
Status receive(const unsigned int dest_processor_id, T &buf, const MessageTag &tag=any_tag) const
Blocking-receive from one processor with data-defined type.
timpi_pure bool semiverify(const T *r) const
Check whether a local pointer points to the same value on all processors where it is not null,...
void min(const T &r, T &o, Request &req) const
Non-blocking minimum of the local value r into o with the request req.
void send_mode(const SendMode sm)
Explicitly sets the SendMode type used for send operations.
void minloc(T &r, unsigned int &min_id) const
Take a local variable and replace it with the minimum of it's values on all processors,...
void sum(T &r) const
Take a local variable and replace it with the sum of it's values on all processors.
void scatter(const std::vector< T, A > &data, T &recv, const unsigned int root_id=0) const
Take a vector of local variables and scatter the ith item to the ith processor in the communicator.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
Take a local value and broadcast it to all processors.
void gather(const unsigned int root_id, const T &send_data, std::vector< T, A > &recv) const
Take a vector of length comm.size(), and on processor root_id fill in recv[processor_id] = the value ...
void split_by_type(int split_type, int key, info i, Communicator &target) const
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
Take a vector of length this->size(), and fill in recv[processor_id] = the value of send on that proc...
void send(const unsigned int dest_processor_id, const T &buf, const MessageTag &tag=no_tag) const
Blocking-send to one processor with data-defined type.
Encapsulates the MPI_Request.
static const request null_request
Templated class to provide the appropriate MPI datatype for use with built-in C types or simple C++ c...
The TIMPIInit class, when constructed, initializes any dependent libraries (e.g.
MPI_Info info
Info object used by some MPI-3 methods.
Status wait(Request &r)
Wait for a non-blocking send or receive to finish.
MPI_Request request
Request object for non-blocking I/O.
uint8_t processor_id_type
const unsigned int any_source
Processor id meaning "Accept from any source".
Tnew cast_int(Told oldvar)
std::size_t waitany(std::vector< Request > &r)
Wait for at least one non-blocking operation to finish.
void testAllGatherString()
void testStandardTypeAssignment()
void testAllGatherVectorVector()
void testNonblockingMax()
void testAllGatherVectorString()
void testBroadcastArrayType()
void testNonFixedTypeSum()
Communicator * TestCommWorld
void testNonblockingMin()
void testAllGatherHalfEmptyVectorString()
void testNonblockingSum()
void testSemiVerifyType()
void testNonblockingString()
void testRecvIsendVecVecs()
void testNonFixedTypeMapMax()
void testSendRecvVecVecs()
std::vector< std::string > pt_number
void testAllGatherVectorVectorPacked()
void testSemiVerifyString()
void testNonblockingTest()
void testBroadcastString()
void testBroadcastNestedType()
void testAllGatherEmptyVectorString()
void testSemiVerifyVector()
void testBroadcast(Container &&src)
void testAllGatherVectorVectorInPlace()
void testNonblockingWaitany()