CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

Installing Planck likelihood
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Albin Nilsson



Joined: 05 Oct 2016
Posts: 13
Affiliation: NCBJ, Warsaw

PostPosted: October 05 2016  Reply with quote

I am trying to install the Planck likelihood using waf, but I am getting an error which I have no idea what to do with.
* The system is Ubuntu 16.04
* MKL is installed in /opt/intel/mkl, this directory is saved in the link $MKLROOT
The command './waf configure –lapack_mkl=/opt/intel/mkl –install_all_deps
'gives me the following error:

Code:
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Getting pyembed flags from python-config                           : yes
Checking for library dl                                            : yes
checking for RTLD_DEFAULT in dl                                    : no
Checking for program 'pmc-config'                                  : not found
Checking for library pmc                                           : not found
Check mkl version                                                  : 10.3
create specific mkl lib                                            : Command 'gcc -shared -Bdynamic  -u dposv_ -u dtrsv_ -u dpotrf_ -u dpotrs_ -u dpotri_ -u dtrtri_ -u dtrmm_ -u dtrmv_ -u dgeqrf_ -u dormqr_ -u dsyev_ -u dgesvd_ -u dsymv_ -u dgemv_ -u dgemm_ -u dsyrk_ -u dsyr2k_ -u daxpy_ -u dtrsm_ -u dsymm_ -u dsyr_ -u ddot_ -u dsyevd_ -u dlamch_ -u dsyevr_  -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/mkl/lib/intel64/libmkl_core.a  -Wl,--end-group -L/home/koldrakan/Cosmological_Codes/planck/cosmology/likelihood/plc-2.0 -liomp5 -lpthread -lm -o "/home/koldrakan/Cosmological_Codes/planck/cosmology/likelihood/plc-2.0/lib/libclik_mkl.so" ' returned 1


Does anyone have any idea what to do about this? Any help would be greatly appreciated
Back to top
View user's profile  
Karim Benabed



Joined: 18 Dec 2008
Posts: 5
Affiliation: Institut d'Astrophysique de Paris

PostPosted: October 06 2016  Reply with quote

Hi

That's the part where a self contained mkl dynamical lib is created to avoid having to link to different libs depending on your particular architecture.

What version of the mkl are you using ?

What happens if you run :

gcc -shared -Bdynamic -u dposv_ -u dtrsv_ -u dpotrf_ -u dpotrs_ -u dpotri_ -u dtrtri_ -u dtrmm_ -u dtrmv_ -u dgeqrf_ -u dormqr_ -u dsyev_ -u dgesvd_ -u dsymv_ -u dgemv_ -u dgemm_ -u dsyrk_ -u dsyr2k_ -u daxpy_ -u dtrsm_ -u dsymm_ -u dsyr_ -u ddot_ -u dsyevd_ -u dlamch_ -u dsyevr_ -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -o libclik_mkl_TEST.so
Back to top
View user's profile  
Albin Nilsson



Joined: 05 Oct 2016
Posts: 13
Affiliation: NCBJ, Warsaw

PostPosted: October 06 2016  Reply with quote

Hi, thank you for replying.

I am running MKL version 10.3. The command you provided throws the following:

Code:
/usr/bin/ld: cannot find -liomp5
collect2: error: ld returned 1 exit status


so presumably I am missing liomp5?
Back to top
View user's profile  
Karim Benabed



Joined: 18 Dec 2008
Posts: 5
Affiliation: Institut d'Astrophysique de Paris

PostPosted: October 06 2016  Reply with quote

could you send me the full result of the ./waf configure command ?

Which C and F90 compiler are you using ?
Back to top
View user's profile  
Albin Nilsson



Joined: 05 Oct 2016
Posts: 13
Affiliation: NCBJ, Warsaw

PostPosted: October 06 2016  Reply with quote

I am using gcc and gfortran, but newest versions from the Ubuntu repositories.
I have actually tried this on a second machine now, and it encounters the same problem.
I run the following command (MKL is installed in the default directory /opt/intel):
Code:
./waf configure --install_all_deps --lapack_mkl=/opt/intel/


