|
@@ -44,15 +44,13 @@ void starpu_my_interface_compare_codelet_cpu(void *descr[], void *_args)
|
|
|
*compare = (d0 == d1 && c0 == c1);
|
|
|
}
|
|
|
|
|
|
-static struct starpu_my_interface *myinterface = NULL;
|
|
|
-
|
|
|
void _starpu_my_interface_datatype_allocate(MPI_Datatype *mpi_datatype)
|
|
|
{
|
|
|
int ret;
|
|
|
-
|
|
|
int blocklengths[2] = {1, 1};
|
|
|
MPI_Aint displacements[2];
|
|
|
MPI_Datatype types[2] = {MPI_INT, MPI_CHAR};
|
|
|
+ struct starpu_my_interface *myinterface = NULL;
|
|
|
myinterface = malloc(sizeof(struct starpu_my_interface));
|
|
|
|
|
|
MPI_Address(myinterface, displacements);
|
|
@@ -65,6 +63,8 @@ void _starpu_my_interface_datatype_allocate(MPI_Datatype *mpi_datatype)
|
|
|
|
|
|
ret = MPI_Type_commit(mpi_datatype);
|
|
|
STARPU_ASSERT_MSG(ret == MPI_SUCCESS, "MPI_Type_commit failed");
|
|
|
+
|
|
|
+ free(myinterface);
|
|
|
}
|
|
|
|
|
|
void starpu_my_interface_datatype_allocate(starpu_data_handle_t handle, MPI_Datatype *mpi_datatype)
|
|
@@ -76,7 +76,6 @@ void starpu_my_interface_datatype_allocate(starpu_data_handle_t handle, MPI_Data
|
|
|
void starpu_my_interface_datatype_free(MPI_Datatype *mpi_datatype)
|
|
|
{
|
|
|
MPI_Type_free(mpi_datatype);
|
|
|
- free(myinterface);
|
|
|
}
|
|
|
|
|
|
int starpu_my_interface_get_int(starpu_data_handle_t handle)
|