|
ScaLAPACK
2.0.2
ScaLAPACK: Scalable Linear Algebra PACKage
|
00001 #include "Bdef.h" 00002 MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, int m, int n, int lda, 00003 MPI_Datatype Dtype, int *N) 00004 { 00005 int info; 00006 MPI_Datatype GeType; 00007 00008 /* 00009 * Some versions of mpich and its derivitives cannot handle 0 byte typedefs, 00010 * so we set type MPI_BYTE as a flag for a 0 byte message 00011 */ 00012 #ifdef ZeroByteTypeBug 00013 if ( (m < 1) || (n < 1) ) 00014 { 00015 *N = 0; 00016 return (MPI_BYTE); 00017 } 00018 #endif 00019 *N = 1; 00020 info=MPI_Type_vector(n, m, lda, Dtype, &GeType); 00021 info=MPI_Type_commit(&GeType); 00022 00023 return(GeType); 00024 }