[Mesa-users] STELLA Errors and Number of Frequency Bins
Sergei Blinnikov
Sergei.Blinnikov at itep.ru
Tue May 19 14:56:58 EDT 2020
The crucial parameter is
NZ in stiffbgh.f:
C- PARAMETER (NZ=1200000); -- for Nfreq=200, Mzon=200
PARAMETER(NZ=3000000)
C- for Nfreq=100, Mzon=600
NZ allocates memory for the sparse matrix solver for non-zero elements
which do appear in the process of LU-decomposition. If you have large
Nfreq and/or Mzon your must increase NZ.
E.g. I tried:
integer, parameter :: NZ = 20 000 000; -- for very large Mfreq .
It should work if you have enough RAM.
If your problem with numerical singularity is not solved by the larger
NZ, you should move around the parameters like the Zlatev threshold.
In MESA you see in stiffbgh.f:
CALLM28Y12(N,NZMOD,AJAC,LICN,IRN,LIRN,ICN,PIVOT,IKEEP,IW,WJAC,LBLOCK,GROW,ABORT,IDISP,IFAIL,1.D-12)
If you look into original source stiffbgh.trf you find what does 1.D-12
mean:
@THR 1.D-12 -- Zlatev threshold
If you read Osterby & Zlatev book you will find that your decomposed
matrix will be less dense, and hence less numerically singular, for much
larger threshold. I often used 0.01 here. The iterative refinement may
be longer then, no simgularity is encountered...
One more parameter to play around is PIVOT in the call to M28Y12.
It is defined here:
DATALBLOCK/.True./,GROW/.TRUE./,ABORT/.FALSE.,.TRUE.,.FALSE.,.TRUE./,PIVOT/1.D-01/
-- again read Osterby & Zlatev on its meaning.
I hope those tricks may help.
Sergei
On 5/16/20 2:39 AM, Jared Goldberg wrote:
> Hi Jake,
>
> I am running STELLA in the 12778 version of MESA with the mesa.abn
> and mesa.hyd files created using the example_make_pre_ccsn and
> example_ccsn_IIP test suite cases (with certain parameters
> adjusted for specific cases). I am trying to use more frequency
> bins to better fit individual U, B, V, R, and I color curves to
> observational data. However, I sometimes encounter errors which
> disappear when using fewer bins.
> For example, I successfully ran STELLA with the attached mesa.hyd
> and the mesa.abn files with 400 spatial zones and 120 frequency
> bins. However, when I tried to use 150 frequency bins, I received
> the error: "0Matrix is numerically singular-decomposition
> aborted", and STELLA failed to run.
>
>
> I have seen the error myself, and can reproduce it with your input
> files. I also ran your mesa.hyd and mesa.abn files on 2 different
> computer architectures. On my Arch linux desktop I found the same
> singular matrix message you did, whereas on my mac laptop the
> calculation ran to ~160 days with 150 frequency bins, but crashed with
> a "file already open" warning (memory-related) without generating any
> mesa.lbol or useful output. We suspect a possible memory leak, such as
> in the opacity table calculations, which is being looked into further.
> Moreover, the numbers of grid points (for the opacity tables) and
> frequency bins are somehow capped for computational reasons, and these
> limits are hard-coded into the version of STELLA that ships with MESA.
> Thus for the memory issue with finer frequency binning, unfortunately
> there is simply an upper limit on the number of bins you can use. My
> solution has been "run with 100-120 bins and see if the results you
> care about are converged" and the occasional corollary "don't trust
> the colors much if they're not converged."
>
> I am wondering if someone can help me understand these errors and
> let me know if there is a way to work around them that does not
> involve using fewer frequency bins.
>
> I have also received error messages which read "Segmentation
> fault, invalid memory reference" for other sets of .abn and .hyd
> files. I am not sure if these error messages are related, but I
> have worked around both of them by reducing the number of
> frequency bins I run with.
>
>
> I believe the issues are related, and again are likely related to
> these memory limitations and the calculation of the opacity tables.
> The "invalid memory reference" segfault, in fact, occurred for me
> after the opacity table calculation as STELLA started its
> hydrodynamical when I tried to run these same .abn/.hyd files with 200
> frequency bins. Unfortunately, the best work-around is to use fewer
> frequency bins, and check convergence. (Say, run with 100, 120, and
> 130 bins, and see how different the colors look).
>
> Cheers,
> ~Jared
>
>
> On Fri, May 8, 2020 at 1:19 PM Jake Nicoll via Mesa-users
> <mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>>
> wrote:
>
> Hi all,
>
> I am running STELLA in the 12778 version of MESA with the mesa.abn
> and mesa.hyd files created using the example_make_pre_ccsn and
> example_ccsn_IIP test suite cases (with certain parameters
> adjusted for specific cases). I am trying to use more frequency
> bins to better fit individual U, B, V, R, and I color curves to
> observational data. However, I sometimes encounter errors which
> disappear when using fewer bins.
>
> For example, I successfully ran STELLA with the attached mesa.hyd
> and the mesa.abn files with 400 spatial zones and 120 frequency
> bins. However, when I tried to use 150 frequency bins, I received
> the error: "0Matrix is numerically singular-decomposition
> aborted", and STELLA failed to run.
>
> I have also received error messages which read "Segmentation
> fault, invalid memory reference" for other sets of .abn and .hyd
> files. I am not sure if these error messages are related, but I
> have worked around both of them by reducing the number of
> frequency bins I run with.
>
> I am wondering if someone can help me understand these errors and
> let me know if there is a way to work around them that does not
> involve using fewer frequency bins.
>
> Best,
> -Jake Nicoll
> _______________________________________________
> mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20200519/c2389ee2/attachment.htm>
More information about the Mesa-users
mailing list