Commit 7c5d6627 authored by James Willis's avatar James Willis
Browse files

Formatting.

parent 23404b61
......@@ -2394,9 +2394,8 @@ void engine_step(struct engine *e) {
e->timeStep, e->updates, e->g_updates, e->wallclock_time);
fflush(stdout);
fprintf(e->file_timesteps,
" %6d %14e %14e %10zd %10zd %21.3f\n", e->step, e->time,
e->timeStep, e->updates, e->g_updates, e->wallclock_time);
fprintf(e->file_timesteps, " %6d %14e %14e %10zd %10zd %21.3f\n", e->step,
e->time, e->timeStep, e->updates, e->g_updates, e->wallclock_time);
fflush(e->file_timesteps);
}
......@@ -2960,8 +2959,10 @@ void engine_init(struct engine *e, struct space *s,
/* Open some files */
if (e->nodeID == 0) {
char energyfileName[200] = "";
parser_get_opt_param_string(params, "Statistics:energy_file_name", energyfileName, engine_default_energy_file_name);
sprintf(energyfileName + strlen(energyfileName),".txt");
parser_get_opt_param_string(params, "Statistics:energy_file_name",
energyfileName,
engine_default_energy_file_name);
sprintf(energyfileName + strlen(energyfileName), ".txt");
e->file_stats = fopen(energyfileName, "w");
fprintf(e->file_stats,
"# %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s %14s\n",
......@@ -2970,19 +2971,28 @@ void engine_init(struct engine *e, struct space *s,
fflush(e->file_stats);
char timestepsfileName[200] = "";
parser_get_opt_param_string(params, "Statistics:timestep_file_name", timestepsfileName, engine_default_timesteps_file_name);
parser_get_opt_param_string(params, "Statistics:timestep_file_name",
timestepsfileName,
engine_default_timesteps_file_name);
sprintf(timestepsfileName + strlen(timestepsfileName),"_%d.txt",nr_nodes * nr_threads);
sprintf(timestepsfileName + strlen(timestepsfileName), "_%d.txt",
nr_nodes * nr_threads);
e->file_timesteps = fopen(timestepsfileName, "w");
fprintf(e->file_timesteps,
"# Branch: %s\n# Revision: %s\n# Compiler: %s, Version: %s \n# Number of threads: %d\n# Number of MPI ranks: %d\n# Hydrodynamic scheme: %s\n# Hydrodynamic kernel: %s\n# No. of neighbours: %.2f +/- %.2f\n# Eta: %f\n", git_branch(), git_revision(), compiler_name(), compiler_version(), e->nr_threads, e->nr_nodes, SPH_IMPLEMENTATION, kernel_name, e->hydro_properties->target_neighbours, e->hydro_properties->delta_neighbours,
"# Branch: %s\n# Revision: %s\n# Compiler: %s, Version: %s \n# "
"Number of threads: %d\n# Number of MPI ranks: %d\n# Hydrodynamic "
"scheme: %s\n# Hydrodynamic kernel: %s\n# No. of neighbours: %.2f "
"+/- %.2f\n# Eta: %f\n",
git_branch(), git_revision(), compiler_name(), compiler_version(),
e->nr_threads, e->nr_nodes, SPH_IMPLEMENTATION, kernel_name,
e->hydro_properties->target_neighbours,
e->hydro_properties->delta_neighbours,
e->hydro_properties->eta_neighbours);
fprintf(e->file_timesteps,
"# %6s %14s %14s %10s %10s %16s [%s]\n", "Step", "Time", "Time-step",
"Updates", "g-Updates", "Wall-clock time", clocks_getunit());
fprintf(e->file_timesteps, "# %6s %14s %14s %10s %10s %16s [%s]\n", "Step",
"Time", "Time-step", "Updates", "g-Updates", "Wall-clock time",
clocks_getunit());
fflush(e->file_timesteps);
}
/* Print policy */
......
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