Page 1 of 1

Updated clik for 2015 Planck

Posted: March 02 2019
by Antony Lewis
In case anyone has problems building Planck 2015 likelihoods with recent compilers or using with python 3, Karim has kindly provided an updated code release, available from here until the updated code is made available along with new likelihoods in the 2018 release.

Re: Updated clik for 2015 Planck

Posted: March 19 2019
by He Jia
Hi, I just tried to install this with Anaconda on Linux, and here's some experience in case someone else encounters the same issue.

On my side it seems that ifort is not compatible with glibc, so I switched to gfortran. And in order to use conda's mkl, I modified waf_tools/any_lapack.py as follows:

Code: Select all

(Line 83) cmdlist["ars"] = " ".join([osp.join(mkl_options[tag][0]%(ctx.options.lapack_mkl),"lib%s.so"%v.strip()) for v in mkl_options[tag][1].split("-l") if v.strip() and v.strip()[:3]=="mkl"])          # change .a library to .so

(Line 293) "linux_10.3_64" :("%s/lib/"," -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core  -lgomp -lpthread -lm"),
Then I could successfully install it with --lapack_mkl=$CONDA_PREFIX .

Re: Updated clik for 2015 Planck

Posted: April 16 2022
by Minh Nguyen
Hi Antony, for the reason of testing, I need the Planck 2015 likelihood installed. I'm using the compressed file you provided but having issue with pyembed, although I do not have the same issue with the Planck 2018 likelihood installation. I quote below the relevant part of the config.log file

Code: Select all

Asking python-config for pyembed '--cflags --libs --ldflags' flags
['/sw/arcts/centos7/python3.8-anaconda/2021.05/bin/python3.8-config', '--cflags', '--libs', '--ldflags']
out: -I/sw/arcts/centos7/python3.8-anaconda/2021.05/include/python3.8 -I/sw/arcts/centos7/python3.8-anaconda/2021.05/include/python3.8  -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -ffunction-sections -pipe -isystem /sw/arcts/centos7/python3.8-anaconda/2021.05/include -fdebug-prefix-map=/tmp/build/80754af9/python_1618343417471/work=/usr/local/src/conda/python-3.8.8 -fdebug-prefix-map=/sw/arcts/centos7/python3.8-anaconda/2021.05=/usr/local/src/conda-prefix -fno-semantic-interposition -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall
 -lcrypt -lpthread -ldl  -lutil -lrt -lm -lm 
-L/sw/arcts/centos7/python3.8-anaconda/2021.05/lib/python3.8/config-3.8-x86_64-linux-gnu -L/sw/arcts/centos7/python3.8-anaconda/2021.05/lib  -lcrypt -lpthread -ldl  -lutil -lrt -lm -lm 

Unhandled flag '-Wno-unused-result'
Unhandled flag '-Wsign-compare'
Unhandled flag '-pipe'
Unhandled flag '-Wall'
yes
------------------------------------------------------------------
Testing pyembed configuration
==>

#include <Python.h>
#ifdef __cplusplus
extern "C" {
#endif
	void Py_Initialize(void);
	void Py_Finalize(void);
#ifdef __cplusplus
}
#endif
int main(int argc, char **argv)
{
   (void)argc; (void)argv;
   Py_Initialize();
   Py_Finalize();
   return 0;
}

<==
[1/2] Compiling [32mbuild/.conf_check_1280730ce3216dfbee6fb462ae83c808/test.c[0m

['/sw/arcts/centos7/gcc/9.2.0/bin/gcc', '-march=nocona', '-mtune=haswell', '-ftree-vectorize', '-fPIC', '-fstack-protector-strong', '-fno-plt', '-O3', '-ffunction-sections', '-isystem', '/sw/arcts/centos7/python3.8-anaconda/2021.05/include', '-fdebug-prefix-map=/tmp/build/80754af9/python_1618343417471/work=/usr/local/src/conda/python-3.8.8', '-fdebug-prefix-map=/sw/arcts/centos7/python3.8-anaconda/2021.05=/usr/local/src/conda-prefix', '-fno-semantic-interposition', '-fuse-linker-plugin', '-ffat-lto-objects', '-flto-partition=none', '-flto', '-fwrapv', '-O3', '-I/sw/arcts/centos7/python3.8-anaconda/2021.05/include/python3.8', '-DPYTHONDIR="/nfs/turbo/lsa-nguyenmn/cosmo_analysis/cobaya_intel/code/planck/code/plc-2.1_py3/lib/python3.8/site-packages"', '-DPYTHONARCHDIR="/nfs/turbo/lsa-nguyenmn/cosmo_analysis/cobaya_intel/code/planck/code/plc-2.1_py3/lib/python3.8/site-packages"', '-DNDEBUG', '../test.c', '-c', '-o/nfs/turbo/lsa-nguyenmn/cosmo_analysis/cobaya_intel/code/planck/code/plc-2.1_py3/build/.conf_check_1280730ce3216dfbee6fb462ae83c808/testbuild/test.c.1.o']
[2/2] Linking [33mbuild/.conf_check_1280730ce3216dfbee6fb462ae83c808/testbuild/testprog[0m

['/sw/arcts/centos7/gcc/9.2.0/bin/gcc', '-m64', '-fPIC', 'test.c.1.o', '-o/nfs/turbo/lsa-nguyenmn/cosmo_analysis/cobaya_intel/code/planck/code/plc-2.1_py3/build/.conf_check_1280730ce3216dfbee6fb462ae83c808/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/sw/arcts/centos7/python3.8-anaconda/2021.05/lib', '-L/sw/arcts/centos7/python3.8-anaconda/2021.05/lib/python3.8/config-3.8-x86_64-linux-gnu', '-lm', '-ldl', '-lutil', '-lpthread', '-lcrypt', '-lpthread', '-ldl', '-lutil', '-lrt', '-lm', '-lm', '-lcrypt', '-lpthread', '-ldl', '-lutil', '-lrt', '-lm', '-lm']
err: /tmp/testprog.2aiYR0.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0x6): undefined reference to `Py_Initialize'
<artificial>:(.text.startup+0xc): undefined reference to `Py_Finalize'
collect2: error: ld returned 1 exit status

Re: Updated clik for 2015 Planck

Posted: April 17 2022
by Antony Lewis
I think you should be able to use the 2018 likelihood with old 2015 clik files.