File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,9 @@ typedef struct gfc_descriptor_t {
133
133
receives in the dtype component its gf_descriptor_t argument for character(kind=c_char)
134
134
and logical(kind=c_bool) data:
135
135
*/
136
- #define GFC_DTYPE_CHARACTER 944
136
+ #define GFC_DTYPE_CHARACTER 48
137
137
138
138
#if 0
139
- #define GFC_DTYPE_LOGICAL_4 8
140
139
#define GFC_DTYPE_CHARACTER ((BT_CHARACTER << GFC_DTYPE_TYPE_SHIFT) \
141
140
| (sizeof(char) << GFC_DTYPE_SIZE_SHIFT))
142
141
#endif
Original file line number Diff line number Diff line change @@ -1839,9 +1839,13 @@ get_MPI_datatype (gfc_descriptor_t *desc)
1839
1839
return MPI_COMPLEX ;
1840
1840
case GFC_DTYPE_COMPLEX_8 :
1841
1841
return MPI_DOUBLE_COMPLEX ;
1842
- case GFC_DTYPE_CHARACTER :
1843
- return MPI_CHARACTER ;
1844
1842
}
1843
+ /* gfortran passes character string arguments with a
1844
+ GFC_DTYPE_TYPE_SIZE == GFC_TYPE_CHARACTER + 64*strlen
1845
+ */
1846
+ if ( (GFC_DTYPE_TYPE_SIZE (desc )- GFC_DTYPE_CHARACTER )%64 == 0 )
1847
+ return MPI_CHARACTER ;
1848
+
1845
1849
caf_runtime_error ("Unsupported data type in collective: %ld\n" ,GFC_DTYPE_TYPE_SIZE (desc ));
1846
1850
return 0 ;
1847
1851
}
You can’t perform that action at this time.
0 commit comments