mode_item_list = 'x,dW_dx' segmentation fault – invalid memory reference

General discussion of all things GYRE-related (e.g., results, talks, ideas, tips)
Post Reply
amirm
Posts: 1
Joined: Wed Nov 29, 2017 6:58 am

mode_item_list = 'x,dW_dx' segmentation fault – invalid memory reference

Post by amirm » Wed Nov 29, 2017 3:53 pm

HI,
We are trying to add dW_dx (differential work output as real array) and/or T (temperature output as real array) to GRYE but we consistently get segmentation fault.
In order to check whether this is a general problem we started by taking the solar model test fgong.l5bi.d.15c (can be fined at test/ad/fgong/solar/) adding the following mode file set up to gyre input file:
mode_template = 'mode.%J.txt'
mode_file_format = 'TXT'
mode_item_list = 'x,P'

This test works fine.
But when we add T or dW_dx we get segmentation fault – invalid memory reference.
For example we tried:
mode_template = 'mode.%J.txt'
mode_file_format = 'TXT'
mode_item_list = 'x,dW_dx'

and get the following error:
gyre [5.1]
----------

OpenMP Threads : 2
Input filename : gyre.in

Model Init
----------

Reading from FGONG file
File name fgong.l5bi.d.15c
File version 210
Read 2482 points
Snapping central point to x=0
No need to add central point

Mode Search
-----------

Mode parameters
l : 1000
m : 0

Building frequency scan
added scan interval : 0.3004E+02 -> 0.5007E+02 (10 points, LINEAR)

Building x grid
Found inner turning points, x range 0.9934 -> 1.0007
Adding 9659 global point(s) in iteration 1
Adding 88 global point(s) in iteration 2
Adding 0 global point(s) in iteration 3
Final grid has 1 segment(s) and 12229 point(s):
Segment 1 : x range 0.0000 -> 1.0007 (1 -> 12229)

Starting search (adiabatic)

Root bracketing
Time elapsed : 1.610 s

Root Solving
l m n_pg n_p n_g Re(omega) Im(omega) chi n_iter
*** 0 0 0 0 0.31647698E+02 0.00000000E+00 0.2752E-16 11

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x7f2b2097771f in ???
#1 0x536067 in ???
#2 0x52d603 in ???
#3 0x50a101 in ???
#4 0x509e3c in ???
#5 0x525cc3 in ???
#6 0x4070e6 in ???
#7 0x481716 in ???
#8 0x4059d9 in ???
#9 0x404ae6 in ???
#10 0x7f2b20961039 in ???
#11 0x404b19 in ???
#12 0xffffffffffffffff in ???
Segmentation fault (core dumped)

The input file we use, the same as the test with the add mode output lines:

&constants
/

&model
model_type = 'EVOL'
file = 'fgong.l5bi.d.15c'
file_format = 'FGONG'
/

&mode
l = 1000
/

&osc
outer_bound = 'JCD'
/

&num
diff_scheme = 'COLLOC_GL6'
/

&scan
grid_type = 'LINEAR'
freq_min = 3000
freq_max = 5000
freq_min_units = 'UHZ'
freq_max_units = 'UHZ'
n_freq = 10
/

&grid
alpha_osc = 5.
alpha_exp = 1.
/

&ad_output
summary_file = 'summary.txt'
summary_file_format = 'TXT'
summary_item_list = 'l,n_p,n_g,freq'
freq_units = 'UHZ'
mode_template = 'mode.%J.txt' ! File-name template for mode files
mode_file_format = 'TXT' ! Format of mode files
mode_item_list = 'x,dW_dx'
/

&nad_output
/

Did we use GYRE wrong?
Any suggestions?

Thanks,
Amir Michaelis.

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: mode_item_list = 'x,dW_dx' segmentation fault – invalid memory reference

Post by rhtownsend » Wed Nov 29, 2017 5:19 pm

Hi Amir --

The problem here is that you're asking GYRE to evaluate the differential work dW_dx, but the FGONG file doesn't have enough information to do this calculation (in particular, it is lacking partial derivatives of the opacity with respect to density and temperature; the FGONG file format does not include these data).

However, in this situation GYRE should stop with a sensible error message, rather than crashing. I'm currently looking into why it crashes, and I'll get this fixed soon. In the meantime, I suggest you remove the 'dW_dx' from the mode_item_list parameter.

cheers,

Rich

Post Reply