preCICE v3.1.1
Loading...
Searching...
No Matches
MPIPortsCommunicationTest.cpp
Go to the documentation of this file.
1#ifndef PRECICE_NO_MPI
2
6#include "math/constants.hpp"
8#include "testing/Testing.hpp"
9
10using namespace precice;
11using namespace precice::com;
12
13BOOST_AUTO_TEST_SUITE(CommunicationTests)
14
16
18
19BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
20{
21 PRECICE_TEST(2_ranks, Require::Events);
23 TestSendAndReceivePrimitiveTypes<MPIPortsCommunication>(context);
24}
25
26BOOST_AUTO_TEST_CASE(SendReceiveRanges)
27{
28 PRECICE_TEST(2_ranks, Require::Events);
30 TestSendAndReceiveRanges<MPIPortsCommunication>(context);
31}
32
33BOOST_AUTO_TEST_CASE(SendReceiveEigen)
34{
35 PRECICE_TEST(2_ranks, Require::Events);
37 TestSendAndReceiveEigen<MPIPortsCommunication>(context);
38}
39
40BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
41{
42 PRECICE_TEST(2_ranks, Require::Events);
44 TestBroadcastPrimitiveTypes<MPIPortsCommunication>(context);
45}
46
47BOOST_AUTO_TEST_CASE(BroadcastVectors)
48{
49 PRECICE_TEST(2_ranks, Require::Events);
51 TestBroadcastVectors<MPIPortsCommunication>(context);
52}
53
54BOOST_AUTO_TEST_CASE(ReducePrimitives)
55{
56 PRECICE_TEST(2_ranks, Require::Events);
58 TestReducePrimitiveTypes<MPIPortsCommunication>(context);
59}
60
62{
63 PRECICE_TEST(2_ranks, Require::Events);
65 TestReduceVectors<MPIPortsCommunication>(context);
66}
67
69
71
72BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
73{
74 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
76 TestSendAndReceivePrimitiveTypes<MPIPortsCommunication>(context);
77}
78
79BOOST_AUTO_TEST_CASE(SendReceiveRanges)
80{
81 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
83 TestSendAndReceiveRanges<MPIPortsCommunication>(context);
84}
85
86BOOST_AUTO_TEST_CASE(SendReceiveEigen)
87{
88 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
90 TestSendAndReceiveEigen<MPIPortsCommunication>(context);
91}
92
93BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
94{
95 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
97 TestBroadcastPrimitiveTypes<MPIPortsCommunication>(context);
98}
99
100BOOST_AUTO_TEST_CASE(BroadcastVectors)
101{
102 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
104 TestBroadcastVectors<MPIPortsCommunication>(context);
105}
106
107BOOST_AUTO_TEST_CASE(ReducePrimitives)
108{
109 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
111 TestReducePrimitiveTypes<MPIPortsCommunication>(context);
112}
113
114BOOST_AUTO_TEST_CASE(ReduceVectors)
115{
116 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
118 TestReduceVectors<MPIPortsCommunication>(context);
119}
120
121BOOST_AUTO_TEST_CASE(SendReceiveFourProcesses)
122{
123 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
125 TestSendReceiveFourProcesses<MPIPortsCommunication>(context);
126}
127
129
131
132BOOST_AUTO_TEST_CASE(SendReceiveTwo)
133{
134 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
136 TestSendReceiveTwoProcessesServerClient<MPIPortsCommunication>(context);
137}
138
139BOOST_AUTO_TEST_CASE(SendReceiveFour)
140{
141 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
143 TestSendReceiveFourProcessesServerClient<MPIPortsCommunication>(context);
144}
145
146BOOST_AUTO_TEST_CASE(SendReceiveFourV2)
147{
148 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
150 TestSendReceiveFourProcessesServerClientV2<MPIPortsCommunication>(context);
151}
152
154
155BOOST_AUTO_TEST_SUITE_END() // MPIPorts
156BOOST_AUTO_TEST_SUITE_END() // Communication
157
158#endif
BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
Definition Testing.hpp:27
contains the data communication abstraction layer.
Main namespace of the precice library.