Skip to content

Commit c2fd0ac

Browse files
committed
Disable MATCHBOX with SERIAL_MPI and add error message
1 parent 5387e20 commit c2fd0ac

14 files changed

+73
-6
lines changed

amgprec/impl/aggregator/MatchBoxPC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include <stdlib.h>
4343
#if !defined(SERIAL_MPI)
4444
#include <mpi.h>
45-
#endif
4645

4746
#include "MatchBoxPC.h"
4847
#ifdef __cplusplus
@@ -127,3 +126,4 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
127126
#ifdef __cplusplus
128127
}
129128
#endif
129+
#endif

amgprec/impl/aggregator/MatchBoxPC.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ const int BundleTag = 9; // Predefined tag
7878

7979
static vector<MilanLongInt> DEFAULT_VECTOR;
8080

81+
#if !defined(SERIAL_MPI)
82+
8183
// MPI type map
8284
template <typename T>
8385
MPI_Datatype TypeMap();
@@ -89,6 +91,7 @@ template <>
8991
inline MPI_Datatype TypeMap<double>() { return MPI_DOUBLE; }
9092
template <>
9193
inline MPI_Datatype TypeMap<float>() { return MPI_FLOAT; }
94+
#endif
9295

9396
#ifdef __cplusplus
9497
extern "C"

amgprec/impl/aggregator/clean.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "MatchBoxPC.h"
22

33
// TODO comment
4+
#if !defined(SERIAL_MPI)
45

56
void clean(MilanLongInt NLVer,
67
MilanInt myRank,
@@ -89,3 +90,4 @@ void clean(MilanLongInt NLVer,
8990
}
9091
}
9192
}
93+
#endif

amgprec/impl/aggregator/computeCandidateMate.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* @param edgeLocWeight
1010
* @return
1111
*/
12+
#if !defined(SERIAL_MPI)
13+
1214
MilanLongInt firstComputeCandidateMate(MilanLongInt adj1,
1315
MilanLongInt adj2,
1416
MilanLongInt *verLocInd,
@@ -71,3 +73,4 @@ MilanLongInt computeCandidateMate(MilanLongInt adj1,
7173

7274
return w;
7375
}
76+
#endif

amgprec/impl/aggregator/parallelComputeCandidateMateB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "MatchBoxPC.h"
2+
#if !defined(SERIAL_MPI)
23

34
void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
45
MilanLongInt *verLocPtr,
@@ -25,3 +26,4 @@ void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
2526
}
2627
}
2728
}
29+
#endif

amgprec/impl/aggregator/processExposedVertex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "MatchBoxPC.h"
2+
#if !defined(SERIAL_MPI)
23

34
void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
45
MilanLongInt *candidateMate,
@@ -193,3 +194,4 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
193194

194195
} // End of parallel region
195196
}
197+
#endif

amgprec/impl/aggregator/processMatchedVertices.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "MatchBoxPC.h"
22

3+
#if !defined(SERIAL_MPI)
34
void processMatchedVertices(
45
MilanLongInt NLVer,
56
vector<MilanLongInt> &UChunkBeingProcessed,
@@ -292,3 +293,4 @@ void processMatchedVertices(
292293
#endif
293294
} // End of parallel region
294295
}
296+
#endif

amgprec/impl/aggregator/processMatchedVerticesAndSendMessages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "MatchBoxPC.h"
22
//#define DEBUG_HANG_
3+
#if !defined(SERIAL_MPI)
34
void processMatchedVerticesAndSendMessages(
45
MilanLongInt NLVer,
56
vector<MilanLongInt> &UChunkBeingProcessed,
@@ -306,3 +307,4 @@ void processMatchedVerticesAndSendMessages(
306307
cout << myRank<<" Done sending messages"<<endl;
307308
#endif
308309
}
310+
#endif

amgprec/impl/aggregator/processMessages.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "MatchBoxPC.h"
22
//#define DEBUG_HANG_
3+
#if !defined(SERIAL_MPI)
34

45
void processMessages(
56
MilanLongInt NLVer,
@@ -313,3 +314,4 @@ void processMessages(
313314

314315
return;
315316
}
317+
#endif

amgprec/impl/aggregator/sendBundledMessages.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "MatchBoxPC.h"
2-
2+
#if !defined(SERIAL_MPI)
33
void sendBundledMessages(MilanLongInt *numGhostEdges,
44
MilanInt *BufferSize,
55
MilanLongInt *Buffer,
@@ -207,3 +207,4 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
207207
}
208208
}
209209
}
210+
#endif

0 commit comments

Comments
 (0)