Error while compiling CosmoMC

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Sampurn Anand
Posts: 2
Joined: January 04 2012
Affiliation: University Of Delhi

Error while compiling CosmoMC

Post by Sampurn Anand » September 04 2013

Dear Prof. Lewis,

I installed ifort (version 13.1.3) on my computer and tried to run CosmoMc. I encountered following errors-

cd ./source && make all
make[1]: Entering directory `/home/sampurn/CosmoMC/cosmomc/source'
cd ../camb && make --file=Makefile_main libcamb_recfast.a RECOMBINATION=recfast EQUATIONS=equations_ppf
make[2]: Entering directory `/home/sampurn/CosmoMC/cosmomc/camb'
ifort -c constants.f90
ifort -c utils.F90
ifort -c subroutines.f90
ifort -c inifile.f90
ifort -c power_tilt.f90
ifort -c recfast.f90
ifort -c reionization.f90
ifort -c modules.f90
ifort -c bessels.f90
ifort -c equations_ppf.f90
ifort -c halofit.f90
ifort -c lensing.f90
ifort -c SeparableBispectrum.F90
ifort -c cmbmain.f90
ifort -c camb.f90
ar -r libcamb_recfast.a constants.o utils.o subroutines.o inifile.o power_tilt.o recfast.o reionization.o modules.o bessels.o equations_ppf.o halofit.o lensing.o SeparableBispectrum.o cmbmain.o camb.o
make[2]: Leaving directory `/home/sampurn/CosmoMC/cosmomc/camb'
ifort -I../camb -DNOWMAP -c ObjectLists.f90
ObjectLists.f90(22): warning #5117: Bad # preprocessor line
#ifdef SINGLE
-^
ObjectLists.f90(24): warning #5117: Bad # preprocessor line
#else
-^
ObjectLists.f90(26): warning #5117: Bad # preprocessor line
#endif
-^
ObjectLists.f90(25): error #6418: This name has already been assigned a data type. [LIST_PREC]
integer, parameter :: list_prec = Kind(1.d0)
--------------------------^
compilation aborted for ObjectLists.f90 (code 1)
make[1]: *** [ObjectLists.o] Error 1
make[1]: Leaving directory `/home/sampurn/CosmoMC/cosmomc/source'
gmake: *** [all] Error 2

Please suggest how to resolve the error.

Thanks
sampurn

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

Re: Error while compiling CosmoMC

Post by Antony Lewis » September 04 2013

Looks like you have removed -fpp from the default compiler flags - try restoring it.

Sampurn Anand
Posts: 2
Joined: January 04 2012
Affiliation: University Of Delhi

Error while compiling CosmoMC

Post by Sampurn Anand » September 04 2013

Thank you

Post Reply