Just to be nice set the newtype to MPI_DATATYPE_NULL before returning.
This commit was SVN r3294.
Этот коммит содержится в:
родитель
6ee22604a0
Коммит
ef4705b781
@ -55,7 +55,8 @@ void mpi_type_contiguous_f(MPI_Fint *count, MPI_Fint *oldtype,
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_contiguous(OMPI_FINT_2_INT(*count),
|
||||
c_old, &c_new));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
if (MPI_SUCCESS != *ierr) {
|
||||
c_new = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
@ -78,10 +78,11 @@ void mpi_type_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
|
||||
OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths),
|
||||
c_disp_array, c_old, &c_new));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
||||
free(c_disp_array);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_blocklengths);
|
||||
|
||||
if (MPI_SUCCESS != *ierr) {
|
||||
c_new = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
@ -56,7 +56,10 @@ void mpi_type_hvector_f(MPI_Fint *count, MPI_Fint *blocklength,
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_hvector(OMPI_FINT_2_INT(*count),
|
||||
OMPI_FINT_2_INT(*blocklength),
|
||||
(MPI_Aint) stride,
|
||||
(MPI_Aint)*stride,
|
||||
c_oldtype, &c_newtype));
|
||||
if( MPI_SUCCESS != (*ierr) ) {
|
||||
c_newtype = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_newtype);
|
||||
}
|
||||
|
@ -57,12 +57,13 @@ void mpi_type_indexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
|
||||
OMPI_ARRAY_FINT_2_INT(array_of_blocklengths, *count);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Type_indexed(OMPI_FINT_2_INT(*count),
|
||||
OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths),
|
||||
array_of_displacements, c_old, &c_new));
|
||||
OMPI_ARRAY_NAME_CONVERT(array_of_blocklengths),
|
||||
array_of_displacements, c_old, &c_new));
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_blocklengths);
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
if( MPI_SUCCESS != (*ierr) ) {
|
||||
c_new = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
@ -86,11 +86,11 @@ void mpi_type_struct_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
|
||||
c_type_old_array, &c_new));
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(array_of_blocklengths);
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
||||
free(c_type_old_array);
|
||||
|
||||
if (MPI_SUCCESS != *ierr) {
|
||||
c_new = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,8 @@ void mpi_type_vector_f(MPI_Fint *count, MPI_Fint *blocklength,
|
||||
OMPI_FINT_2_INT(*stride),
|
||||
c_old, &c_new));
|
||||
|
||||
if (MPI_SUCCESS == *ierr) {
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
if (MPI_SUCCESS != *ierr) {
|
||||
c_new = MPI_DATATYPE_NULL;
|
||||
}
|
||||
*newtype = MPI_Type_c2f(c_new);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user