Commit 71602b75 authored by incardon's avatar incardon

AMR_struct fixed overflow error message

parent d40efa4b
...@@ -180,7 +180,7 @@ class grid_dist_amr<dim,St,T,AMR_IMPL_TRIVIAL,Decomposition,Memory,device_grid> ...@@ -180,7 +180,7 @@ class grid_dist_amr<dim,St,T,AMR_IMPL_TRIVIAL,Decomposition,Memory,device_grid>
if (bc.bc[j] == NON_PERIODIC) if (bc.bc[j] == NON_PERIODIC)
{g_sz_lvl[j] = (g_sz_lvl[j]-1)*2 + 1;} {g_sz_lvl[j] = (g_sz_lvl[j]-1)*2 + 1;}
else else
{g_sz_lvl[j] = (g_sz_lvl[j]-1)*2;} {g_sz_lvl[j] = g_sz_lvl[j]*2;}
} }
gd_array.add(grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>(gd_array.get(0).getDecomposition(),g_sz_lvl,g_int)); gd_array.add(grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>(gd_array.get(0).getDecomposition(),g_sz_lvl,g_int));
......
...@@ -370,9 +370,18 @@ class grid_dist_id_comm ...@@ -370,9 +370,18 @@ class grid_dist_id_comm
{ {
// It is not possible to calculate the total information so we have to receive // It is not possible to calculate the total information so we have to receive
v_cl.sendrecvMultipleMessagesNBX(send_prc_queue.size(),&send_size.get(0), if (send_prc_queue.size() == 0)
{
v_cl.sendrecvMultipleMessagesNBX(send_prc_queue.size(),NULL,
NULL,NULL,
receive_dynamic,this);
}
else
{
v_cl.sendrecvMultipleMessagesNBX(send_prc_queue.size(),&send_size.get(0),
&send_prc_queue.get(0),&send_pointer.get(0), &send_prc_queue.get(0),&send_pointer.get(0),
receive_dynamic,this); receive_dynamic,this);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment