Commit c16a31fe authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Print the current redshift to stdout alongside the scale-factor.

parent 2f444556
......@@ -861,10 +861,10 @@ int main(int argc, char *argv[]) {
/* Legend */
if (myrank == 0)
printf("# %6s %14s %14s %14s %9s %12s %12s %12s %16s [%s] %6s\n", "Step",
"Time", "Scale-factor", "Time-step", "Time-bins", "Updates",
"g-Updates", "s-Updates", "Wall-clock time", clocks_getunit(),
"Props");
printf("# %6s %14s %14s %10s %14s %9s %12s %12s %12s %16s [%s] %6s\n",
"Step", "Time", "Scale-factor", "Redshift", "Time-step", "Time-bins",
"Updates", "g-Updates", "s-Updates", "Wall-clock time",
clocks_getunit(), "Props");
/* File for the timers */
if (with_verbose_timers) timers_open_file(myrank);
......@@ -1020,10 +1020,10 @@ int main(int argc, char *argv[]) {
if (myrank == 0) {
/* Print some information to the screen */
printf(" %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n",
e.step, e.time, e.cosmology->a, e.time_step, e.min_active_bin,
e.max_active_bin, e.updates, e.g_updates, e.s_updates,
e.wallclock_time, e.step_props);
printf(" %6d %14e %14e %10.5f %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n",
e.step, e.time, e.cosmology->a, e.cosmology->z, e.time_step,
e.min_active_bin, e.max_active_bin, e.updates, e.g_updates,
e.s_updates, e.wallclock_time, e.step_props);
fflush(stdout);
fprintf(e.file_timesteps,
......
......@@ -4371,10 +4371,10 @@ void engine_step(struct engine *e) {
if (e->nodeID == 0) {
/* Print some information to the screen */
printf(" %6d %14e %14e %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n",
e->step, e->time, e->cosmology->a, e->time_step, e->min_active_bin,
e->max_active_bin, e->updates, e->g_updates, e->s_updates,
e->wallclock_time, e->step_props);
printf(" %6d %14e %14e %10.5f %14e %4d %4d %12zu %12zu %12zu %21.3f %6d\n",
e->step, e->time, e->cosmology->a, e->cosmology->z, e->time_step,
e->min_active_bin, e->max_active_bin, e->updates, e->g_updates,
e->s_updates, e->wallclock_time, e->step_props);
fflush(stdout);
fprintf(e->file_timesteps,
......
......@@ -3245,11 +3245,9 @@ void space_generate_gas(struct space *s, const struct cosmology *cosmo,
p->id = gp_gas->id_or_neg_offset * 2 + 1;
gp_dm->id_or_neg_offset *= 2;
if(gp_dm->id_or_neg_offset <= 0)
error("DM particle ID overflowd");
if (gp_dm->id_or_neg_offset <= 0) error("DM particle ID overflowd");
if(p->id <= 0)
error("gas particle ID overflowd");
if (p->id <= 0) error("gas particle ID overflowd");
/* Set the links correctly */
p->gpart = gp_gas;
......
Markdown is supported
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