Commit 6ce135b5 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Removed debugging information throughout the code.

parent 62c81ff8
......@@ -107,8 +107,6 @@ const char *engine_policy_names[] = {"none",
"sourceterms",
"stars"};
int cid_check = -1;
/** The rank of the engine as a global variable (for messages). */
int engine_rank;
......@@ -2419,15 +2417,6 @@ void engine_make_self_gravity_tasks_mapper(void *map_data, int num_elements,
if (!gravity_M2L_accept(multi_i->r_max_rebuild,
multi_j->r_max_rebuild, theta_crit2, r2)) {
/* if(cid == cid_check) */
/* message("Pair-1 for cells [%d %d %d] and [%d %d %d] split=%d
* gcount=%d", */
/* i, j, k, ii, jj, kk, cj->split, cj->gcount); */
/* if(cjd == cid_check) */
/* message("Pair-2 for cells [%d %d %d] and [%d %d %d] split=%d
* gcount=%d", */
/* ii, jj, kk, i, j, k, ci->split, ci->gcount); */
/* Ok, we need to add a direct pair calculation */
scheduler_addtask(sched, task_type_pair, task_subtype_grav, 0, 0,
ci, cj);
......
......@@ -1119,15 +1119,6 @@ void runner_do_kick1(struct runner *r, struct cell *c, int timer) {
dt_kick_therm = (ti_step / 2) * time_base;
}
if (p->id == 1000) {
message("a_grav=[%e %e %e]", p->gpart->a_grav[0], p->gpart->a_grav[1],
p->gpart->a_grav[2]);
message("a_hydr=[%e %e %e]", p->a_hydro[0], p->a_hydro[1],
p->a_hydro[2]);
message("dt_kick_grav=%e dt_kick_hydro=%e", dt_kick_grav,
dt_kick_hydro);
}
/* do the kick */
kick_part(p, xp, dt_kick_hydro, dt_kick_grav, dt_kick_therm, cosmo,
hydro_props, ti_begin, ti_begin + ti_step / 2);
......@@ -1294,15 +1285,6 @@ void runner_do_kick2(struct runner *r, struct cell *c, int timer) {
dt_kick_therm = (ti_step / 2) * time_base;
}
if (p->id == 1000) {
message("a_grav=[%e %e %e]", p->gpart->a_grav[0], p->gpart->a_grav[1],
p->gpart->a_grav[2]);
message("a_hydr=[%e %e %e]", p->a_hydro[0], p->a_hydro[1],
p->a_hydro[2]);
message("dt_kick_grav=%e dt_kick_hydro=%e", dt_kick_grav,
dt_kick_hydro);
}
/* Finish the time-step with a second half-kick */
kick_part(p, xp, dt_kick_hydro, dt_kick_grav, dt_kick_therm, cosmo,
hydro_props, ti_begin + ti_step / 2, ti_begin + ti_step);
......@@ -1469,11 +1451,6 @@ void runner_do_timestep(struct runner *r, struct cell *c, int timer) {
p->time_bin = get_time_bin(ti_new_step);
if (p->gpart != NULL) p->gpart->time_bin = p->time_bin;
if (p->id == 1000) {
message("new time_bin = %d max=%lld time_base=%e", p->time_bin,
max_nr_timesteps, e->time_base);
}
/* Number of updated particles */
updated++;
if (p->gpart != NULL) g_updated++;
......
......@@ -1417,11 +1417,6 @@ static INLINE void runner_do_grav_long_range(struct runner *r, struct cell *ci,
if (ci->ti_old_multipole != e->ti_current)
error("Interacting un-drifted multipole");
// if(ci - s->cells_top != cid_check) return;
for (int i = 0; i < ci->count; ++i)
if (ci->parts[i].id == 1000) printf("\n");
/* Recover the local multipole */
struct gravity_tensors *const multi_i = ci->multipole;
// const double CoM_i[3] = {multi_i->CoM[0], multi_i->CoM[1],
......
......@@ -71,8 +71,6 @@ int space_maxsize = space_maxsize_default;
int last_cell_id;
#endif
extern int cid_check;
/**
* @brief Interval stack necessary for parallel particle sorting.
*/
......@@ -977,21 +975,6 @@ void space_split(struct space *s, struct cell *cells, int nr_cells,
threadpool_map(&s->e->threadpool, space_split_mapper, cells, nr_cells,
sizeof(struct cell), 0, s);
for (int cid = 0; cid < nr_cells; ++cid) {
const struct cell *c = &cells[cid];
for (int i = 0; i < c->gcount; ++i) {
long long id_i = s->parts[-c->gparts[i].id_or_neg_offset].id;
if (id_i == 1000) {
cid_check = cid;
message("cid_check = %d %d", cid_check, cid);
}
}
}
if (verbose)
message("took %.3f %s.", clocks_from_ticks(getticks() - tic),
clocks_getunit());
......
......@@ -143,9 +143,6 @@ __attribute__((always_inline)) INLINE static integertime_t get_part_timestep(
/* Final time-step is minimum of hydro and gravity */
float new_dt = min3(new_dt_hydro, new_dt_cooling, new_dt_grav);
if (p->id == 1000)
message("dt_hydro=%e dt_grav=%e", new_dt_hydro, new_dt_grav);
/* Limit change in smoothing length */
const float dt_h_change =
(p->force.h_dt != 0.0f)
......@@ -160,16 +157,9 @@ __attribute__((always_inline)) INLINE static integertime_t get_part_timestep(
/* Apply cosmology correction (This is 1 if non-cosmological) */
new_dt *= e->cosmology->time_step_factor;
if (p->id == 1000)
message("dt=%e factor=%e", new_dt, e->cosmology->time_step_factor);
/* Limit timestep within the allowed range */
new_dt = min(new_dt, e->dt_max);
if (p->id == 1000)
message("dt=%e max_dt=%e dt_disp=%e", new_dt, e->dt_max,
e->dt_max_RMS_displacement);
if (new_dt < e->dt_min)
error("part (id=%lld) wants a time-step (%e) below dt_min (%e)", p->id,
new_dt, e->dt_min);
......
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