- err = MPI_Type_match_size( MPI_TYPECLASS_COMPLEX, 2*sizeof(float), &newtype );
- if (err) {
- errs++;
- MTestPrintErrorMsg( "Complex: ", err );
- }
- else {
- MPI_Type_size( newtype, &dsize );
- if (dsize != 2*sizeof(float)) {
- errs++;
- printf( "Unexpected size for complex\n" );
- }
- }
+ err = MPI_Type_match_size(MPI_TYPECLASS_COMPLEX, 2 * sizeof(float), &newtype);
+ if (err) {
+ errs++;
+ MTestPrintErrorMsg("Complex: ", err);
+ }
+ else {
+ MPI_Type_size(newtype, &dsize);
+ if (dsize != 2 * sizeof(float)) {
+ errs++;
+ printf("Unexpected size for complex\n");
+ }
+ }
+ }
+
+ if (MPI_COMPLEX != MPI_DATATYPE_NULL && MPI_DOUBLE_COMPLEX != MPI_DATATYPE_NULL) {
+ err = MPI_Type_match_size(MPI_TYPECLASS_COMPLEX, 2 * sizeof(double), &newtype);
+ if (err) {
+ errs++;
+ MTestPrintErrorMsg("Double complex: ", err);
+ }
+ else {
+ MPI_Type_size(newtype, &dsize);
+ if (dsize != 2 * sizeof(double)) {
+ errs++;
+ printf("Unexpected size for double complex\n");
+ }
+ }