[mesa-users] Fwd: retry
Jing Luan
jingluan at caltech.edu
Fri Jul 1 20:13:23 EDT 2011
Hello :-)
I force mesa to do a retry at some model but after retrying that model
mesa stops without any report;
Here is the content added to my extras_finish_step in run_star_extras.f, I
just set extras_finish_step to be retry when kn is even, and set
extras_finish_step to be keep_going when kn is odd, where kn is a save
integer and increases by 1 every time extras_finish_step is called:
integer, save :: kn
write (*,*) 'call extras_finish_step'
if (s% model_number == 3582) kn=0 ! model 3582 is the first model
because I start the run with model 3581
if (mod(kn,2)==0) then
write (*,*) 'retry,kn',kn
kn=kn+1
extras_finish_step = retry
else
write (*,*) 'keep_going,kn',kn
kn=kn+1
extras_finish_step = keep_going
end if
I tell mesa to print out 'call extras_finish_step' if extras_finish_step
is executed. I find that extras_finish_step is executed after the first
model with model number=3582, but NOT executed after the second model with
model number=3582; That is to say mesa terminates after the retried model
3582 is calculated and before extras_finish_step is called.
Because mesa does not report any information when it terminates, I really
have no idea where to trace the problem. Any help or suggestion is
appreciated!
Thank you very much :-)
Sincerely,
Jing
> Hi,
>
> Mesa/star doesn't retrain complete information about previous states,
> so you should save what you need yourself in your run_star_extras.
>
> Good luck,
> Bill
>
>
>
>
> On Jun 30, 2011, at 9:17 PM, jingluan at caltech.edu wrote:
>
>> Dear Bill,
>>
>> May I ask a question about the pointer s in mesa? Because I am not
>> familiar with pointer in fortran and failed to find direct-relevant
>> example by google. Thank you very much :-)
>>
>> For example, the current model is model2, the information contained in
>> its
>> s is different with the previous s in model1. After model2 is
>> calculated,
>> mesa goes on to extras_finish_step. In this extras_finish_step, is there
>> some way to use the information in the previous s in model1?
>>
>> I define s_old like this : type(star_info), pointer, save :: s_old
>> and then set: s_old=s in model1's extras_finish_step.But mesa reports
>> segmentation err. I think it should be because s and s_old are both
>> pointers, but did not yet find the right way to refer the previous s.
>>
>> I need to do it because I need some kind of mid-point integration, where
>> the mid-point is some linear combination of s and s_old.
>>
>> Thank you very much :-)
>>
>> Sincerely,
>> Jing
>>
>
>
More information about the Mesa-users
mailing list