CosmoCoffee Forum Index CosmoCoffee

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

Problem installing Planck likelihood
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Mastache, Jorge



Joined: 16 Jun 2011
Posts: 6
Affiliation: MCTP

PostPosted: June 10 2017  Reply with quote

I have a problem installing the Planck likelihood in a Mac, the problem is the following:

After having a successful configuration
Code:

> ./waf configure --lapack_mkl=/opt/intel/mkl --install_all_deps

here I have a couple of warnings:
Code:

Checking for program 'gcc, cc'           : /usr/bin/gcc
gcc not found(cause : Could not find g++, if renamed try eg: CXX=g++48 waf configure
(complete log in /Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/config.log))
Checking for program 'icc, ICL'          : not found
icc not found (cause : Could not find the program ['icc', 'ICL']
(complete log in /Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/config.log))
Checking for program 'clang'             : /usr/bin/clang

Then I run
Code:

> ./waf install

and I get the error:
Code:

clang: error: unsupported option '-fopenmp'

../src/clik_example_c.c:45:19: warning: implicit declaration of function 'read_double_vector' is invalid in C99 [-Wimplicit-function-declaration]
    cl_and_pars = read_double_vector(argv[i],ndim,err);
                  ^
../src/clik_example_c.c:45:17: warning: incompatible integer to pointer conversion assigning to 'double *' from 'int' [-Wint-conversion]
    cl_and_pars = read_double_vector(argv[i],ndim,err);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/clik_example_c.c:135:17: warning: incompatible integer to pointer conversion assigning to 'double *' from 'int' [-Wint-conversion]
    cl_and_pars = read_double_vector(argv[i],ndim,err);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.

clang: warning: -Wl,-compatibility_version,1: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: -Wl,-current_version,1: 'linker' input unused [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-dynamiclib' [-Wunused-command-line-argument]

ifort: command line remark #10411: option '-openmp' is deprecated and will be removed in a future release. Please use the replacement option '-qopenmp'

Waf: Leaving directory `/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build'
Build failed
 -> task in 'rel2015' failed (exit status 1):
   {task 4522435472: c rel2015.pyx.c -> rel2015.pyx.c.4.o}
['/usr/bin/clang', '-fopenmp', '-fPIC', '-dynamiclib', '-Wl,-compatibility_version,1', '-Wl,-current_version,1', '-fPIC', '-fPIC', '-fPIC', '-fPIC', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src/python/clik', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/src/python/clik', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src/python', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/src/python', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/src', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src/plik', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/src/plik', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src/minipmc', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/src/minipmc', '-I/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/include', '-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7', '-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include', '-DPYTHONDIR="/Library/Python/2.7/site-packages"', '-DPYTHONARCHDIR="/Library/Python/2.7/site-packages"', '-DHAVE_PYEMBED=1', '-DHAVE_PYTHON_H=1', '-DHAS_LAPACK', '-DLAPACK_CLIK', '-DHAS_RTLD_DEFAULT', 'src/plik/component_plugin/rel2015/rel2015.pyx.c', '-c', '-o', '/Users/Jorge/Dropbox/Programacion/Cosmomc/plc-2.0/build/src/plik/component_plugin/rel2015/rel2015.pyx.c.4.o']


Now, the problem is that clang doesn't support openmp, I followed this instructions to install llvm, but it didn't work with clang.

Now, the problem I thing is that in the configuration waf doesn't recognize that I have install gcc, for instance:
Code:

> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I even have installed:
> gcc−5
> g++

and with those I have openmp

Can anyone knows how to deal with this problem?

Thanks in advance!
Jorge[/url]
Code:
Back to top
View user's profile  
Ira *Wolfson



Joined: 24 Jan 2013
Posts: 62
Affiliation: BGU

PostPosted: June 10 2017  Reply with quote

It seems to me you have the intel composer suite, since you direct the –lapack_mkl=... flag to /opt/intel/mkl

It also occurs to me that you computer does not find you icc compiler.
So try sourcing the compilervars.sh file.

It usually could be found in /opt/intel/bin folder, but maybe for Mac it's different.

if you insist on using gcc then all you need to do is provide a flag like so:
CC=gcc
or, if the global is not recognized -
CC=/Path/to/gcc

You also need your gcc and fortran versions to be compatible so you might also provide:
FC=/path/to/gfortran

Lastly, I am not sure whether intel MKL is compatible with gcc and gfortran, so you might consider a different linear algebra pack...
Back to top
View user's profile [ Hidden ] Visit poster's website
Mastache, Jorge



Joined: 16 Jun 2011
Posts: 6
Affiliation: MCTP

PostPosted: June 11 2017  Reply with quote

Thanks for your answer Ira, it give a clue of what to do.
I didn't have installed icc, but I do have gcc (by default) I also installed gcc−5 and I have clang.

So, I solve the problem by using clang-omp (installed with llvm) instead of just clang, and by the way, when I tried to use any other gcc I get an error related with python flags.

I use:
Code:

> ./waf clean
> ./waf configure CC=/usr/local/bin/clang-omp --install_all_deps --lapack_mkl=/opt/intel/mkl
> ./waf install


and this give no errors.

Thanks!
Jorge
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.