CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

CAMB execution bug, floating-point related
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Dragan Huterer



Joined: 18 Jul 2005
Posts: 24
Affiliation: University of Michigan

PostPosted: May 05 2016  Reply with quote

I compiled CAMB on my new desktop that runs OS X 10.11.4. The gfortran and gcc version is 5.3.0 (each). CAMB compiles fine. But on execution I get the following error

Code:
kingjames:CL_THEORY huterer$ ~/numeric/CAMB/camb my_params.ini
at z =  0.000 sigma8 (all matter) =  0.7930
at z =  0.000 sigma8^2_vd/sigma8  =  0.4066
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG


Googling this message, I see hints to add to compilation flags some or all of the following
-fbacktrace -ffpe-trap=invalid,overflow,underflow,zero
(and a couple of others that don't make a difference). Once I do that + recompile, I get a slightly different error message:

Code:
kingjames:CL_THEORY huterer$ ~/numeric/CAMB/camb my_params.ini

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x10eafc8c6
#1  0x10eafc08c
#2  0x7fff93f65529
Floating point exception: 8


Any ideas?
Back to top
View user's profile [ Hidden ] Visit poster's website
Antony Lewis



Joined: 23 Sep 2004
Posts: 1224
Affiliation: University of Sussex

PostPosted: May 05 2016  Reply with quote

As far as I know the underflow message is harmless. (you could compile with debug flags and -fbacktrace to get meaningful stack trace in your second case)
Back to top
View user's profile [ Hidden ] Visit poster's website
Dragan Huterer



Joined: 18 Jul 2005
Posts: 24
Affiliation: University of Michigan

PostPosted: May 06 2016  Reply with quote

You were right - the underflow message (in the first example I gave) was indeed harmless, and CAMB completed the execution just fine.

The reason for the bug in my larger code that uses CAMB was nevertheless interesting, though. New-ish CAMB (January 2016, from the comments on the website) adds more columns to the output transfer file, and both it and matterpower.dat also have a line of variable descriptions while they didn't before. This confused my code that read these files.
Back to top
View user's profile [ Hidden ] Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.