It is currently Mon Dec 06, 2021 10:50 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 2:33 am 
Offline

Joined: Tue Mar 01, 2011 6:58 pm
Posts: 9
Firstly,galprop is run by using example configure file:galdef_50p_599278 conventional model (output_gcr_full = 1) and FITS file:nuclei_full_50p_599278 has been created.I copy it to other dir.

Secondly, set warm_start = 1 and run galprop. I got a new file:nuclei_full_50p_599278.

Finally,I read flux of primary and second electron from those two files. It's found that the primary flux is same value but the second flux give a different data.

NUCZ003=-1
NUCA003 =0

first :
0.010000 2.27066
0.013000 3.5656
0.016900 5.05556
0.021970 6.96174
0.028561 9.43857
0.037129 12.6479
0.048268 16.767
0.062749 22.0121
0.081573 28.601
0.106045 36.7239
0.137858 46.4959
0.179216 57.8853
.......
second:
0.010000 5253.08
0.013000 10499.9
0.016900 18677.2
0.021970 32543.1
0.028561 56281
0.037129 96839.9
0.048268 165661
0.062749 281545
0.081573 474127
0.106045 788170
0.137858 1.28736e+06
0.179216 2.05459e+06
.......

There are something wrong of configure file,or exists other errors ?

Acode is run at PC-Server ,whose OS is Red Hat 4.1.2-48

thanks.


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 2:38 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
since the second run is a continuation of the first, the results are not expected to be the same.
what were the timestep parameters of the two runs ?

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 8:10 am 
Offline

Joined: Tue Mar 01, 2011 6:58 pm
Posts: 9
Prof. Strong,
Thank you!
My idea is to reduce the running time.Those are testing computation.

A full computation spends almost thirty minuts.I only need some particles results when I change some parameters of configure file.
I know that some secondary partices' flux needs the other particles' decaying.
so I would think that I may use the full file to give the flux of A from x to max and all secondary flux,and only calculate from min to x by adding c++ code to cut the loop.

Galprop::propagate_particles()
.........
for(i=n_species-1; i>-1; i--)
{
if(i>=x){continue;} //added
.........

That is very simple and inadequate. Or there are not approach to do it.
I can not got it.


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 8:16 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
that won't work because GALPROP assumes it is a continuation with all the same species.
with the same galdef file.
so when it reads in the nuclei it will get confused.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 8:18 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
looking again at your change in the code, well it might work, but i can't say.
your test case suggests it does not for some reason.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 8:19 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
in the example output, did you have already the code change or is it the original code ?
the original should work of course.

_________________
Andy Strong, MPE


Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 9:26 pm 
Offline

Joined: Tue Mar 01, 2011 6:58 pm
Posts: 9
Sorry,I have said changing some parameters ,which could give something misunderstood.
parameters changed only involves source selection and their spectrum.
My aim is to add new source at GALPROP.New source only involves beta, proton and antiproton.
Propagation parameters are not changed.

Perhaps, adding new source may influence on them.
Now I postulate that new source do not influence on the old propagation parameters.

Just now I have finished the comparation test by only changing warm_start and output_gcr_full .

step 1
set warm_start =0 and output_gcr_full = 1
waiting for half an hour. nuclei_full_50p_599278 is created.
cp nuclei_full_50p_599278 Origin_nuclei_full_50p_599278

step 2

Modify propagate_particles.cc

..........
if(galdef.warm_start==1) read_gcr(); //AWS20010121
//added
int x=10;
for(i=0; i<n_species; i++){ gcr[i].cr_density=0.0;}
//added by jhb at ITP 20110303
particle.init(); // to signal that arrays not yet allocated
..........

for(i=n_species-1; i>-1; i--)
{
if(i>=x){continue;}//added by jhb at ITP 20110301
particle=gcr[i];
create_transport_arrays(particle);
..........
[jhb@hpc v50.1]$ make
[jhb@hpc v50.1]$ vi ../GALDEF/galdef_50p_599278
set warm_start =1 and output_gcr_full = 1
waiting for only ten minutes. nuclei_full_50p_599278 is created.

step 3
compare the flux of particles from the two files.
[jhb@hpc v50.1]$ for i in `seq 1 7`;do nufitread Origin_nuclei_50p_599278 18 1 0 $i >Species_$i;done
[jhb@hpc v50.1]$ for i in `seq 1 7`;do nufitread nuclei_50p_599278 18 1 0 $i >newSpecies_$i;done
get the the following flux:
NUCZ001 = 1 / Z of nucleus 1
NUCA001 = 0 / A of nucleus 1
NUCK001 = 0 / K-electrons of nucleus 1
NUCZ002 = -1 / Z of nucleus 2
NUCA002 = 0 / A of nucleus 2
NUCK002 = 0 / K-electrons of nucleus 2
NUCZ003 = -1 / Z of nucleus 3
NUCA003 = 0 / A of nucleus 3
NUCK003 = 0 / K-electrons of nucleus 3
NUCZ004 = -1 / Z of nucleus 4
NUCA004 = 1 / A of nucleus 4
NUCK004 = 0 / K-electrons of nucleus 4
NUCZ005 = -1 / Z of nucleus 5
NUCA005 = 1 / A of nucleus 5
NUCK005 = 0 / K-electrons of nucleus 5
NUCZ006 = 1 / Z of nucleus 6
NUCA006 = 1 / A of nucleus 6
NUCK006 = 0 / K-electrons of nucleus 6
NUCZ007 = 1 / Z of nucleus 7
NUCA007 = 1 / A of nucleus 7
NUCK007 = 0 / K-electrons of nucleus 7

Only NUCZ003 flux is NaN and others is identical.

I will spend time to find the error.


Last edited by jhbcn on Wed Mar 02, 2011 10:15 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: warm start
PostPosted: Wed Mar 02, 2011 9:32 pm 
Offline

Joined: Tue Mar 01, 2011 6:58 pm
Posts: 9
Now, I do not modify code to add new source.
Firstly I have a test to check my idea.Next, I will modify it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group