eggplantbren / DNest4

Diffusive Nested Sampling
MIT License
60 stars 21 forks source link

Set output files in OPTIONS #15

Closed j-faria closed 7 years ago

j-faria commented 7 years ago

This allows me to set the output files in the OPTIONS file, such that I can prefix them with a directory. That way I can run multiple jobs more easily without overwriting the files. I believe it's backwards compatible for an OPTIONS file like

# comment
# comment
2   # Number of particles
1000    # new level interval
50  # save interval
200 # threadSteps
45  # maximum number of levels
45  # Backtracking scale length (lambda in the paper)
70  # Strength of effect to force histogram to equal push
10  # Maximum number of saves (0 = infinite)
(blank line)

which outputs to sample.txt, sample_info.txt and levels.txt like normally.

Also works with

# comment
# comment
2   # Number of particles
1000    # new level interval
50  # save interval
200 # threadSteps
45  # maximum number of levels
45  # Backtracking scale length (lambda in the paper)
70  # Strength of effect to force histogram to equal push
10  # Maximum number of saves (0 = infinite)
    # (optional) samples file
    # (optional) sample_info file
    # (optional) levels file

again outputs to sample.txt, sample_info.txt and levels.txt like normally. And with

# comment
# comment
2   # Number of particles
1000    # new level interval
50  # save interval
200 # threadSteps
45  # maximum number of levels
45  # Backtracking scale length (lambda in the paper)
70  # Strength of effect to force histogram to equal push
10  # Maximum number of saves (0 = infinite)
somefolder/sample.txt    # (optional) samples file
somefolder/sample_info.txt    # (optional) sample_info file
somefolder/levels.txt    # (optional) levels file

where I believe somefolder must already exist.

I also reduced the terminal output to every 10 saves but feel free to ignore that.

eggplantbren commented 7 years ago

Merged (minus the only printing every 10th save - I generally run slow models where I want to see every one). Thanks!