It is currently Sun Nov 28, 2021 5:34 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Dec 06, 2012 2:31 am 
Offline

Joined: Fri Jan 13, 2012 6:30 am
Posts: 1
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.


Top
 Profile  
 
PostPosted: Fri Jun 26, 2015 11:06 am 
Offline

Joined: Thu Jun 11, 2015 8:41 am
Posts: 7
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.

_________________
Ruslan Budaev
NRNU MEPhI


Top
 Profile  
 
PostPosted: Fri Jun 26, 2015 12:24 pm 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
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.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Sun Jun 28, 2015 4:43 am 
Offline

Joined: Thu Jun 11, 2015 8:41 am
Posts: 7
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.

_________________
Ruslan Budaev
NRNU MEPhI


Top
 Profile  
 
PostPosted: Sun Jun 28, 2015 6:31 am 
Offline

Joined: Thu Jun 11, 2015 8:41 am
Posts: 7
It works. gen_secondary_positron_source works properly on 1 thread.
Thank you for help!

_________________
Ruslan Budaev
NRNU MEPhI


Top
 Profile  
 
PostPosted: Sun Jun 28, 2015 8:16 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
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).

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Tue Jun 30, 2015 12:13 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
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.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Tue Jun 30, 2015 5:57 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
the bug has been fixed in r2766 at https://sourceforge.net/projects/galprop

_________________
Andy Strong, MPE


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

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