Skip to content

Commit f7ff108

Browse files
committed
compiler: don't over allocate mpi msg with vector type
1 parent b4f6a26 commit f7ff108

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

devito/tools/dtypes_lowering.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ def dtype_len(dtype):
218218
"""
219219
try:
220220
# Vector types
221-
return len(dtype)
221+
dlen = len(dtype)
222+
if 'padding0' in dtype.fields:
223+
dlen -= 1
224+
return dlen
222225
except TypeError:
223226
return 1
224227

0 commit comments

Comments
 (0)