CAMB_sources compilation

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Ze Fonseca
Posts: 6
Joined: June 04 2014
Affiliation: University of the Western Cape

CAMB_sources compilation

Post by Ze Fonseca » June 23 2015

Hey

I've been trying to use 2013 distribution of CAMB_sources but I have been unable to compile it.

Using gfortran 5.1 I've got several errors when compiling equations.f90 mainly related to the length of the lines and having issues wi EV% variables. Some of the errors are:

equations.f90:1711:132:

counts_radial_source= (1-2.5*W%dlog10Ndm)*((-4.D0*W%wing2(j)/chi*adotoa-2.D0*(-W%dwing2(j)*chi-W%wing2(j))/chi**2)/ &
1
Error: Line truncated at (1) [-Werror=line-truncation]

or

equations.f90:2401:26:

type(EvolutionVars) EV
1
Error: Name 'ev' at (1) is an ambiguous reference to 'ev' from current program unit

Been trying to use other version of gfortran and other flags but haven't been able to solve it.

Did anyone else had this problem?

Zé

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

Re: CAMB_sources compilation

Post by Antony Lewis » June 24 2015

Try compiling with -ffixed-line-length-none ?

Ze Fonseca
Posts: 6
Joined: June 04 2014
Affiliation: University of the Western Cape

CAMB_sources compilation

Post by Ze Fonseca » June 25 2015

It didn't work. I also took out the flag -march=native since it was giving an error.

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

Re: CAMB_sources compilation

Post by Antony Lewis » June 25 2015

Might want to check your gfortran is up to date (at least version 4.8), or try virtual machines at http://cosmologist.info/CosmoBox/.

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

Re: CAMB_sources compilation

Post by Antony Lewis » July 21 2015

The line length error was trivial to fix. The "ev" error is from the symbol being defined in two modules (EV and eV in constants). I've fixed these for gfortran compatibility (try CAMB_sources branch at https://github.com/cmbant/CAMB/).

Post Reply