Commit 7fcaaa5e authored by niklas.baumgarten's avatar niklas.baumgarten

added todo

parent c9cda525
Pipeline #121986 failed with stages
in 7 minutes and 58 seconds
......@@ -141,9 +141,6 @@ TEST(TestParallel, TestSplit) {
PPM->SplitCommunicators();
EXPECT_EQ(PPM->Size(1), PPM->Size(0) / 2);
EXPECT_EQ(PPM->Proc(1) + PPM->Color(1) * PPM->Size(1), PPM->Proc(0));
// PPM->PrintInfo(0);
// PPM->PrintInfo(1);
}
TEST(TestParallel, TestDoubleSplit) {
......@@ -152,10 +149,6 @@ TEST(TestParallel, TestDoubleSplit) {
EXPECT_EQ(PPM->Size(2), PPM->Size(0) / 4);
EXPECT_EQ(PPM->Size(2), PPM->Size(1) / 2);
EXPECT_EQ(PPM->Proc(2) + PPM->Color(2) * PPM->Size(2), PPM->Proc(1));
// PPM->PrintInfo(0);
// PPM->PrintInfo(1);
// PPM->PrintInfo(2);
}
TEST(TestParallel, TestIntegerMinSplit) {
......@@ -178,48 +171,13 @@ TEST(TestParallel, TestIntegerMinSplit) {
}
TEST(TestParallel, TestExchangeBuffer) {
ExchangeBuffer exBuffer;
const char *mSendA = "A";
const char *mSendB = "B";
const char *mSendC = "C";
const char *mSendD = "D";
/*
* p = 0: ABC
* p = 1: AB
* p = 2: A
* p = 3: D
*/
int q = 0;
if (PPM->Proc() == q) {
exBuffer.Send(0) << mSendA << mSendB;
exBuffer.Send(1) << mSendA;
exBuffer.Send(2) << mSendA;
exBuffer.Send(1) << mSendB;
exBuffer.Send(0) << mSendC;
exBuffer.Send(3) << mSendD;
}
exBuffer.Communicate();
char *mRecv;
std::string mRecvStr = "";
// for(int p = 0; p < PPM->Size(); p++) {}
int p = 0;
if (PPM->Proc() == p) {
while (exBuffer.Receive(p).size() < exBuffer.ReceiveSize((p))) {
exBuffer.Receive(p) >> mRecv;
mRecvStr += mRecv;
}
}
std::cout << mRecvStr << endl;
}
/*
* Todo
* more tests after splitting
* move test to kernel
* create job / maybe even test pattern
*
*/
int main(int argc, char **argv) {
return MppTest(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment