Skip to content
Snippets Groups Projects
Commit 2481aada authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed MPI problem with mesh structure codes on 32 bit systems.

parent e1ac36f7
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ namespace AMDiS {
MPI_Datatype StdMpiHelper<vector<std::set<int> > >::mpiDataType = MPI_INT;
MPI_Datatype StdMpiHelper<vector<double> >::mpiDataType = MPI_DOUBLE;
MPI_Datatype StdMpiHelper<vector<vector<double> > >::mpiDataType = MPI_DOUBLE;
MPI_Datatype StdMpiHelper<vector<MeshStructure> >::mpiDataType = MPI_UNSIGNED_LONG;
MPI_Datatype StdMpiHelper<vector<MeshStructure> >::mpiDataType = MPI_UNSIGNED_LONG_LONG;
MPI_Datatype StdMpiHelper<vector<AtomicBoundary> >::mpiDataType = MPI_INT;
MPI_Datatype StdMpiHelper<map<BoundaryType, map<DegreeOfFreedom, DegreeOfFreedom> > >::mpiDataType = MPI_INT;
MPI_Datatype StdMpiHelper<vector<std::pair<int, int> > >::mpiDataType = MPI_INT;
......@@ -123,7 +123,7 @@ namespace AMDiS {
void StdMpiHelper<vector<std::set<int> > >::makeFromBuffer(vector<std::set<int> > &data, int *buf, int bufSize)
{
FUNCNAME("StdMpiHelper<vector<set<int>>>::makeFromBuffer()");
FUNCNAME("StdMpiHelper<vector<set<int> > >::makeFromBuffer()");
int counter = 1;
data.resize(buf[0]);
......@@ -207,6 +207,8 @@ namespace AMDiS {
int StdMpiHelper<vector<MeshStructure> >::getBufferSize(vector<MeshStructure> &data)
{
FUNCNAME("StdMpiHelper<vector<MeshStructure> >::getBufferSize()");
int size = 0;
for (unsigned int i = 0; i < data.size(); i++)
size += data[i].getCode().size() + 2;
......@@ -216,6 +218,8 @@ namespace AMDiS {
void StdMpiHelper<vector<MeshStructure> >::createBuffer(vector<MeshStructure> &data, uint64_t *buf)
{
FUNCNAME("StdMpiHelper<vector<MeshStructure> >::createBuffer()");
int pos = 0;
for (unsigned int i = 0; i < data.size(); i++) {
buf[pos++] = data[i].getCode().size();
......@@ -227,11 +231,13 @@ namespace AMDiS {
}
void StdMpiHelper<vector<MeshStructure> >::makeFromBuffer(vector<MeshStructure> &data,
uint64_t *buf, int bufSize)
uint64_t *buf, int bufSize)
{
FUNCNAME("StdMpiHelper<vector<MeshStructure> >::makeFromBuffer()");
int pos = 0;
while (pos < bufSize) {
while (pos < bufSize) {
int codeSize = buf[pos++];
int nElements = buf[pos++];
vector<uint64_t> code;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment