File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 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 {
133133 receives in the dtype component its gf_descriptor_t argument for character(kind=c_char)
134134 and logical(kind=c_bool) data:
135135*/
136- #define GFC_DTYPE_CHARACTER 944
136+ #define GFC_DTYPE_CHARACTER 48
137137
138138#if 0
139- #define GFC_DTYPE_LOGICAL_4 8
140139#define GFC_DTYPE_CHARACTER ((BT_CHARACTER << GFC_DTYPE_TYPE_SHIFT) \
141140 | (sizeof(char) << GFC_DTYPE_SIZE_SHIFT))
142141#endif
Original file line number Diff line number Diff line change @@ -1839,9 +1839,13 @@ get_MPI_datatype (gfc_descriptor_t *desc)
18391839 return MPI_COMPLEX ;
18401840 case GFC_DTYPE_COMPLEX_8 :
18411841 return MPI_DOUBLE_COMPLEX ;
1842- case GFC_DTYPE_CHARACTER :
1843- return MPI_CHARACTER ;
18441842 }
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+
18451849 caf_runtime_error ("Unsupported data type in collective: %ld\n" ,GFC_DTYPE_TYPE_SIZE (desc ));
18461850 return 0 ;
18471851}
You can’t perform that action at this time.
0 commit comments