[mesa-users] The file "scan_grid_results.data"

Kuldeep Verma kuldeepv89 at gmail.com
Wed May 28 09:30:54 EDT 2014


Hi Everyone,

Since nobody replied to my previous email, I was impelled to look myself in
the code. It seems from the following piece of code in
"mesa/star/astero/src/run_star_extras_astero.f"

         if (best_chi2 < 0) then
            write(*,*) 'failed to find chi^2 for this run'
            call zero_best_info
            best_chi2 = 999999d0
            return
         end if

         sample_number = sample_number + 1

that the variable "sample_number" is not being updated when the program
fails to calculate the total chi-square. This is perhaps to name the
successful samples (the samples that passes all the observed constraints
and the total chi-square is successfully calculated during the evolution)
in a sequence like 1, 2, 3, 4, ..... But this creates a problem. There will
be no entry in the file "scan_grid_results.data" for all the successful
samples that preceded a failed sample (the total chi-square is not
calculated during the evolution). To understand this, let us suppose that
the total chi-square is calculated successfully for the second last grid
point and not for the last grid point. Then the quantities sample_chi2(i),
sample_age(i), sample_Teff(i) etc. have values corresponding to the best
model at the end of the second last grid point (i = sample_number at this
point), and get replaced by initializing values of best_chi2, best_age,
best_Teff etc. after the run (since the sample_number remains the same). In
this way the information about the best parameters of second last grid
point is lost from the file "scan_grid_results.data". To see this, please
download the inlists and starting model from my previous email in the test
suite "example_astero" and run it. There are two models in the grid. The
total chi-square is calculated for the first model and the best parameters
can be seen in the file "scan_grid_results.data" at the end of its
evolution. The second model does not satisfy all the observed constraints
and therefore the total chi-square is not found during the evolution. At
the end of the run, we have 999999 for chi-square and initializing values
for other parameters in file "scan_grid_results.data".

It is quite possible that I have misunderstood the code. If so, please
forgive for such a long email and in light me about what I get after
running the attached inlists. I'm using latest version of MESA, 6208.

With Best Wishes,
Kuldeep


On Wed, May 21, 2014 at 9:45 PM, Kuldeep Verma <kuldeepv89 at gmail.com> wrote:

> Hi Everyone,
>
> Can someone please point me out, where (in the code) or how the file
> "scan_grid_results.data" is written while running a grid of models using
> the test suite "example_astero"? I ran a grid of a couple of models, the
> first model successfully calculates the chi-square (~14) and the second
> fails. I was expecting the first model to be present in the file
> "scan_grid_results.data", but turns out that the second model replaces the
> first one with of course a chi-square equal to 999999. I have attached the
> required inlists and starting model, in case someone wants to have a look
> or try running it.
>
> Thanks in advance for any help.
>
> With Best Wishes,
> Kuldeep
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20140528/96af3332/attachment.html>


More information about the Mesa-users mailing list