Commit 78b91162 authored by James Willis's avatar James Willis
Browse files

Removed debug statements.

parent 2996b977
......@@ -1227,7 +1227,7 @@ int main(int argc, char *argv[]) {
#else
snprintf(dumpfile, 40, "memuse_report-step%d.dat", 0);
#endif // WITH_MPI
//memuse_log_dump(dumpfile);
memuse_log_dump(dumpfile);
}
#endif
......@@ -1304,7 +1304,7 @@ int main(int argc, char *argv[]) {
#else
snprintf(dumpfile, 40, "memuse_report-step%d.dat", j + 1);
#endif // WITH_MPI
//memuse_log_dump(dumpfile);
memuse_log_dump(dumpfile);
}
#endif
......
......@@ -637,7 +637,7 @@ int main(int argc, char *argv[]) {
engine_fof(&e, /*dump_results=*/1, /*seed_black_holes=*/0);
/* Write output. */
//engine_dump_snapshot(&e);
engine_dump_snapshot(&e);
#ifdef WITH_MPI
MPI_Barrier(MPI_COMM_WORLD);
......
......@@ -1534,9 +1534,6 @@ void engine_rebuild(struct engine *e, int repartitioned,
engine_exchange_cells(e);
#endif
MPI_Barrier(MPI_COMM_WORLD);
message("engine_exchange_cells() finished.");
#ifdef SWIFT_DEBUG_CHECKS
/* Let's check that what we received makes sense */
......
......@@ -3062,8 +3062,6 @@ void engine_maketasks(struct engine *e) {
threadpool_map(&e->threadpool, engine_make_hydroloop_tasks_mapper, NULL,
s->nr_cells, 1, 0, e);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Making hydro tasks took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3076,8 +3074,6 @@ void engine_maketasks(struct engine *e) {
s->nr_cells, 1, 0, e);
}
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Making gravity tasks took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3094,8 +3090,6 @@ void engine_maketasks(struct engine *e) {
/* Split the tasks. */
scheduler_splittasks(sched, /*fof_tasks=*/0, e->verbose);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Splitting tasks took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3112,9 +3106,6 @@ void engine_maketasks(struct engine *e) {
if (e->links != NULL) swift_free("links", e->links);
e->size_links = e->sched.nr_tasks * e->links_per_tasks;
MPI_Barrier(MPI_COMM_WORLD);
message("Freed old list of cell-task links.");
/* Make sure that we have space for more links than last time. */
if (e->size_links < e->nr_links * engine_rebuild_link_alloc_margin)
e->size_links = e->nr_links * engine_rebuild_link_alloc_margin;
......@@ -3124,9 +3115,6 @@ void engine_maketasks(struct engine *e) {
"links", sizeof(struct link) * e->size_links)) == NULL)
error("Failed to allocate cell-task links.");
e->nr_links = 0;
MPI_Barrier(MPI_COMM_WORLD);
message("Allocated new link list.");
tic2 = getticks();
......@@ -3136,8 +3124,6 @@ void engine_maketasks(struct engine *e) {
threadpool_map(&e->threadpool, engine_count_and_link_tasks_mapper,
sched->tasks, sched->nr_tasks, sizeof(struct task), 0, e);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Counting and linking tasks took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3154,8 +3140,6 @@ void engine_maketasks(struct engine *e) {
* pointers. */
threadpool_map(&e->threadpool, cell_set_super_mapper, cells, nr_cells,
sizeof(struct cell), 0, e);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Setting super-pointers took %.3f %s.",
......@@ -3165,9 +3149,6 @@ void engine_maketasks(struct engine *e) {
threadpool_map(&e->threadpool, engine_make_hierarchical_tasks_mapper, cells,
nr_cells, sizeof(struct cell), 0, e);
MPI_Barrier(MPI_COMM_WORLD);
message("Appended hierarchical tasks to each cell.");
tic2 = getticks();
/* Run through the tasks and make force tasks for each density task.
......@@ -3177,8 +3158,6 @@ void engine_maketasks(struct engine *e) {
threadpool_map(&e->threadpool, engine_make_extra_hydroloop_tasks_mapper,
sched->tasks, sched->nr_tasks, sizeof(struct task), 0, e);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Making extra hydroloop tasks took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3188,8 +3167,6 @@ void engine_maketasks(struct engine *e) {
/* Add the dependencies for the gravity stuff */
if (e->policy & (engine_policy_self_gravity | engine_policy_external_gravity))
engine_link_gravity_tasks(e);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Linking gravity tasks took %.3f %s.",
......@@ -3232,8 +3209,6 @@ void engine_maketasks(struct engine *e) {
/*chunk=*/0, e);
free(send_cell_type_pairs);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Creating send tasks took %.3f %s.",
......@@ -3244,9 +3219,6 @@ void engine_maketasks(struct engine *e) {
/* Exchange the cell tags. */
proxy_tags_exchange(e->proxies, e->nr_proxies, s);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Exchanging cell tags took %.3f %s.",
clocks_from_ticks(getticks() - tic2), clocks_getunit());
......@@ -3277,8 +3249,6 @@ void engine_maketasks(struct engine *e) {
sizeof(struct cell_type_pair),
/*chunk=*/0, e);
free(recv_cell_type_pairs);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Creating recv tasks took %.3f %s.",
......@@ -3287,9 +3257,6 @@ void engine_maketasks(struct engine *e) {
/* Allocate memory for foreign particles */
engine_allocate_foreign_particles(e);
MPI_Barrier(MPI_COMM_WORLD);
message("Allocated memory for foreign particles.");
#endif
......@@ -3312,8 +3279,6 @@ void engine_maketasks(struct engine *e) {
/* Set the unlocks per task. */
scheduler_set_unlocks(sched);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Setting unlocks took %.3f %s.",
......@@ -3323,8 +3288,6 @@ void engine_maketasks(struct engine *e) {
/* Rank the tasks. */
scheduler_ranktasks(sched);
MPI_Barrier(MPI_COMM_WORLD);
if (e->verbose)
message("Ranking the tasks took %.3f %s.",
......@@ -3332,8 +3295,6 @@ void engine_maketasks(struct engine *e) {
/* Weight the tasks. */
scheduler_reweight(sched, e->verbose);
MPI_Barrier(MPI_COMM_WORLD);
/* Set the tasks age. */
e->tasks_age = 0;
......
......@@ -21,15 +21,15 @@
__attribute__((always_inline)) INLINE static void gravity_debug_particle(
const struct gpart* p) {
// printf(
// "mass=%.3e time_bin=%d\n"
// "x=[%.5e,%.5e,%.5e], v_full=[%.5e,%.5e,%.5e], a=[%.5e,%.5e,%.5e]\n",
// p->mass, p->time_bin, p->x[0], p->x[1], p->x[2], p->v_full[0],
// p->v_full[1], p->v_full[2], p->a_grav[0], p->a_grav[1], p->a_grav[2]);
//#ifdef SWIFT_DEBUG_CHECKS
// printf("num_interacted=%lld ti_drift=%lld ti_kick=%lld\n", p->num_interacted,
// p->ti_drift, p->ti_kick);
//#endif
printf(
"mass=%.3e time_bin=%d\n"
"x=[%.5e,%.5e,%.5e], v_full=[%.5e,%.5e,%.5e], a=[%.5e,%.5e,%.5e]\n",
p->mass, p->time_bin, p->x[0], p->x[1], p->x[2], p->v_full[0],
p->v_full[1], p->v_full[2], p->a_grav[0], p->a_grav[1], p->a_grav[2]);
#ifdef SWIFT_DEBUG_CHECKS
printf("num_interacted=%lld ti_drift=%lld ti_kick=%lld\n", p->num_interacted,
p->ti_drift, p->ti_kick);
#endif
}
#endif /* SWIFT_DEFAULT_GRAVITY_DEBUG_H */
......@@ -33,6 +33,12 @@ struct gpart {
/*! Particle position. */
double x[3];
/*! Particle velocity. */
float v_full[3];
/*! Particle acceleration. */
float a_grav[3];
/*! Particle mass. */
float mass;
......
......@@ -66,9 +66,6 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies,
ticks tic2 = getticks();
message("Getting size of outgoing tags...");
MPI_Barrier(MPI_COMM_WORLD);
/* Run through the cells and get the size of the tags that will be sent off.
*/
int count_out = 0;
......@@ -83,9 +80,6 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies,
}
}
message("Getting size of incoming tags...");
MPI_Barrier(MPI_COMM_WORLD);
/* Run through the proxies and get the count of incoming tags. */
int count_in = 0;
int *offset_in =
......@@ -99,10 +93,6 @@ void proxy_tags_exchange(struct proxy *proxies, int num_proxies,
}
}
message("Allocating %d tags_in and %d tags_out.", count_in, count_out);
MPI_Barrier(MPI_COMM_WORLD);
/* Allocate the tags. */
int *tags_in = NULL;
int *tags_out = NULL;
......
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