[mesa-users] debugging modified code

Bill Paxton paxton at kitp.ucsb.edu
Wed Aug 5 20:17:02 EDT 2015


hmmm,  now that I look in makefile_header, I find this:
FCbasic = -fno-range-check -fmax-errors=100 $(SPECIAL_FC_FLAGS) -fprotect-parens -fno-sign-zero -fbacktrace -ggdb

Do you find -fbacktrace in your compile commands?

b


On Aug 5, 2015, at 5:07 PM, Aaron Dotter wrote:

> 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
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> 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/20150805/474fac96/attachment.html>


More information about the Mesa-users mailing list