Error compiling Cosmomc (lmkl_intel_lp64)

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mastache, Jorge
Posts: 6
Joined: June 16 2011
Affiliation: MCTP

Error compiling Cosmomc (lmkl_intel_lp64)

Post by Mastache, Jorge » June 14 2017

When I compile cosmomc I get the following error:

Code: Select allp>

mpif90 -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -I../camb/ReleaseMPI  -module ReleaseMPI -IReleaseMPI/ -c CosmologyConfig.f90 -o ReleaseMPI/CosmologyConfig.o
mpif90 -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -I../camb/ReleaseMPI  -module ReleaseMPI -IReleaseMPI/ -c driver.F90 -o ReleaseMPI/driver.o
mpif90 -o ../cosmomc ReleaseMPI/MiscUtils.o ReleaseMPI/ArrayUtils.o ReleaseMPI/StringUtils.o ReleaseMPI/MpiUtils.o ReleaseMPI/FileUtils.o ReleaseMPI/RandUtils.o ReleaseMPI/ObjectLists.o ReleaseMPI/Interpolation.o ReleaseMPI/IniObjects.o ReleaseMPI/ObjectParamNames.o ReleaseMPI/Matrix_utils_new.o  ReleaseMPI/settings.o ReleaseMPI/samples.o ReleaseMPI/IO.o ReleaseMPI/likelihood.o ReleaseMPI/GeneralTypes.o ReleaseMPI/BaseParameters.o ReleaseMPI/propose.o ReleaseMPI/ParamSet.o ReleaseMPI/PowellConstrainedMinimize.o ReleaseMPI/ImportanceSampling.o ReleaseMPI/MCMC.o ReleaseMPI/minimize.o ReleaseMPI/SampleCollector.o ReleaseMPI/GeneralSetup.o ReleaseMPI/CosmologyTypes.o ReleaseMPI/CosmoTheory.o ReleaseMPI/bbn.o ReleaseMPI/Calculator_Cosmology.o ReleaseMPI/CalcLike_Cosmology.o ReleaseMPI/Likelihood_Cosmology.o ReleaseMPI/Calculator_CAMB.o ReleaseMPI/CMB_BK_Planck.o ReleaseMPI/mpk.o ReleaseMPI/wigglez.o ReleaseMPI/bao.o ReleaseMPI/supernovae_Union2.o ReleaseMPI/supernovae_SNLS.o ReleaseMPI/supernovae_JLA.o ReleaseMPI/szcounts.o ReleaseMPI/supernovae.o ReleaseMPI/HST.o  ReleaseMPI/CMB.o ReleaseMPI/CMBlikes.o ReleaseMPI/ElementAbundances.o ReleaseMPI/wl.o ReleaseMPI/CosmologyParameterizations.o ReleaseMPI/DataLikelihoods.o ReleaseMPI/calclike.o ReleaseMPI/CosmologyConfig.o ReleaseMPI/driver.o -L../camb/ReleaseMPI -lcamb_recfast     -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -I../camb/ReleaseMPI  -module ReleaseMPI -IReleaseMPI/
ld: warning: directory not found for option '-L:/opt/intel/mkl/lib'
ld: library not found for -lmkl_intel_lp64
make[1]: *** [cosmomc] Error 1
make: *** [cosmomc] Error 2
The error is because the link to the MKL library is not found, or the name of library is also wrong. Now, what is weird to me is that this directory /opt/intel/mkl/lib does exist, and it contains the files libmkl_intel_lp64.a, and libmkl_intel_lp64.dylib

It could be that just the name lmkl_intel_lp64 is wrong, I look for that name in all cosmomc's files but I have no results find it. I then look in plc's files and I change in [] file the part called "mkl_options" from lmkl_intel_lp64 -> libmkl_intel_lp64. I re-compile plc which by the way, I successfully compiled plc, this means I have MKL installed. Though the error in cosmomc still persist.

Does anyone knows where does the error could came from? or how can I fix this?

Thanks in advance!

Ira *Wolfson
Posts: 64
Joined: January 24 2013
Affiliation: BGU

Error compiling Cosmomc (lmkl_intel_lp64)

Post by Ira *Wolfson » June 14 2017

You have a problem with the -L option....

Its not -L:/...

Instead define

MKLPATH= /path/to/mkl

And in the L options:

-L$(MKLPATH) -lmkl_intel_lp64 ..... etc

Post Reply