GALPROP
https://galprop.stanford.edu/forum/

Problem with secondary positrons
https://galprop.stanford.edu/forum/viewtopic.php?f=6&t=155
Page 1 of 1

Author:  phigra [ Thu Dec 06, 2012 2:31 am ]
Post subject:  Problem with secondary positrons

I've installed galprop and want to make some test runs. I think everything is fine instead of the calculation of the secondary positrons:
If I set
Code:
secondary_positrons  = 1
the program always stops with the line
Code:
gen_secondary_positron_source:   CR Helium  found as species #x

x is usually a number between 5 and 9.
Does anyone know how to deal with this problem?

I do not know weather it is a bug or just a problem with compiling the source code. So, maybe the post should be moved to the debugging section.

Author:  buday [ Fri Jun 26, 2015 11:06 am ]
Post subject:  Re: Problem with secondary positrons

I have the same problem.

It looks more like a bug. I've tried to fix it, but unsuccessfully. Computation enters the routine "gen_secondary_positrons" and sticks somewhere inside the loops over momentum and coordinates. As I see, loop is not eternal.

Also this problem occur when secondary_electrons = 1, since it uses the same routine.

Author:  strong [ Fri Jun 26, 2015 12:24 pm ]
Post subject:  Re: Problem with secondary positrons

Please specify which version, compiler and operating system you are using (and also your names!).
If you look at the README of current r2754 (https://sourceforge.net/projects/galprop) there is written

39. AWS20140711 galprop may hang in gen_secondary_positron_source.cc: this happened with g++, openmp on a RHEL system at SLAC. The solution was:
setenv OMP_NUM_THREADS 1
to avoid parallel processing. Another solution would be not to configure with openmp. Reason unknown. The problem has not yet been observed elsewhere to our knowledge.

so it depends on whether you are running in parallel mode, and on which architecture. Under SLES11 with g++ or icpc compilers and openmp for example it is fine.

Although found and documented in 2014, I assume the problem would occur in any version, so that is interesting to know.

Author:  buday [ Sun Jun 28, 2015 4:43 am ]
Post subject:  Re: Problem with secondary positrons

OS: Fedora 22; Version: 54.1.984 (i don't know where to check version with "r" letter: r###); Compiler: gcc;
I used "--enable-openmp" option while ./configure, as galprop could not be compiled without (see this topic: viewtopic.php?f=6&t=148).
Now I will try to run it with no parallel processing and will reply here about results.
Thanks.

Author:  buday [ Sun Jun 28, 2015 6:31 am ]
Post subject:  Re: Problem with secondary positrons

It works. gen_secondary_positron_source works properly on 1 thread.
Thank you for help!

Author:  strong [ Sun Jun 28, 2015 8:16 am ]
Post subject:  Re: Problem with secondary positrons

good, and thanks for the useful feedback since it it the first time it was observed on another system.
It ought to get fixed, I will look at it. openmp is not appropriate to this routine anyway.
NB try the new version as posted above (it does not solve this problem but has other features).

Author:  strong [ Tue Jun 30, 2015 12:13 am ]
Post subject:  Re: Problem with secondary positrons

a quick fix is to remove this line from gen_secondary_positron_source.cc and recompile.
#pragma omp parallel for schedule(dynamic) default(shared) private(NA1,NA2,cs_p_HI,cs_p_He,cs_He_HI,cs_He_He)

Then GALPROP should work with openmp on your machine, which of course is advantageous. I have not yet tested that, but will update the current version and test it on RHEL which also had that problem.

Author:  strong [ Tue Jun 30, 2015 5:57 am ]
Post subject:  Re: Problem with secondary positrons

the bug has been fixed in r2766 at https://sourceforge.net/projects/galprop

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/