Cosmomc/CAMB: omtau in equations.f90

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Hans Kristian Eriksen
Posts: 60
Joined: September 25 2004
Affiliation: ITA, University of Oslo

Cosmomc/CAMB: omtau in equations.f90

Post by Hans Kristian Eriksen » November 04 2004

I just downloaded Cosmomc, and compiled it. It worked straight out of the box, but with one warning:

f90: Warning: equations.f90, line 1081: Variable OMTAU is used before its value has been defined
a = tau*adotrad*(1+omtau/4)

I guess it won't matter much, since it still is there in the code after a lot of people have used the program, but it would be nice to get a confirmation in any case.

Also, does anybody know if there is a performance cost for using implicit type conversions like the ones above, rather than doing something like the following:

a = tau*adotrad*(1.+omtau/4.) ?

Perhaps most compilers fix this at compile time?

Hans Kristian Eriksen

Antony Lewis
Posts: 1689
Joined: September 23 2004
Affiliation: University of Sussex

Re: Cosmomc/CAMB: omtau in equations.f90

Post by Antony Lewis » November 05 2004

Thanks for the bug in the vector mode initialization (there is also another vector mode bug in the Aug 2004 version - the spectral index is not set correctly). Obviously this doesn't affect any normal model.

I tend to use things like real/4 on the grounds that there may be more efficient ways to divide by four than use a general floating point division - however I've no idea if any compilers actually do it that way or whether they all convert to a real.

Post Reply