[mesa-users] debugging modified code

Aaron Dotter aaron.dotter at gmail.com
Wed Aug 5 20:07:44 EDT 2015


Hi mesa-users,

Could we add -fbacktrace to FCdebug in utils/makefile_header?  It might
have once been there and later removed.

FCdebug = -g -fbacktrace

This will, if used to compile the modules, produce a much more informative
backtrace in situations like Kenny presented without having to invoke gdb.
The user would have a fighting chance of tracking down the error.

Aaron

On Thu, Aug 6, 2015 at 3:51 AM, Robert FARMER <rjfarmer at asu.edu> wrote:

> Hi
>
> The problem is in
> #3  0x42ABCC in __star_utils_MOD_em1
> star_utils, backtraces you should read from the top down.
>
> In the makefile add -ggdb to the FC_BASIC compile options then ./clean and
> ./mk.
>
> Then when you run the code the line number will either appear in the
> backtrace or you need to run the code under gdb
>
> cd $MESA_DIR/star/test
> gdb ./test_star
> type r at the prompt and when it crashes type bt that should tell you
> which line its crashing at.
>
> Rob
>
> On Wed, Aug 5, 2015 at 10:13 AM, Kenny Van <kvan at ualberta.ca> wrote:
>
>> Hi, I am currently trying to modify some parts of MESA codes and the code
>> compiles. However the test fails during the star phase of installing MESA
>> with a SIGSEGV.
>>
>> run_star_extras.o run_star.o  run.o -L../../make -lstar -L../../../lib
>> -lionization -latm -lcolors -lmlt -lnse -lnet -leos -lkap -lrates -lneu
>> -lchem -linterp_2d -linterp_1d -lnum -lf2crlibm -lcrlibm -lmtx -lconst
>> -lutils -lmesaklu -lmesalapack -lmesablas
>>
>>
>> Program received signal SIGSEGV: Segmentation fault - invalid memory
>> reference.
>>
>> Backtrace for this error:
>> #0  0x7FE3A4E00777
>> #1  0x7FE3A4E00D7E
>> #2  0x7FE3A40F1D3F
>> #3  0x42ABCC in __star_utils_MOD_em1
>> #4  0x66A327 in __hydro_eqns_MOD_do1_dlnt_dm_eqn
>> #5  0x670ED4 in __hydro_eqns_MOD_eval_equ_for_solver._omp_fn.0 at
>> hydro_eqns.f90:?
>> #6  0x7FE3A48DA349
>> #7  0x7FE3A3EA5181
>> #8  0x7FE3A41B547C
>> #9  0xFFFFFFFFFFFFFFFF
>> ./test_star: line 6: 24055 Segmentation fault      (core dumped) ./star >
>> log
>> 0a1
>> > stop because star_age >= max_age
>>
>> Judging from the error the problem is in my hydro_eqns.f90 code. Does
>> anyone know a way to narrow down the approximate line where the code fails?
>>
>> Thanks
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> mesa-users mailing list
>> mesa-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20150806/7a92006b/attachment.html>


More information about the Mesa-users mailing list