help reqd with cosmomc

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 09 2008

I am trying to compile cosmomc as a generic sampler on a 8-core 64-bit machine. I have installed intel fortran comiler 10.1 and intel MKL 10.0

In the subdirectory sources, tried to compile using sh Makefile_nowmap, but didnt succeed.

I used the following options ...
F90C = ifort
FFLAGS = openmp -O2 -ip -W0 -WB -fpp2 -vec_report0
LAPACKL = -L/usr/local/intel/mkl/10.0.4.023/lib/64 -lmkl_lapack -lmkl_ia64 -lguide -lpthread

I compiled make all in the subdirectory camb with the same FFLAGS, and it worked...

uncommenting other different ifort options didnt help.

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

help reqd with cosmomc

Post by Pascal Vaudrevange » September 09 2008

Could you post the error messages that you get when running make?

Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 10 2008

Makefile_nowmap: 7: IFLAG: not found
Makefile_nowmap: 12: F90C: not found
Makefile_nowmap: 13: FFLAGS: not found
Makefile_nowmap: 14: LAPACKL: not found
Makefile_nowmap: 104: PROPOSE: not found
Makefile_nowmap: 105: CLSFILE: not found
Makefile_nowmap: 108: PARAMETERIZATION: not found
Makefile_nowmap: 110: LAPACKL: not found
Makefile_nowmap: 110: CLSLIB: not found
Makefile_nowmap: 112: FFLAGS: not found
Makefile_nowmap: 112: IFLAG: not found
Makefile_nowmap: 112: INCLUDE: not found
Makefile_nowmap: 112: F90FLAGS: not found
Makefile_nowmap: 114: DISTFILES: not found
Makefile_nowmap: 118: CLSFILE: not found
Makefile_nowmap: 118: PROPOSE: not found
Makefile_nowmap: 118: PARAMETERIZATION: not found
Makefile_nowmap: 118: utils.o: not found
Makefile_nowmap: 120: default:: not found
Makefile_nowmap: 122: all: not found
Makefile_nowmap: 124: .f.o:: not found
Makefile_nowmap: 125: Syntax error: newline unexpected

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

help reqd with cosmomc

Post by Pascal Vaudrevange » September 10 2008

Hi Satej,

It looks like you should try running

Code: Select all

make -f Makefile_nowmap
Pascal

Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 12 2008

my the lib/64 subdirectory inside /mkl/10.0.4.023/ has the following files....

libguide.a
libguide.so*
libiomp5.a
libiomp5.so*
libmkl_blacs_ilp64.a
libmkl_blacs_intelmpi20_ilp64.a
libmkl_blacs_intelmpi20_lp64.a
libmkl_blacs_intelmpi_ilp64.a
libmkl_blacs_intelmpi_lp64.a
libmkl_blacs_lp64.a
libmkl_blacs_openmpi_ilp64.a
libmkl_blacs_openmpi_lp64.a
libmkl_blacs_sgimpt_ilp64.a
libmkl_blacs_sgimpt_lp64.a
libmkl_blas95.a*
libmkl_cdft.a
libmkl_cdft_core.a
libmkl_core.a
libmkl_core.so*
libmkl_gf_ilp64.a
libmkl_gf_ilp64.so*
libmkl_gf_lp64.a
libmkl_gf_lp64.so*
libmkl_gnu_thread.a
libmkl_gnu_thread.so*
libmkl_i2p.so*
libmkl_intel_ilp64.a
libmkl_intel_ilp64.so*
libmkl_intel_lp64.a
libmkl_intel_lp64.so*
libmkl_intel_sp2dp.a
libmkl_intel_sp2dp.so*
libmkl_intel_thread.a
libmkl_intel_thread.so*
libmkl_ipf.a
libmkl_lapack95.a*
libmkl_lapack.a
libmkl_lapack.so*
libmkl_scalapack.a
libmkl_scalapack_ilp64.a
libmkl_scalapack_lp64.a
libmkl_sequential.a
libmkl_sequential.so*
libmkl.so*
libmkl_solver.a
libmkl_solver_ilp64.a
libmkl_solver_ilp64_sequential.a
libmkl_solver_lp64.a
libmkl_solver_lp64_sequential.a
libmkl_vml_i2p.so*
mkl95_blas.mod*
mkl95_lapack.mod*
mkl95_precision.mod*

these are slightly different than those mentioned by Antony.... Which ones should I link in the following line?

Code: Select all

-L/usr/local/intel/mkl/10.0.4.023/lib/64 -lmkl_lapack -lmkl_ia64 -lguide -lpthread

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

help reqd with cosmomc

Post by Pascal Vaudrevange » September 12 2008

Hi Satej,

if you did not change the default size of integers, I think you should use

Code: Select all

-L/usr/local/intel/mkl/10.0.4.023/lib/64 -lmkl_lapack -lmkl_intel_lp64 -lguide -lpthread
or alternatively if the above does not work, try

Code: Select all

-L/usr/local/intel/mkl/10.0.4.023/lib/64 -lmkl_lapack -lmkl_intel_lp64 -lguide -lmkl_intel_thread
Pascal

p.s. If you feel curious, read up about Makefiles http://www.gnu.org/software/make/manual ... index.html and linking http://www.network-theory.co.uk/docs/gc ... ro_17.html.

Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 12 2008

Hi Pascal,

Thanks a lot for all your help, in particular I am grateful to you for pointing out the 2 articles to me. However this still fails to compile....

