preCICE v3.1.2
Loading...
Searching...
No Matches
MPISinglePortsCommunicationTest.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
15BOOST_AUTO_TEST_SUITE(MPISinglePorts)
16
18
19BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
20{
21 PRECICE_TEST(2_ranks, Require::Events);
23 TestSendAndReceivePrimitiveTypes<MPISinglePortsCommunication>(context);
24}
25
26BOOST_AUTO_TEST_CASE(SendReceiveEigen)
27{
28 PRECICE_TEST(2_ranks, Require::Events);
30 TestSendAndReceiveEigen<MPISinglePortsCommunication>(context);
31}
32
33BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
34{
35 PRECICE_TEST(2_ranks, Require::Events);
37 TestBroadcastPrimitiveTypes<MPISinglePortsCommunication>(context);
38}
39
40BOOST_AUTO_TEST_CASE(BroadcastVectors)
41{
42 PRECICE_TEST(2_ranks, Require::Events);
44 TestBroadcastVectors<MPISinglePortsCommunication>(context);
45}
46
47BOOST_AUTO_TEST_CASE(ReducePrimitives)
48{
49 PRECICE_TEST(2_ranks, Require::Events);
51 TestReducePrimitiveTypes<MPISinglePortsCommunication>(context);
52}
53
55{
56 PRECICE_TEST(2_ranks, Require::Events);
58 TestReduceVectors<MPISinglePortsCommunication>(context);
59}
60
62
64
65BOOST_AUTO_TEST_CASE(SendReceivePrimitives)
66{
67 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
69 TestSendAndReceivePrimitiveTypes<MPISinglePortsCommunication>(context);
70}
71
72BOOST_AUTO_TEST_CASE(SendReceiveRanges)
73{
74 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
76 TestSendAndReceiveRanges<MPISinglePortsCommunication>(context);
77}
78
79BOOST_AUTO_TEST_CASE(SendReceiveEigen)
80{
81 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
83 TestSendAndReceiveEigen<MPISinglePortsCommunication>(context);
84}
85
86BOOST_AUTO_TEST_CASE(BroadcastPrimitives)
87{
88 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
90 TestBroadcastPrimitiveTypes<MPISinglePortsCommunication>(context);
91}
92
93BOOST_AUTO_TEST_CASE(BroadcastEigen)
94{
95 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
97 TestBroadcastEigen<MPISinglePortsCommunication>(context);
98}
99
100BOOST_AUTO_TEST_CASE(ReducePrimitives)
101{
102 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
104 TestReducePrimitiveTypes<MPISinglePortsCommunication>(context);
105}
106
107BOOST_AUTO_TEST_CASE(ReduceVectors)
108{
109 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
111 TestReduceVectors<MPISinglePortsCommunication>(context);
112}
113
114BOOST_AUTO_TEST_CASE(SendReceiveFourProcesses)
115{
116 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
118 TestSendReceiveFourProcesses<MPISinglePortsCommunication>(context);
119}
120
122
124
125BOOST_AUTO_TEST_CASE(SendReceiveTwo)
126{
127 PRECICE_TEST("A"_on(1_rank), "B"_on(1_rank), Require::Events);
129 TestSendReceiveTwoProcessesServerClient<MPISinglePortsCommunication>(context);
130}
131
132BOOST_AUTO_TEST_CASE(SendReceiveFour)
133{
134 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
136 TestSendReceiveFourProcessesServerClient<MPISinglePortsCommunication>(context);
137}
138
139BOOST_AUTO_TEST_CASE(SendReceiveFourV2)
140{
141 PRECICE_TEST("A"_on(2_ranks), "B"_on(2_ranks), Require::Events);
143 TestSendReceiveFourProcessesServerClientV2<MPISinglePortsCommunication>(context);
144}
145
147
148BOOST_AUTO_TEST_SUITE_END() // MPISinglePorts
149BOOST_AUTO_TEST_SUITE_END() // Communication
150
151#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.