Commit e7f16b81 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

[bug] adds debug messages

parent 91b64e4a
Pipeline #101499 passed with stages
in 25 minutes
......@@ -95,7 +95,7 @@ class ADNS(TurTLE.DNS):
self.parameters['tracers0_enable_p2p'] = int(0)
self.parameters['tracers0_enable_inner'] = int(0)
self.parameters['tracers0_enable_vorticity_omega'] = int(0)
self.parameters['tracers0_cutoff'] = float(0.314)
self.parameters['tracers0_cutoff'] = float(0.920272)
self.parameters['tracers0_inner_v0'] = float(1)
self.parameters['tracers0_lambda'] = float(1)
......
......@@ -138,7 +138,8 @@ protected:
static int foundGridFactor(const real_number in_cutoff_radius, const std::array<real_number,3>& in_spatial_box_width){
int idx_factor = 1;
while(in_cutoff_radius <= in_spatial_box_width[IDXC_Z]/real_number(idx_factor+1)){
DEBUG_MSG("in_cutoff_radius is %g, in_spatial_box_width[IDXC_Z] = %g\n", in_cutoff_radius, in_spatial_box_width[IDXC_Z]);
while(in_cutoff_radius <= in_spatial_box_width[IDXC_Z]/(long double)(idx_factor+1)){
idx_factor += 1;
}
return idx_factor;
......@@ -227,11 +228,11 @@ public:
}
long int last_cell_level_proc(const int dest_proc) const{
const real_number field_section_width_z = spatial_box_width[IDXC_Z]/real_number(field_grid_dim[IDXC_Z]);
const long int limite = static_cast<long int>((field_section_width_z*real_number(partition_interval_offset_per_proc[dest_proc+1])
- std::numeric_limits<real_number>::epsilon())/cutoff_radius);
if(static_cast<real_number>(limite)*cutoff_radius
== field_section_width_z*real_number(partition_interval_offset_per_proc[dest_proc+1])){
const long double field_section_width_z = spatial_box_width[IDXC_Z]/(long double)(field_grid_dim[IDXC_Z]);
const long int limite = static_cast<long int>((field_section_width_z*(long double)(partition_interval_offset_per_proc[dest_proc+1])
- std::numeric_limits<long double>::epsilon())/cutoff_radius);
if(static_cast<long double>(limite)*cutoff_radius
== field_section_width_z*(long double)(partition_interval_offset_per_proc[dest_proc+1])){
return limite-1;
}
return limite;
......@@ -426,12 +427,25 @@ public:
assert(mpiRequests.size() == 0);
neigDescriptors.clear();
DEBUG_MSG("my_top_z_cell_level = %d\n", int(my_top_z_cell_level));
DEBUG_MSG("my_down_z_cell_level = %d\n", int(my_down_z_cell_level));
DEBUG_MSG("first_cell_level_proc(0) = %d\n", int(first_cell_level_proc(0)));
DEBUG_MSG("first_cell_level_proc(1) = %d\n", int(first_cell_level_proc(1)));
DEBUG_MSG("first_cell_level_proc(2) = %d\n", int(first_cell_level_proc(2)));
DEBUG_MSG("first_cell_level_proc(3) = %d\n", int(first_cell_level_proc(3)));
DEBUG_MSG("nb_cell_levels[IDXC_Z] = %d\n", int(nb_cell_levels[IDXC_Z]));
DEBUG_MSG("last_cell_level_proc(0) = %d\n", int(last_cell_level_proc(0)));
DEBUG_MSG("last_cell_level_proc(1) = %d\n", int(last_cell_level_proc(1)));
DEBUG_MSG("last_cell_level_proc(2) = %d\n", int(last_cell_level_proc(2)));
DEBUG_MSG("last_cell_level_proc(3) = %d\n", int(last_cell_level_proc(3)));
// Find process with at least one neighbor
{
int dest_proc = (my_rank+1)%nb_processes_involved;
while(dest_proc != my_rank
&& (my_top_z_cell_level == first_cell_level_proc(dest_proc)
|| (my_top_z_cell_level+1)%nb_cell_levels[IDXC_Z] == first_cell_level_proc(dest_proc))){
DEBUG_MSG("looking at dest_proc = %d\n", dest_proc);
// Find if we have to send 1 or 2 cell levels
int nb_levels_to_send = 1;
if(my_nb_cell_levels > 1 // I have more than one level
......@@ -455,6 +469,7 @@ public:
while(src_proc != my_rank
&& (last_cell_level_proc(src_proc) == my_down_z_cell_level
|| (last_cell_level_proc(src_proc)+1)%nb_cell_levels[IDXC_Z] == my_down_z_cell_level)){
DEBUG_MSG("looking at src_proc = %d\n", src_proc);
// Find if we have to send 1 or 2 cell levels
int nb_levels_to_recv = 1;
if(my_nb_cell_levels > 1 // I have more than one level
......@@ -475,6 +490,8 @@ public:
}
}
DEBUG_MSG_WAIT(current_com, "hello, found processes with neighbours.\n");
//////////////////////////////////////////////////////////////////////
/// Exchange the number of particles in each partition
/// Could involve only here but I do not think it will be a problem
......
Supports Markdown
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