I get the following message (for both the options that you suggested).....

ifort -o ../cosmomc utils.o Matrix_utils.o settings.o cmbtypes.o Planck_like.o cmbdata.o WeakLen.o mpk.o supernovae.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/usr/local/intel/mkl/10.0.4.023/lib/64 -lmkl_lapack -lmkl_intel_lp64 -lguide -lpthread -DMATRIX_SINGLE -DNOWMAP -O2 -ip -W0 -WB -fpp2 -vec_report0 -I../camb
ld: skipping incompatible /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_lapack.so when searching for -lmkl_lapack
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a(_DftiCreateDescriptorDM1_fortran_lp64.o): warning: sh_link not set for section `.IA_64.unwind'
ld: skipping incompatible /usr/local/intel/mkl/10.0.4.023/lib/64/libmkl_intel_lp64.a when searching for libmkl_intel_lp64.a
ld: cannot find libmkl_intel_lp64.a
make: *** [cosmomc] Error 1

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

help reqd with cosmomc

Post by Pascal Vaudrevange » September 12 2008

Hi Satej,

no problem. It's kind of tricky to get things right the first time :) Two more suggestions:

1.) Did you run the shell-script that comes with the Intel mkl?

and even more importantly:

2.) On what kind of processor and operating system (i.e. 32bit version of your distro or 64bit version?) are you compiling? Is it 64bit or 32bit?

Pascal

Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 13 2008

It is a Xeon (8 core) processor and I have ubuntu (8.04) 64 bit version installed on it. I realize that probably I should be referring to em64t in place of 64 for Xeon processor.

So I tried to redo the whole procedure for the em64t
I get the following output.... (with lmkl_intel_thread)
ifort -o ../cosmomc utils.o Matrix_utils.o settings.o cmbtypes.o Planck_like.o cmbdata.o WeakLen.o mpk.o supernovae.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/usr/local/intel/mkl/10.0.4.023/lib/em64t -lmkl_lapack -lmkl_intel_lp64 -lguide -lmkl_intel_thread -DMATRIX_SINGLE -DNOWMAP -O2 -ip -W0 -WB -fpp2 -vec_report0 -I../camb
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: undefined reference to `mkl_spblas_lp64_mkl_dcoosv'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `__mkl_cfg_file_readed_extern'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_serv_lsame'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `xerbla_'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: undefined reference to `mkl_spblas_lp64_mkl_dcsrsv'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_thread.so: undefined reference to `mkl_serv_load_lapack_dll'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_serv_deallocate'
make: *** [cosmomc] Error 1
(only some of the many lines are mentioned here)


and following output with lpthread ....
ifort -o ../cosmomc utils.o Matrix_utils.o settings.o cmbtypes.o Planck_like.o cmbdata.o WeakLen.o mpk.o supernovae.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/usr/local/intel/mkl/10.0.4.023/lib/em64t -lmkl_lapack -lmkl_intel_lp64 -lguide -lpthread -DMATRIX_SINGLE -DNOWMAP -O2 -ip -W0 -WB -fpp2 -vec_report0 -I../camb
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: undefined reference to `mkl_dft_xcforward'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: undefined reference to `mkl_spblas_lp64_mkl_dcoosv'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_lapack_cpptrs'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_lapack_claeh2'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_intel_lp64.so: undefined reference to `mkl_pde_tt_d_commit_trig_transform'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_lapack_cgbtrf'
make: *** [cosmomc] Error 1

On unpacking the MKL tar file, I ran install.sh

I then added the following to my .bashrc (in both root as well as user A/c) .....
source /usr/local/intel/fce/10.1.018/bin/ifortvars.sh
/usr/local/intel/mkl/10.0.4.023/tools/environment/mklvarsem64t.sh

I also built the lapack and blas libraries using ....
make PLAT=lnx32e lib

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

help reqd with cosmomc

Post by Pascal Vaudrevange » September 15 2008

Hi Satej,

it looks like the linking procedure for the Intel MKL changed from MKL 9.x to 10.x. Take a look at page 47 of the Intel MKL Handbook

http://softwarecommunity.intel.com/isn/ ... 347460.pdf

which explains the changes and gives some examples how to link.

Pascal

Satej Khedekar
Posts: 12
Joined: September 21 2006
Affiliation: TIFR
Contact:

help reqd with cosmomc

Post by Satej Khedekar » September 16 2008

Hi Pascal,

Sorry to bother you once more.

I tried

Code: Select all

LAPACKL = -L/usr/local/intel/mkl/10.0.4.023/lib/em64t -lmkl_lapack -lmkl_em64t
&

Code: Select all

LAPACKL = -L/usr/local/intel/mkl/10.0.4.023/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -libmkl_core
....however both give errors like .....
__tmp_ssytd3_omp.f:(.text+0x212a): undefined reference to `__kmpc_serialized_parallel'
__tmp_ssytd3_omp.f:(.text+0x21b3): undefined reference to `__kmpc_end_serialized_parallel'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_serv_load_fun'
/usr/local/intel/mkl/10.0.4.023/lib/em64t/libmkl_lapack.so: undefined reference to `mkl_serv_load_dll'
make: *** [cosmomc] Error 1

Could there be an incompatibility with version 10 of MKL? I downloaded ver 9.0 however I cant get the installer running as Intel provides SN only for the latest version, i.e. version 10 & this SN does not work with ver 9.0

Post Reply