Page 1 of 1

CAMB_sources compilation

Posted: June 23 2015
by Ze Fonseca
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é

Re: CAMB_sources compilation

Posted: June 24 2015
by Antony Lewis
Try compiling with -ffixed-line-length-none ?

CAMB_sources compilation

Posted: June 25 2015
by Ze Fonseca
It didn't work. I also took out the flag -march=native since it was giving an error.

Re: CAMB_sources compilation

Posted: June 25 2015
by Antony Lewis
Might want to check your gfortran is up to date (at least version 4.8), or try virtual machines at http://cosmologist.info/CosmoBox/.

Re: CAMB_sources compilation

Posted: July 21 2015
by Antony Lewis
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/).