Skip to content
Snippets Groups Projects

First version of main() using a parameter file to get constants.

Merged Matthieu Schaller requested to merge Parameter-File into master

That's pretty big but does not touch the physics, the parallelisation nor MPI.

In brief:

  • Latest version of the parser from @jwillis
  • More uniform name of functions in the unit module.
  • Added the ability for the engine, space, unit and partition objects to construct themselves from a parsed parameter file.
  • Added an example yaml file with full documentation.
  • Added yaml files and run scripts for the Sedov, Sod and uniform examples.
  • General tidying of the main().
  • Dropped the dependency on z-lib which we don't use.
  • Updated the README to reflect the new command-line parameters.
  • Cleaned-up the main() such that the only command-line parameters read in are policies and debugging options.
  • Added the option to do a 'dry run'. This reads the parameter file, allocates the memory required by the ICs but does not read anything and constructs a space and engine. This allows us to check the validity of a given parameter file.

Happy to guide you through the changes if need be.

This closes #81 (closed).

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • The runs.sh file no longer works. Needs updating to use the new parameter files.

  • Added 1 commit:

    • b90bd94b - Fixed sscanf() mistake in the parsing of doubles.
  • Just fixed the parsing of doubles problem.

    @pdraper I have added run.sh scripts in the Sedov, Sod and Uniform box cases. Do you think we still need the 'global' run.sh script ?

  • That was the one I tried (has the nice side-effect of creating the ICs, so I tend to start with that). If it is redundant then we should remove it. I've never managed to run it as intended, so that looks sensible to me.

  • Ok. What I could do is add the generation of ICs to the run.sh that are present in each sub-directory and then remove the global one. What do you think ?

  • Yes, lets do that. Can we also have a parameter file for the fixdt binary as well?

  • One issue with this system is the lack of defaults, so all parameters must be present, so for instance sensible runtime values are not used. Will this be handled in future developments?

  • Yes, I hope to add optional and compulsory parameters to the parsing.

  • Hmm, here's an odd one. When I run:

    ../swift sodShock.yml

    that looks OK, but:

    ../swift -s sodShock.yml

    outputs:

    [00002.0] engine_init_particles: Initialising particles
    [00003.3] runner_doghost: Smoothing length failed to converge on 1 particles.
    [00003.4] runner_doghost: Smoothing length failed to converge on 2 particles.
    [00003.4] runner_doghost: Smoothing length failed to converge on 2 particles.
    [00003.4] runner_doghost: Smoothing length failed to converge on 1 particles.
    [00003.5] runner_doghost: Smoothing length failed to converge on 1 particles.
    [00003.5] runner_doghost: Smoothing length failed to converge on 2 particles.
    [00003.5] runner_doghost: Smoothing length failed to converge on 1 particles.
    [00003.6] runner_doghost: Smoothing length failed to converge on 1 particles.
    [00003.6] runner_doghost: Smoothing length failed to converge on 2 particles.
    [00003.6] runner_doghost: Smoothing length failed to converge on 1 particles.
    .
    .
    .

    and yes these are newly created ICs.

    Edited by Peter W. Draper
  • You need to run with -s to get the SPH tasks. Your first call probably just does nothing.

    Your second call is correct but this branch does not have the updated SodShock ICs.... Sorry, forgetting to include them last week led to a bit of a mess.

  • Added 1 commit:

    • dd823b4f - Make sure we run with gravity or SPH.
  • I have just pushed a fix to prevent users from running without any tasks at all. So -g, -G or -s must be provided.

  • Matthieu Schaller Added 2 commits:

    Added 2 commits:

    • c4a1eabd - Be verbose about changes in split sizes.
    • 382838e3 - Updated the run scripts to generate the ICs if they are not present. Removed the…
  • Added 1 commit:

    • 5c7ae702 - Updated the unit tests for the new read_ic() and parser functions signatures.
  • Added 1 commit:

    • 754bd4be - Tell git to ignore the output of the parser test.
  • Alright, I have updated all the run scripts to generate ICs if need be and removed the global run script.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading