Skip to content
Snippets Groups Projects
Commit c232686d authored by Marco Agnese's avatar Marco Agnese Committed by Christoph Grüninger
Browse files

use MPI_Type_create_struct instead of MPI_Type_struct with MPI>=2

parent 2125b283
No related branches found
No related tags found
No related merge requests found
......@@ -657,7 +657,11 @@ namespace Dune
displacement[0] -= base;
displacement[1] -= base;
#if MPI_2
MPI_Type_create_struct( 2, blocklength, displacement, type, &datatype_);
#else
MPI_Type_struct( 2, blocklength, displacement, type, &datatype_);
#endif
MPI_Type_commit(&datatype_);
}
......
......@@ -305,7 +305,11 @@ namespace Dune
#endif
for(int i=2; i >= 0; --i)
disp[i] -= disp[0];
#if MPI_2
MPI_Type_create_struct(3, length, disp, types, &type);
#else
MPI_Type_struct(3, length, disp, types, &type);
#endif
MPI_Type_commit(&type);
}
return type;
......
......@@ -904,7 +904,11 @@ namespace Dune {
#endif
for(int i=3; i >= 0; --i)
disp[i] -= disp[0];
#if MPI_2
MPI_Type_create_struct(4, length, disp, types, &type);
#else
MPI_Type_struct(4, length, disp, types, &type);
#endif
MPI_Type_commit(&type);
}
return type;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment