Compiling CosmoMC, Matrix_utils problem

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Marit Sandstad
Posts: 1
Joined: April 20 2010
Affiliation: University of Oslo, Institute for Theoretical Astrophysics

Compiling CosmoMC, Matrix_utils problem

Post by Marit Sandstad » April 20 2010

Hi,

When trying to commpile CosmoMC, everything seems to work until I get douzens of undefined refrences in the Matrix_utils file. It seems to concern library functions and routines in the Lapack/blas library. I thought I'd managed to set up the library addresses correctly, but obviously I haven't. I've also edited the library adresses in the makefile in the camb catalouge. Are there any other files I should edit? Could anyone help me to understand more specifically which library I haven't been able to link correctly? Has anyone encountered the same problem (and solved it)?

Below is the output from running 'make all'

Code: Select all

cd ../camb && make --file=Makefile_main libcamb.a
make[1]: Entering directory `/mn/castor/u1/masan/cosmomc/camb'
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c constants.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c utils.F90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c subroutines.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c inifile.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c power_tilt.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c recfast.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c reionization.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c modules.f90
modules.f90(346): (col. 18) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
modules.f90(1564): (col. 19) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
modules.f90(1210): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
modules.f90(2412): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c bessels.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c equations.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c halofit.f90
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c lensing.f90
lensing.f90(199): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
lensing.f90(530): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
lensing.f90(724): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c cmbmain.f90
cmbmain.f90(2256): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(898): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(197): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(215): (col. 14) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(245): (col. 15) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(256): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(315): (col. 13) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(1986): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(2215): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(2160): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
cmbmain.f90(1010): (col. 7) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
mpif90 -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -c camb.f90
ar -r libcamb.a constants.o utils.o subroutines.o inifile.o power_tilt.o recfast.o reionization.o modules.o bessels.o equations.o halofit.o lensing.o cmbmain.o camb.o
make[1]: Leaving directory `/mn/castor/u1/masan/cosmomc/camb'
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c utils.F90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c ParamNames.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c Matrix_utils.F90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c settings.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c IO.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c cmbtypes.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c Planck_like.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c cmbdata.F90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c WeakLen.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c bao.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c lrggettheory.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c mpk.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c supernovae.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c HST.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c SDSSLy-a-v3.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c CMB_Cls_simple.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c paramdef.F90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c propose.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c params_CMB.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c calclike.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c conjgrad_wrapper.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c EstCovmat.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c postprocess.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c MCMC.f90
mpif90 -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP -c driver.F90
mpif90 -o ../cosmomc utils.o ParamNames.o Matrix_utils.o settings.o IO.o cmbtypes.o Planck_like.o cmbdata.o WeakLen.o bao.o lrggettheory.o mpk.o supernovae.o HST.o SDSSLy-a-v3.o CMB_Cls_simple.o paramdef.o propose.o params_CMB.o calclike.o conjgrad_wrapper.o EstCovmat.o postprocess.o MCMC.o driver.o -L../camb -lcamb -L/mn/vega/u1/hke/local/lib -lmkl_lapack -lmkl_em64t -lblas -lguide -lpthread  -DMATRIX_SINGLE -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0 -I../camb  -DNOWMAP
Matrix_utils.o: In function `matrixutils_mp_matrix_inverse_':
Matrix_utils.F90:(.text+0x182): undefined reference to `spotrf_'
Matrix_utils.F90:(.text+0x4fd): undefined reference to `spotri_'
Matrix_utils.o: In function `matrixutils_mp_matrix_inversearraympi_':
Matrix_utils.F90:(.text+0x149b): undefined reference to `spotrf_'
Matrix_utils.F90:(.text+0x1771): undefined reference to `spotri_'
Matrix_utils.o: In function `matrixutils_mp_matrix_solveasymm_':
Matrix_utils.F90:(.text+0x591f): undefined reference to `sgetrf_'
Matrix_utils.F90:(.text+0x5b63): undefined reference to `sgetrs_'
Matrix_utils.o: In function `matrixutils_mp_matrix_solvesymm_':
Matrix_utils.F90:(.text+0x6364): undefined reference to `ssytrf_'
Matrix_utils.F90:(.text+0x65fa): undefined reference to `ssytrs_'
Matrix_utils.o: In function `matrixutils_mp_matrix_csvd_allvt_':
Matrix_utils.F90:(.text+0x7101): undefined reference to `cgesdd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_csvd_u_':
Matrix_utils.F90:(.text+0x76d7): undefined reference to `cgesdd_'
Matrix_utils.F90:(.text+0x7abd): undefined reference to `cgesvd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_csvd_vt_':
Matrix_utils.F90:(.text+0x7fb7): undefined reference to `cgesdd_'
Matrix_utils.F90:(.text+0x8393): undefined reference to `cgesvd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_svd_vt_':
Matrix_utils.F90:(.text+0x86bc): undefined reference to `sgesdd_'
Matrix_utils.F90:(.text+0x8855): undefined reference to `sgesdd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_svd_':
Matrix_utils.F90:(.text+0x8abe): undefined reference to `sgesvd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_inverseasymm_':
Matrix_utils.F90:(.text+0x9049): undefined reference to `sgesvd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_gaussianloglikedouble_':
Matrix_utils.F90:(.text+0xa845): undefined reference to `dpotrf_'
Matrix_utils.F90:(.text+0xafbf): undefined reference to `dpotrs_'
Matrix_utils.o: In function `matrixutils_mp_matrix_cholesky_':
Matrix_utils.F90:(.text+0xb955): undefined reference to `spotrf_'
Matrix_utils.o: In function `matrixutils_mp_matrix_gaussianloglike_':
Matrix_utils.F90:(.text+0xbff2): undefined reference to `spotrf_'
Matrix_utils.F90:(.text+0xc720): undefined reference to `spotrs_'
Matrix_utils.o: In function `matrixutils_mp_matrix_inverse_chol_':
Matrix_utils.F90:(.text+0xd055): undefined reference to `spotrf_'
Matrix_utils.F90:(.text+0xd335): undefined reference to `spotri_'
Matrix_utils.F90:(.text+0xdc9c): undefined reference to `spotrf_'
Matrix_utils.o: In function `matrixutils_mp_matrix_ccholesky_':
Matrix_utils.F90:(.text+0xe2c5): undefined reference to `cpotrf_'
Matrix_utils.o: In function `matrixutils_mp_matrix_ccholeskyrootinverse_':
Matrix_utils.F90:(.text+0xe702): undefined reference to `cpotrf_'
Matrix_utils.F90:(.text+0xe93e): undefined reference to `ctrtri_'
Matrix_utils.o: In function `matrixutils_mp_matrix_choleskyrootinverse_':
Matrix_utils.F90:(.text+0xf25a): undefined reference to `spotrf_'
Matrix_utils.F90:(.text+0xf5d4): undefined reference to `strtri_'
Matrix_utils.o: In function `matrixutils_mp_matrixsym_logdet_':
Matrix_utils.F90:(.text+0x1d069): undefined reference to `spotrf_'
Matrix_utils.o: In function `matrixutils_mp_matrix_cdiagonalize_':
Matrix_utils.F90:(.text+0x1dbbd): undefined reference to `cheevd_'
Matrix_utils.o: In function `matrixutils_mp_matrix_cdiagonalize_partial_':
Matrix_utils.F90:(.text+0x1e163): undefined reference to `cheevr_'
Matrix_utils.F90:(.text+0x1e4f3): undefined reference to `cheevr_'
Matrix_utils.o: In function `matrixutils_mp_matrix_diagonalize_partial_':
Matrix_utils.F90:(.text+0x1ed37): undefined reference to `ssyevr_'
Matrix_utils.F90:(.text+0x1eff5): undefined reference to `ssyevr_'
Matrix_utils.o: In function `matrixutils_mp_matrix_diagonalize_':
Matrix_utils.F90:(.text+0x1f610): undefined reference to `ssyev_'
Matrix_utils.o: In function `matrixutils_mp_matrix_root_':
Matrix_utils.F90:(.text+0x1f843): undefined reference to `ssyev_'
Matrix_utils.o: In function `matrixutils_mp_matrix_diagonalize_dc_':
Matrix_utils.F90:(.text+0x20300): undefined reference to `ssyevd_'
Best regards
Marit

Thomas Cailleteau
Posts: 3
Joined: April 23 2010
Affiliation: LPSC grenoble

Compiling CosmoMC, Matrix_utils problem

Post by Thomas Cailleteau » April 23 2010

I solve not the problem, I have just encountered the same trouble, but apparently it seems to come from LAPACKL. I have seen many answers on internet, but any of them solved it.
In the Makefile, I use

Code: Select all

 LAPACKL = /usr/local/mkl/10.2.3.029/lib -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -libguide -lmkl_intel_thread -static
Something I need to change or add ?

Thomas

Noble P Abraham
Posts: 9
Joined: July 31 2008
Affiliation: School of Pure and Applied Physics, Mahatma Gandhi University, Kottayam

Compiling CosmoMC, Matrix_utils problem

Post by Noble P Abraham » April 26 2010

Though not exactly in the context of the problem reported, it is possible to remove errors due to LAPACKL by running (I assume Intel mkl)

Code: Select all

 source /path/to/mkl/tools/environment/mklvarsem64t.sh
or (specifically)

Code: Select all

source /usr/local/mkl/10.2.3.029/tools/environment/mklvarsem64t.sh
before starting compile process in the terminal. Change mklvarsem64t.sh to the one appropriate in your system. (On a Core2Duo running Ubuntu 64-bit mklvarsem64t.sh was fine.)

Then change the Makefile entry to

Code: Select all

LAPACKL = -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -libguide -lmkl_intel_thread -static
instead of

Code: Select all

LAPACKL = /usr/local/mkl/10.2.3.029/lib -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -libguide -lmkl_intel_thread -static
You may need to change all Makefiles accordingly. Please reply if it does work.

Thomas Cailleteau
Posts: 3
Joined: April 23 2010
Affiliation: LPSC grenoble

Compiling CosmoMC, Matrix_utils problem

Post by Thomas Cailleteau » April 26 2010

Thank you Noble, but sadly it doesn't change anything, but I have found the problem : In fact, in the repertory

Code: Select all

/usr/local/intel/mkl/10.2.3.029/lib/em64t
which contains

Code: Select all

libguide.a                      libmkl_blas95_ilp64.a  libmkl_intel_lp64.so       libmkl_scalapack_lp64.a
libguide.so                     libmkl_blas95_lp64.a   libmkl_intel_sp2dp.a       libmkl_scalapack_lp64.so
libiomp5.a                      libmkl_cdft_core.a     libmkl_intel_sp2dp.so      libmkl_sequential.a
libiomp5.so                     libmkl_core.a          libmkl_intel_thread.a      libmkl_sequential.so
libmkl_avx.so                   libmkl_core.so         libmkl_intel_thread.so     libmkl_solver_ilp64.a
libmkl_blacs_ilp64.a            libmkl_def.so          libmkl_lapack.so           libmkl_solver_ilp64_sequential.a
libmkl_blacs_intelmpi_ilp64.a   libmkl_gf_ilp64.a      libmkl_lapack95_ilp64.a    libmkl_solver_lp64.a
libmkl_blacs_intelmpi_ilp64.so  libmkl_gf_ilp64.so     libmkl_lapack95_lp64.a     libmkl_solver_lp64_sequential.a
libmkl_blacs_intelmpi_lp64.a    libmkl_gf_lp64.a       libmkl_mc.so               libmkl_vml_avx.so
libmkl_blacs_intelmpi_lp64.so   libmkl_gf_lp64.so      libmkl_mc3.so              libmkl_vml_def.so
libmkl_blacs_lp64.a             libmkl_gnu_thread.a    libmkl_p4n.so              libmkl_vml_mc.so
libmkl_blacs_openmpi_ilp64.a    libmkl_gnu_thread.so   libmkl_pgi_thread.a        libmkl_vml_mc2.so
libmkl_blacs_openmpi_lp64.a     libmkl_intel_ilp64.a   libmkl_pgi_thread.so       libmkl_vml_mc3.so
libmkl_blacs_sgimpt_ilp64.a     libmkl_intel_ilp64.so  libmkl_scalapack_ilp64.a   libmkl_vml_p4n.so
libmkl_blacs_sgimpt_lp64.a      libmkl_intel_lp64.a    libmkl_scalapack_ilp64.so  locale
the file libmkl_lapack.a is missing. My version of LAPACK is not good, but it works with an older version.
I hope, Marit, it solves your problem too.

Noble P Abraham
Posts: 9
Joined: July 31 2008
Affiliation: School of Pure and Applied Physics, Mahatma Gandhi University, Kottayam

Compiling CosmoMC, Matrix_utils problem

Post by Noble P Abraham » April 29 2010

I am using Intel MKL 10.0.3.020 and had no problem compiling.

But before getting 10.0.3.020 or older ones, make sure that you are sourcing the correct script.

If your processor comes under EM64T category you should go for mklvarsem64t.sh. Otherwise you should go for mklvars64.sh or mklvars32.sh.
Thomas, From your LAPACKL entry I feel you should do

Code: Select all

 source /usr/local/mkl/10.2.3.029/tools/environment/mklvars64.sh
OR if you are sure EM64T is true, changing LAPACKL as below may help

Code: Select all

LAPACKL = -lmkl_lapack -lmkl_em64t -lmkl_core -libguide -lmkl_intel_thread -static
The one worked for me is below

Code: Select all

LAPACKL = -lguide -lpthread -lmkl_lapack -lmkl_em64t

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

Re: Compiling CosmoMC, Matrix_utils problem

Post by Sheng Li » May 06 2010

Hi..
My problem is the same one with yours.
And i checked the files in DIR of Intel 10.X.X.X and the files in DIR of intel/../11.1/046/...
In the later one, there is no libmkl.so or libmkl.a in that DIR.
so option "-lmkl" in Makefile seems incorrect, or at least it maight be replaced by sth else.... But i did not get the right one, though i tried many possibilites so far..

I should guess the files in DIR of intel 'mkl' or 'lapack' have been changed.
Does it make sense?


Noble P Abraham wrote:I am using Intel MKL 10.0.3.020 and had no problem compiling.

But before getting 10.0.3.020 or older ones, make sure that you are sourcing the correct script.

If your processor comes under EM64T category you should go for mklvarsem64t.sh. Otherwise you should go for mklvars64.sh or mklvars32.sh.
Thomas, From your LAPACKL entry I feel you should do

Code: Select all

 source /usr/local/mkl/10.2.3.029/tools/environment/mklvars64.sh
OR if you are sure EM64T is true, changing LAPACKL as below may help

Code: Select all

LAPACKL = -lmkl_lapack -lmkl_em64t -lmkl_core -libguide -lmkl_intel_thread -static
The one worked for me is below

Code: Select all

LAPACKL = -lguide -lpthread -lmkl_lapack -lmkl_em64t

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

Compiling CosmoMC, Matrix_utils problem

Post by Sheng Li » May 06 2010

another thing,
In my pc, when i was installing "intel fortran/c compilers" i got two errors.
1): cannot determine the system type.....
2): glibc or kernel are not supported, or not detectable...

But i can continue installing, in the same while it said ...ld probably can not function. (sth like that.. i can not rephrase them all)

Configuration if MY pc/enviroment:
CPU: 1 xeon w5590
OS: CentOS 5.4 final (non xen)
Compilers: Intel F/C, mpi wrapper (use mpif90), g95, gfortran, g++
LIBs: intel MKL, lapack (is it located in intel/mkl/....?), healpix, cfitsio, wmap7-full,
GPU: ......

Someday, i found intel compiler seems cooperate with xeon CPU well... but currently i can not find it out...

anyideas?
I was sucked in tunning CosmoMC and WMAP7 for a long time...

Thanks a lot for any advice..

Noble P Abraham
Posts: 9
Joined: July 31 2008
Affiliation: School of Pure and Applied Physics, Mahatma Gandhi University, Kottayam

Compiling CosmoMC, Matrix_utils problem

Post by Noble P Abraham » May 07 2010

Steven Lie
Is your CentOS 64bit/32bit? (Try uname -a)
If 64bit (x86_64) and you have Intel MKL installed, you may have to run source /path/to/mkl/x.x.x.x/tools/environment/mklvarsem64t.sh , since your CPU is xeon w5590
and in your /path/to/mkl/x.x.x.x/lib/em64t/ you should have

libmkl_lapack.a
libmkl_em64t.a

for using the options

-lmkl_lapack -lmkl_em64t

Please post your Makefile in your reply, may be someone with more expertise can correct it.

Thomas Cailleteau

What is your status? Is it working correctly? If it is OK, please post how you corrected it?

Thank you

Noble

Thomas Cailleteau
Posts: 3
Joined: April 23 2010
Affiliation: LPSC grenoble

Compiling CosmoMC, Matrix_utils problem

Post by Thomas Cailleteau » May 07 2010

Hi Noble,

thank you for your answer. In my case, compilling

Code: Select all

 source /path/to/mkl/tools/environment/mklvarsem64t.sh
before, or

Code: Select all

LAPACKL = /usr/local/mkl/10.2.3.029/lib -lmkl_lapack -lmkl_intel_lp64 -lmkl_core -libguide -lmkl_intel_thread -static
work exactly in the same way. In fact, my trouble was due to the lack of the "libmkl_lapack.a" on my computer. But now it's corrected.

Thomas

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

Re: Compiling CosmoMC, Matrix_utils problem

Post by Sheng Li » May 07 2010

Thank you so much...

1st PC:
uname -m => x86_64
uname -a => Linux 2.6.18-164.6.1.el5.centos.plus x86_64 GNU/Linux

2nd PC
Boot Info says...
CentOS 5.4 (final) --- I logon it with NON XEN.
uname -m => x86_64
uname -a => I can't remember them all, coz i am not operating this pc currently...

These two pcs, I think there is no main difference.

As for [LIBS]:
Unlucky, in my two desktops, I linkd to intel/Compiler/11.1/046/mkl/lib/em64t
---I doubt whether this dir is correct for linking mkl and lapack.----

entering this directory,
1st PC;
NO libmkl_em64t.a
NO libmkl_lapack.a

2nd PC:
the same.

Makefile for cosmomc

##Uncomment the next line to include dr7 LRG
EXTDATA =
#EXTDATA = LRG

#set WMAP empty not to compile with WMAP
WMAP = ../../WMAP7/likelihood_v4

#Only needed for WMAP
cfitsio = ../../cfitsio

#GSL only needed for DR7 LRG
GSLPATH = /usr/local

IFLAG = -I
INCLUDE=

#Intel MPI (assuming mpif77 set to point to ifort)
#change -lmkl_ia32 to -lmkl_p3 for MKL versions earlier than 6 (6 needed for ifc 8+)
F90C = ~/mpif90
FFLAGS = -O2 -ip -W0 -WB -openmp -fpp -DMPI -vec_report0
LAPACKL = -L/local64/intel/Compiler/11.1/046/mkl/lib/em64t -lguide -lmkl_lapack -lpthread
#-L/usr/local/intel/mkl/9.1/lib/em64t -lmkl_lapack -lmkl_em64t -lguide -lpthread
#

#HPCF settings. Use Inteal 9 or 10.1+, not 10.0
#F90C = mpif90
#FFLAGS = -O2 -Vaxlib -W0 -WB -openmp -fpp -DMPI -vec_report0
#LAPACKL = -L/usr/local/Cluster-Apps/intel/mkl/10.2.2.025/lib/em64t -lmkl_lapack -lmkl -lguide -lpthread
#GSLPATH = /usr/local/Cluster-Apps/gsl/1.9
#cfitsio = /usr/local/Cluster-Users/cpac/cmb/2.1.0/cfitsio
#INCLUDE=

#COSMOS: use "module load cosmolib latest"
#use "runCosmomc" (globally installed) to run, defining required memory usage
ifeq ( \$(COSMOHOST), cosmos)
F90C = ~/ifort
FFLAGS = -openmp -O3 -w -fpp2 -DMPI
LAPACKL = -mkl=sequential -lmkl_lapack -lmpi
cfitsio = \$(CFITSIO)
WMAP = \$(COSMOLIB)/WMAP7
GSLPATH = \$(GSL_ROOT)
endif

#Can use params_H if you prefer more generic parameters
PARAMETERIZATION = params_CMB.o

F90FLAGS = -DMATRIX_SINGLE \$(FFLAGS) \$(IFLAG)../camb \$(INCLUDE)
LINKFLAGS = -L../camb -lcamb \$(LAPACKL)

....

Sorry for posting so long pages
Please check it in attachment...
Makefile

Thank you.
Noble P Abraham wrote:Steven Lie
Is your CentOS 64bit/32bit? (Try uname -a)
If 64bit (x86_64) and you have Intel MKL installed, you may have to run source /path/to/mkl/x.x.x.x/tools/environment/mklvarsem64t.sh , since your CPU is xeon w5590
and in your /path/to/mkl/x.x.x.x/lib/em64t/ you should have

libmkl_lapack.a
libmkl_em64t.a

for using the options

-lmkl_lapack -lmkl_em64t

Please post your Makefile in your reply, may be someone with more expertise can correct it.

Thomas Cailleteau

What is your status? Is it working correctly? If it is OK, please post how you corrected it?

Thank you

Noble

Noble P Abraham
Posts: 9
Joined: July 31 2008
Affiliation: School of Pure and Applied Physics, Mahatma Gandhi University, Kottayam

Compiling CosmoMC, Matrix_utils problem

Post by Noble P Abraham » May 10 2010

Do you have libmkl_lapack.a in intel/Compiler/11.1/046/mkl/lib/64?
If yes, try

Code: Select all

LAPACKL = -L/local64/intel/Compiler/11.1/046/mkl/lib/64 -lguide -lmkl_lapack -lpthread
Also, if you have libmkl_intel_lp64.a
add the option -lmkl_lp64 to LAPACKL

Please don't treat me as an expert, these are some of the ways I tried to install cosmomc for me.

Experts please respond!

I think it is high time that Site Admin publish a list of successfully working environments and configurations (either a single machine or cluster) of COSMOMC.

CoffeePot, please remove my post (http://cosmocoffee.info/viewtopic.php?t=1577) and start a new authentic sticky topic.

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

Re: Compiling CosmoMC, Matrix_utils problem

Post by Sheng Li » May 10 2010

Thank you.

1): No ../lib/64 in department pc;
2): Yes ../lib/64 in my pc;

But
1): instead of /lib/em64t, i find the files all you said.
2): the same as above;

result:
1): can not compile;
2): not tested coz i am not using it now....
I usually use department pc..

SO, sum up
Wondering since the files exist, why "make all" can not compile through?

Noble P Abraham wrote:Do you have libmkl_lapack.a in intel/Compiler/11.1/046/mkl/lib/64?
If yes, try

Code: Select all

LAPACKL = -L/local64/intel/Compiler/11.1/046/mkl/lib/64 -lguide -lmkl_lapack -lpthread
Also, if you have libmkl_intel_lp64.a
add the option -lmkl_lp64 to LAPACKL

Please don't treat me as an expert, these are some of the ways I tried to install cosmomc for me.

Experts please respond!

I think it is high time that Site Admin publish a list of successfully working environments and configurations (either a single machine or cluster) of COSMOMC.

CoffeePot, please remove my post (http://cosmocoffee.info/viewtopic.php?t=1577) and start a new authentic sticky topic.

Sheng Li
Posts: 57
Joined: May 26 2009
Affiliation: University of Sussex
Contact:

Compiling CosmoMC, Matrix_utils problem

Post by Sheng Li » May 10 2010

So, for easy finding the problem, i uploaded my configure files including logon bash file, and Makefile in wmap7 and camb and cosmomc_source folders..

see up_files~
I can make through in camb/, but others it did not work.
Can sb mark out my faulty?
Thank you very much..

.bashrc

.bash_profile

Makefile_Cosmo_Souce

Makefile_camb

Makefile_wmap7

Post Reply