1. The Enzo Project
  2. Untitled project
  3. enzo-dev
  4. Pull requests

Pull requests

#250 Merged
Repository
ngoldbaum
Branch
week-of-code
Repository
enzo
Branch
week-of-code

Ignore grid hydro parameters on restart, deferring to global values.

Author
  1. Nathan Goldbaum
Reviewers
Description

When restarting from an on-disk dataset, enzo currently reads in the grid hydrodynamics parameters, in particular the CourantSafetyNumber, from the hierarchy file. This is annoying, because it breaks the expectation that changing one of these parameters in the parameter file will change the parameter in the real simulation.

This is particularly annoying when you want to restart a simulation that has crashed with a lower CFL. Usually I forget about this issue, edit the simulation parameter file, don't touch the hierarchy file, and put the job in the PBS queue. On more than one occasion, this oversight wasted a day of waiting in the queue only to find that the simulation crashed again because it used the old value for the CFL number.

This patch makes it so we ignore whatever is written in the hierarchy file and instead defer to the value for hydro parameters in the global parameter file. Rather than changing the format of the hierarchy file, I've opted to simply ignore these values when we read in the hierarchy file.

Comments (8)

  1. Matt Turk

    Um, to play the devil's advocate, with this change we're also now intentionally breaking the meaning of the parameter. I bet zero people anywhere rely on this. And yet, I'm a bit nervous ... I mean, remember when UNIGRID=1 was required for AMR simulations? This is kind of the same thing.

    1. Nathan Goldbaum author

      Can you elaborate a bit more? Which parameter? The ones in the hierarchy file?

      I agree that this change effectively makes them useless, but they still accurately describe whatever the simulation was run with.

      I'd also argue that it doesn't make sense to have independent settings of these parameters for different grids in the same simulation, meaning that to change these parameters a user needs to change all occurrences in the hierarchy file.

      1. Matt Turk

        Well, that's why I was only playing devil's advocate. I think you're making some great points. As long as we're now making it clear this is read-only, I'm game.