From a8886d482307a1b27ed9eb20524f739a8d3e3cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Thu, 8 Feb 2024 14:32:54 +0100 Subject: [PATCH] Fix dtype for send-size (#56) --- src/adios4dolfinx/comm_helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/adios4dolfinx/comm_helpers.py b/src/adios4dolfinx/comm_helpers.py index 19c90a6..3cbc61f 100644 --- a/src/adios4dolfinx/comm_helpers.py +++ b/src/adios4dolfinx/comm_helpers.py @@ -58,7 +58,7 @@ def send_dofmap_and_recv_values( process_pos_indicator = (owners_transposed == dest_ranks) # Compute number of dofs owned by each rank - out_size = np.count_nonzero(process_pos_indicator, axis=0) + out_size = np.count_nonzero(process_pos_indicator, axis=0).astype(np.int32) # Compute send offset based of number of dofs owned by each rank offsets = np.zeros(len(out_size) + 1, dtype=np.intc) @@ -169,7 +169,7 @@ def send_and_recv_cell_perm( process_pos_indicator = (owners_transposed == np.asarray(dest)) # Compute number of cells owned by each rank - out_size = np.count_nonzero(process_pos_indicator, axis=0) + out_size = np.count_nonzero(process_pos_indicator, axis=0).astype(np.int32) # Compute send offset based of number of cells owned by each rank offsets = np.zeros(len(out_size) + 1, dtype=np.intc) @@ -255,7 +255,7 @@ def send_dofs_and_recv_values( process_pos_indicator = (owners_transposed == dest_ranks) # Compute number of dofs owned by each rank - out_size = np.count_nonzero(process_pos_indicator, axis=0) + out_size = np.count_nonzero(process_pos_indicator, axis=0).astype(np.int32) # Compute send offset based of number of dofs owned by each rank dofs_offsets = np.zeros(len(out_size) + 1, dtype=np.intc)