Commit fc742161 authored by Marco Agnese's avatar Marco Agnese Committed by Steffen Müthing

use MPI_Type_create_struct instead of MPI_Type_struct with MPI>=2

(cherry picked from commit c232686d)
Signed-off-by: Steffen Müthing's avatarSteffen Müthing <muething@dune-project.org>
parent 2be21a13
......@@ -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;
......
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