preprocessor now filters debug output
This commit is contained in:
@@ -72,7 +72,11 @@ void SimulationOutput::writeSimulationData(
|
||||
PoissonSolver* poisson_solver,
|
||||
std::mt19937* engine) {
|
||||
if (MpiCommunication::mpi_rank == 0) {
|
||||
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Write density field data.");
|
||||
#endif
|
||||
|
||||
for (auto& task : tasks_density_fields_) {
|
||||
if (cpu_sync % task.intervall == 0) {
|
||||
std::string specie_path = "/" + task.specie_name;
|
||||
@@ -80,7 +84,9 @@ void SimulationOutput::writeSimulationData(
|
||||
specie_path, cpu_sync, task.overwrite_last);
|
||||
}
|
||||
}
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Write current collector data.");
|
||||
#endif
|
||||
for (auto& task : tasks_current_collector_) {
|
||||
if (cpu_sync % task.intervall == 0) {
|
||||
std::string specie_path = "/" + task.specie_name;
|
||||
@@ -88,7 +94,9 @@ void SimulationOutput::writeSimulationData(
|
||||
specie_path, cpu_sync, task.overwrite_last);
|
||||
}
|
||||
}
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Write deletion logger data.");
|
||||
#endif
|
||||
for (auto& task : tasks_deletion_logger_) {
|
||||
if (cpu_sync % task.intervall == 0) {
|
||||
std::string specie_path = "/" + task.specie_name;
|
||||
@@ -96,7 +104,9 @@ void SimulationOutput::writeSimulationData(
|
||||
specie_path, cpu_sync, task.overwrite_last);
|
||||
}
|
||||
}
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Write PoissonSolver data.");
|
||||
#endif
|
||||
if (cpu_sync % task_potential_.intervall == 0) {
|
||||
std::string poisson_path = "/" + task_potential_.specie_name;
|
||||
writeSimulationData(poisson_solver, poisson_path, cpu_sync,
|
||||
@@ -121,15 +131,23 @@ void SimulationOutput::writeSimulationData(DynamicDensityField* density_field,
|
||||
}
|
||||
std::string path = species_path + "/DensityField/SimulationData/" + sync_path;
|
||||
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write spectrum.");
|
||||
#endif
|
||||
writeSpectrum(density_field, path);
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write density.");
|
||||
#endif
|
||||
writeDensity(density_field, path);
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write time in bin.");
|
||||
#endif
|
||||
writeTimeInBin(density_field, path);
|
||||
// DEBUG_LEVEL_3("Write deleted particles.");
|
||||
// writeDeletedParticles(density_field, path);
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write physical time.");
|
||||
#endif
|
||||
writePhysicalTime(density_field, path);
|
||||
}
|
||||
|
||||
@@ -143,11 +161,17 @@ void SimulationOutput::writeSimulationData(CurrentCollector* current_collector,
|
||||
}
|
||||
std::string path =
|
||||
species_path + "/CurrentCollector/SimulationData/" + sync_path;
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write current crossings.");
|
||||
#endif
|
||||
writeCurrentCrossings(current_collector, path);
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write current.");
|
||||
#endif
|
||||
writeCurrent(current_collector, path);
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write physical time.");
|
||||
#endif
|
||||
writePhysicalTime(current_collector, path);
|
||||
}
|
||||
|
||||
@@ -160,7 +184,9 @@ void SimulationOutput::writeSimulationData(DeletionLogger* logger,
|
||||
sync_path = "LastSyncPeriod";
|
||||
}
|
||||
std::string path = species_path + "/DeletionLogger/" + sync_path;
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write number of deletions.");
|
||||
#endif
|
||||
writeNumDeletions(logger, path);
|
||||
}
|
||||
|
||||
@@ -173,7 +199,9 @@ void SimulationOutput::writeSimulationData(PoissonSolver* poisson_solver,
|
||||
sync_path = "/LastSyncPeriod";
|
||||
}
|
||||
std::string path = poisson_path + "/SimulationData" + sync_path;
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3("Write potential.");
|
||||
#endif
|
||||
writePotential(poisson_solver, path);
|
||||
}
|
||||
|
||||
@@ -185,10 +213,12 @@ void SimulationOutput::writeRestartData(std::mt19937* engine, int cpu_sync,
|
||||
if (overwrite_last) {
|
||||
path_base = "/RestartInfo/LastSyncPeriod/CPU_";
|
||||
}
|
||||
#ifdef debug_level3
|
||||
DEBUG_LEVEL_3(path_base);
|
||||
DEBUG_LEVEL_3("Write restart info.");
|
||||
#endif
|
||||
writeRandomEngineState(engine, path_base);
|
||||
DEBUG_LEVEL_3("Done");
|
||||
// DEBUG_LEVEL_3("Done");
|
||||
}
|
||||
|
||||
void SimulationOutput::writeRandomEngineState(std::mt19937* engine, std::string path) {
|
||||
|
||||
Reference in New Issue
Block a user