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
Error on compiling CAMB FORTRAN
-
- Posts: 19
- Joined: June 27 2023
- Affiliation: Universidad Nacional Autónoma de México
-
- Posts: 1980
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Error on compiling CAMB FORTRAN
Maybe you have fminshared in some linked code, or default ifort args. In any case I would use latest CAMB if at all possible.
-
- Posts: 19
- Joined: June 27 2023
- Affiliation: Universidad Nacional Autónoma de México
Re: Error on compiling CAMB FORTRAN
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?
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?
-
- Posts: 1980
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Error on compiling CAMB FORTRAN
Not specifically, apart from try the latest version