Page 1 of 1

Error on compiling CAMB FORTRAN

Posted: August 22 2023
by Jose Lozano
Hello dear people,

I have been manipulating the CAMB code for a specific dark energy model. Anyhow, once I compile the FORTRAN CAMB code in the terminal by making "make" I get the following message:

ifort: command line error: '-fminshared' conflicts with '-fpic'
make: *** [Releaselib/constants.o] Error 1

I'm using the latest version of ifort 2021.10.0 20230609 in my Mac with the Intel Chip. Do you know how to fix this? I'm using the CAMB version November 2016 for special reasons.

I'm hope you can give me a hand on this.

Thank you

Re: Error on compiling CAMB FORTRAN

Posted: August 22 2023
by Antony Lewis
Maybe you have fminshared in some linked code, or default ifort args. In any case I would use latest CAMB if at all possible.

Re: Error on compiling CAMB FORTRAN

Posted: August 22 2023
by Jose Lozano
Hola Anthony,

I have already fixed the problem. Now, I'm dealing with the following error:

gfortran -ffree-line-length-none -O3 -fopenmp -ffast-math -fmax-errors=4 -JRelease -IRelease/ -c equations_ppf.f90 -o Release/equations_ppf.o
equations_ppf.f90:997:26:

997 | type(EvolutionVars) EV
| 1
Error: Name 'ev' at (1) is an ambiguous reference to 'ev' from current program unit
equations_ppf.f90:1008:12:

1008 | else
| 1
Error: Unexpected ELSE statement at (1)
equations_ppf.f90:1013:11:

1013 | end if
| 1
Error: Expecting END SUBROUTINE statement at (1)
equations_ppf.f90:1014:7:

1014 | end if
| 1
Error: Expecting END SUBROUTINE statement at (1)
compilation terminated due to -fmax-errors=4.
make: *** [Release/equations_ppf.o] Error 1

I tried to include "-ffree-line-length-none" in FFLAGS of the makefile. But still, it is giving out the same error.

Do you have an idea or possible solution to fix this?

Re: Error on compiling CAMB FORTRAN

Posted: August 23 2023
by Antony Lewis
Not specifically, apart from try the latest version