The output is the following:
Code:
Setting top to                           : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0
Setting out to                           : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/build
Checking for program 'gcc, cc'           : /usr/bin/gcc
Checking for program 'ar'                : /usr/bin/ar
Check gcc version                        : 5.4.0
Compile a test code with gcc             :
yes
Setting architecture flag to             : ['-m64']
Checking for $CC option to support OpenMP : -fopenmp
Checking for program 'ifort'              : not found
ifort not found, defaulting to gfortran (cause: 'Could not find the program ['ifort']
(complete log in /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/build/config.log)')
Checking for program 'gfortran, g77'      : /usr/bin/gfortran
Check gfortran version                    : not found, let's hope for the best...
Compile a test code with gfortran         : yes
retrieve gfortran link line               : ok
fortran link line                         : -L/home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0 -lgfortran -lgomp
Setting install root to                   : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0
Setting install bin directory to          : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/bin
Setting install lib directory to          : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/lib
Setting install include directory to      : /home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/include
Checking for program 'python'             : /home/koldrakan/anaconda2/bin/python
Checking for python version               : 2.7.12
python-config                             : /home/koldrakan/anaconda2/bin/python-config
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Getting pyembed flags from python-config                           : yes
Checking for library dl                                            : yes
checking for RTLD_DEFAULT in dl                                    : no
Checking for program 'pmc-config'                                  : not found
Checking for library pmc                                           : not found
Check mkl version                                                  : 10.3
create specific mkl lib                                            : Command 'gcc -shared -Bdynamic  -u dposv_ -u dtrsv_ -u dpotrf_ -u dpotrs_ -u dpotri_ -u dtrtri_ -u dtrmm_ -u dtrmv_ -u dgeqrf_ -u dormqr_ -u dsyev_ -u dgesvd_ -u dsymv_ -u dgemv_ -u dgemm_ -u dsyrk_ -u dsyr2k_ -u daxpy_ -u dtrsm_ -u dsymm_ -u dsyr_ -u ddot_ -u dsyevd_ -u dlamch_ -u dsyevr_  -Wl,--start-group /opt/intel//lib/intel64/libmkl_intel_lp64.a /opt/intel//lib/intel64/libmkl_intel_thread.a /opt/intel//lib/intel64/libmkl_core.a  -Wl,--end-group -L/home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0 -liomp5 -lpthread -lm -o "/home/koldrakan/Cosmological_Codes/planck/cosmology/PR2/likelihood/plc-2.0/lib/libclik_mkl.so" ' returned 1
Back to top
View user's profile  
Shouvik Roychoudhury



Joined: 14 Aug 2016
Posts: 15
Affiliation: Harish-Chandra Research Institute

PostPosted: October 06 2016  Reply with quote

configure without the lapack statement and see if it works.try

./waf configure –install_all_deps
Back to top
View user's profile  
Karim Benabed



Joined: 18 Dec 2008
Posts: 5
Affiliation: Institut d'Astrophysique de Paris

PostPosted: October 07 2016  Reply with quote

You wil not be able to compile with mkl if you don't compile with either ifort or icc which provide the intel openmp library (iomp5).

You can try to force the use of the gnu openmp lib, by changing the file
waf_tools/any_lapack.py

replace the line
"linux_10.3_64" :("%s/lib/intel64"," -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm"),

by
"linux_10.3_64" :("%s/lib/intel64"," -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm"),

use at your own risks.
Back to top
View user's profile  
Albin Nilsson



Joined: 05 Oct 2016
Posts: 13
Affiliation: NCBJ, Warsaw

PostPosted: October 07 2016  Reply with quote

I tried changing the line and it configured and installed without any problems. Thank you!
Will this affect performance and/or accuracy at all?
Back to top
View user's profile  
Karim Benabed



Joined: 18 Dec 2008
Posts: 5
Affiliation: Institut d'Astrophysique de Paris

PostPosted: October 07 2016  Reply with quote

There can be a small performance decrease because of the use of the gnu openmp library.
That being said, performance will be probably more degraded by the use of the gfortran compiler rather than the intel one.

As for accuracy, the use of the gnu openmp lib with mkl has not been tested for the Planck likelihood code. Intel provide dedicated libs for that, so it should be fine. Make sure to check with clik_print that the automatic test of the likelihoods gives correct results, especially the low-ell ones.
Back to top
View user's profile  
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.