Page 1 of 1

problem about module clik when compiling cosmomc

Posted: February 26 2019
by Hanyu Zhang
Hi all,

I am struggling to compile the Planck likelihood and CosmoMC in my own desktop. I used to use CosmoMC on Sciama (which is a cluster) and there is no problem for that. However, when I try to install it on local, there are bunch of dependency problem.

I use Ubuntu 18.04, have just install intel parallel studio xe 2019 update2 cluster edition. I also download some other requirements like open mpi, cfitsio, fftw, gsl, and have them installed at /home/hanyu/SOFTWARE NAME/.

First I fellow https://cosmologist.info/cosmomc/readme_planck.html to set up the planck likelihood, I use

Code: Select all

hanyu@hanyus-ubuntu:~/plc-2.0$ ./waf configure --lapack_mkl=${MKLROOT} --cfitsio_prefix=/home/hanyu/cfitsio --install_all_deps
After ./waf install and other setting on the instruction, here is what I got when 'make' at CosmoMC path/source.

Code: Select all

mpif90 -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c cliklike.f90 -o ReleaseMPI/cliklike.o
cliklike.f90(2): error #7013: This module file was not generated by any release of this compiler.   [CLIK]
    use clik
--------^
Ok I know that there is something wrong with module clik, I should go back to plc-2.0 to figure it out. I follow viewtopic.php?t=2972#, did some changes on waf_tools
In file waf_tools/try_icc.py, line 32, replace -openmp by -qopenmp
In file waf_tools/try_ifort.py line 56, replace -openmp by -qopenmp
In file waf_tools/c_openmp.py line 28, replace -fopenmp by -qopenmp
then this is what I got (sorry for the length)

Code: Select all

hanyu@hanyus-ubuntu:~/plc-2.0$ ./waf clean
add plik/component_plugin/rel2015/fg2015.c
add plik/component_plugin/rel2015/corrnoise.c
add plik/component_plugin/rel2015/leakage.c
'clean' finished successfully (0.013s)
hanyu@hanyus-ubuntu:~/plc-2.0$ ./waf configure --install_all_deps --lapack_mkl=${MKLROOT} --icc --ifort --cfitsio_prefix=/home/hanyu/cfitsio 
Setting top to                           : /home/hanyu/plc-2.0 
Setting out to                           : /home/hanyu/plc-2.0/build 
Checking for program 'icc, ICL'          : /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/icc 
Checking for program 'ar'                : /usr/bin/ar 
Compile a test code with icc             : yes 
retrieve icc link line                   : ok 
icc link line                            :   
Setting architecture flag to             : -m64 
Checking for $CC option to support OpenMP : -qopenmp 
Checking for program 'ifort'              : /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/ifort 
Checking for program 'xiar'               : /usr/bin/ar 
Check ifort version                       : 19.0.2.187 
Compile a test code with ifort            : yes 
retrieve ifort link line                  : ok 
fortran link line                         : -L/lib -L/lib64 -lirc -lpthread 
Setting install root to                   : /home/hanyu/plc-2.0 
Setting install bin directory to          : /home/hanyu/plc-2.0/bin 
Setting install lib directory to          : /home/hanyu/plc-2.0/lib 
Setting install include directory to      : /home/hanyu/plc-2.0/include 
Checking for program 'python'             : /usr/bin/python 
Checking for python version               : 2.7.15 
python-config                             : /usr/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                                            : /home/hanyu/plc-2.0/lib/libclik_mkl.so 
Checking for library ['clik_mkl', 'iomp5', 'pthread', 'm']         : yes 
Checking for function dposv                                        : yes 
Checking for function dtrsv                                        : yes 
Checking for function dpotrf                                       : yes 
Checking for function dpotrs                                       : yes 
Checking for function dpotri                                       : yes 
Checking for function dtrtri                                       : yes 
Checking for function dtrmm                                        : yes 
Checking for function dtrmv                                        : yes 
Checking for function dgeqrf                                       : yes 
Checking for function dormqr                                       : yes 
Checking for function dsyev                                        : yes 
Checking for function dgesvd                                       : yes 
Checking for function dsymv                                        : yes 
Checking for function dgemv                                        : yes 
Checking for function dgemm                                        : yes 
Checking for function dsyrk                                        : yes 
Checking for function dsyr2k                                       : yes 
Checking for function daxpy                                        : yes 
Checking for function dtrsm                                        : yes 
Checking for function dsymm                                        : yes 
Checking for function dsyr                                         : yes 
Checking for function ddot                                         : yes 
Checking for function dsyevd                                       : yes 
Checking for function dlamch                                       : yes 
Checking for function dsyevr                                       : yes 
Checking for library ['cfitsio']                                   : yes 
Checking for function fits_init_cfitsio                            : yes 
Checking python module 'numpy'                                     : ok 
Checking python module 'pyfits'                                    : ok 
Checking python module 'cython'                                    : ok 
Checking python module 'cython'                                    : ok 
Checking cython version (>0.12)                                    : 0.26.1 
Checking for program 'cython'                                      : /usr/bin/cython 
Add plugin : 'rel2015'                                             : ok 

*----------------------------------------------------*
|                                                    |
|   Configure step ok.                               |
|                                                    |
|   run './waf install' now !                        |
|                                                    |
*----------------------------------------------------*

'configure' finished successfully (5.464s)
hanyu@hanyus-ubuntu:~/plc-2.0$ ./waf install
Waf: Entering directory `/home/hanyu/plc-2.0/build'
add plik/component_plugin/rel2015/fg2015.c
add plik/component_plugin/rel2015/corrnoise.c
add plik/component_plugin/rel2015/leakage.c
[  3/125] Processing src/gibbs/comm_br_mod.f90
[  4/125] Processing src/gibbs/comm_gauss_br_mod.f90
[  5/125] Processing src/lowlike/Planck_options.F90
[  6/125] Processing src/cmbonly/plik_cmbonly.f90
- install /home/hanyu/plc-2.0/include/clik_lensing.h (from src/clik_lensing.h)
[  6/125] Processing src/camspec/CAMspec.f90
[  8/125] Processing src/clik.F90
- install /home/hanyu/plc-2.0/include/clik.h (from src/clik.h)
[  6/125] Processing src/gibbs/comm_lowl_mod_dist.f90
- install /home/hanyu/plc-2.0/include/errorlist.h (from src/minipmc/errorlist.h)
[  9/125] Processing src/bflike/healpix_types.f90
[ 10/125] Compiling src/lowlike/read_archive_map.f90
[ 11/125] Compiling src/lowlike/read_fits.f90
[ 12/125] Processing src/lowlike/br_mod_dist.f90
[ 13/125] Compiling src/python/clik/lkl.pyx
[ 14/125] Compiling src/python/clik/lkl_lensing.pyx
[ 15/125] Compiling src/python/clik/parametric.pyx
[ 16/125] Compiling src/plik/component_plugin/rel2015/rel2015.pyx
[ 17/125] Compiling src/python/clik/parobject.py
[ 18/125] Compiling src/python/clik/parobject.py
[ 19/125] Compiling src/python/clik/__init__.py
[ 20/125] Compiling src/python/clik/__init__.py
[ 21/125] Compiling src/python/clik/miniparse.py
[ 22/125] Compiling src/python/clik/miniparse.py
[ 23/125] Compiling src/python/clik/smicahlp.py
[ 24/125] Compiling src/python/clik/smicahlp.py
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:4:8: 'stdlib' is deprecated, use 'libc.stdlib'
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:5:8: 'stdio' is deprecated, use 'libc.stdio'
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:49:13: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:49:19: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:207:13: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl.pyx:207:19: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.

[ 25/125] Compiling src/python/clik/hpy.py
[ 26/125] Compiling src/python/clik/hpy.py
[ 27/125] Compiling src/python/clik/cldf.py
[ 28/125] Compiling src/python/clik/cldf.py
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:4:8: 'stdlib' is deprecated, use 'libc.stdlib'
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:5:8: 'stdio' is deprecated, use 'libc.stdio'
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:51:13: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:51:19: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:150:13: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.
warning: /home/hanyu/plc-2.0/src/python/clik/lkl_lensing.pyx:150:19: Non-trivial type declarators in shared declaration (e.g. mix of pointers and values). Each pointer declaration should be on its own line.

[ 29/125] Compiling src/python/tools/clik_print.py
[ 30/125] Compiling src/python/tools/prepare_wmap.py
[ 31/125] Compiling src/python/tools/clik_explore_1d.py
[ 32/125] Compiling src/python/tools/clik_change_lrange.py
[ 33/125] Compiling src/python/tools/clik_example_py.py
[ 34/125] Compiling src/python/tools/clik_get_selfcheck.py
- install /home/hanyu/plc-2.0/share/clik/rel2015/tsz_143_eps0.50.dat (from src/plik/component_plugin/rel2015/tsz_143_eps0.50.dat)
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/parobject.py (from src/python/clik/parobject.py)
- install /home/hanyu/plc-2.0/share/clik/rel2015/sz_x_cib_template.dat (from src/plik/component_plugin/rel2015/sz_x_cib_template.dat)
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/__init__.py (from src/python/clik/__init__.py)
- install /home/hanyu/plc-2.0/share/clik/rel2015/ksz_fromcamspec.dat (from src/plik/component_plugin/rel2015/ksz_fromcamspec.dat)
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/miniparse.py (from src/python/clik/miniparse.py)
- install /home/hanyu/plc-2.0/share/clik/rel2015/cib_1h_2h_100_353_Jsr-1_PS_2014_09.dat (from src/plik/component_plugin/rel2015/cib_1h_2h_100_353_Jsr-1_PS_2014_09.dat)
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/smicahlp.py (from src/python/clik/smicahlp.py)
- install /home/hanyu/plc-2.0/share/clik/rel2015/sky_template_v15_F100_143_217_353.dat (from src/plik/component_plugin/rel2015/sky_template_v15_F100_143_217_353.dat)
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/hpy.py (from src/python/clik/hpy.py)
- install /home/hanyu/plc-2.0/share/clik/rel2015/cnoise_F100_143_217_353_v17.dat (from src/plik/component_plugin/rel2015/cnoise_F100_143_217_353_v17.dat)
[ 42/125] Processing src/lowlike/Planck_teeebb_pixlike.F90
- install /home/hanyu/plc-2.0/lib/python2.7/site-packages/src/python/clik/cldf.py (from src/python/clik/cldf.py)
[ 43/125] Processing src/cmbonly/clik_cmbonly.f90
[ 44/125] Compiling src/clik_example_f90.f90
[ 45/125] Processing src/plik/clik_plik.f90
[ 46/125] Processing src/camspec/clik_CAMspec.F90
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/parobject.pyc (from build/src/python/clik/parobject.pyc)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/__init__.pyc (from build/src/python/clik/__init__.pyc)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/parobject.pyo (from build/src/python/clik/parobject.pyo)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/miniparse.pyc (from build/src/python/clik/miniparse.pyc)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/__init__.pyo (from build/src/python/clik/__init__.pyo)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/smicahlp.pyc (from build/src/python/clik/smicahlp.pyc)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/miniparse.pyo (from build/src/python/clik/miniparse.pyo)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/hpy.pyc (from build/src/python/clik/hpy.pyc)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/cldf.pyc (from build/src/python/clik/cldf.pyc)
+ install /home/hanyu/plc-2.0/bin/clik_print (from build/src/python/clik_print)
+ install /home/hanyu/plc-2.0/bin/prepare_wmap (from build/src/python/prepare_wmap)
+ install /home/hanyu/plc-2.0/bin/clik_explore_1d (from build/src/python/clik_explore_1d)
+ install /home/hanyu/plc-2.0/bin/clik_change_lrange (from build/src/python/clik_change_lrange)
+ install /home/hanyu/plc-2.0/bin/clik_example_py (from build/src/python/clik_example_py)
+ install /home/hanyu/plc-2.0/bin/clik_get_selfcheck (from build/src/python/clik_get_selfcheck)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/hpy.pyo (from build/src/python/clik/hpy.pyo)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/smicahlp.pyo (from build/src/python/clik/smicahlp.pyo)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/cldf.pyo (from build/src/python/clik/cldf.pyo)
warning: /home/hanyu/plc-2.0/src/python/clik/parametric.pyx:4:8: 'stdlib' is deprecated, use 'libc.stdlib'
warning: /home/hanyu/plc-2.0/src/python/clik/parametric.pyx:5:8: 'stdio' is deprecated, use 'libc.stdio'

[ 65/125] Compiling src/cmbonly/clik_cmbonly.c
[ 66/125] Compiling src/plik/clik_plik.c
[ 67/125] Compiling build/src/plik/component_plugin/rel2015/rel2015.pyx.c
[ 68/125] Compiling src/gibbs/clik_gibbs.c
[ 69/125] Compiling src/plik/component_plugin/rel2015/fg2015.c
[ 70/125] Compiling src/lenslike/plenslike/plenslike_dat_full.c
[ 71/125] Compiling src/minipmc/distribution.c
[ 72/125] Compiling src/lenslike/plenslike/plenslike_dat_quad.c
[ 73/125] Compiling src/lowly_common.c
[ 74/125] Compiling src/plik/clik_hfipack.c
[ 75/125] Compiling src/plik/smica.c
[ 76/125] Compiling src/lenslike/plenslike/qest.c
[ 77/125] Compiling build/src/python/clik/lkl.pyx.c
../src/minipmc/distribution.c(580): warning #266: function "dtrsv" declared implicitly
    dtrsv(&uplo,&trans,&diag,&ing->ndim,ing->std,&ing->ndim,ing->tmp,&xinc);
    ^


[ 78/125] Compiling src/lenslike/plenslike/wignerd.c
[ 79/125] Compiling src/clik_helper.c
[ 80/125] Compiling build/src/python/clik/lkl_lensing.pyx.c
[ 81/125] Compiling src/lenslike/plenslike/plenslike_dat_mono.c
[ 82/125] Compiling src/bflike/clik_bflike.c
[ 83/125] Compiling src/plik/clik_parametric.c
[ 84/125] Compiling src/plik/component_plugin/rel2015/leakage.c
[ 85/125] Compiling src/clik_lensing.c
[ 86/125] Compiling src/clik.c
[ 87/125] Compiling src/clik_dic.c
../src/plik/smica.c(509): warning #266: function "daxpy" declared implicitly
    daxpy(&sz,&done,rq_0,&one, rq, &one);
    ^

../src/plik/smica.c(552): warning #266: function "dsyr" declared implicitly
    dsyr(&uplo, &mm, &done, A, &one, AAt, &mm);  
    ^

../src/plik/smica.c(688): warning #266: function "daxpy" declared implicitly
      daxpy(&m2,mpars + iq,AAt,&one, rq+m2*iq, &one);
      ^

../src/plik/smica.c(827): warning #266: function "dsymm" declared implicitly
      dsymm(&side, &uplo, &nd, &m, &done, P, &nd, A, &nd, &dzero, Ab, &nd);
      ^

../src/plik/smica.c(842): warning #266: function "dgemm" declared implicitly
      dgemm(&transa, &transb, &m, &m, &nd, &done, A, &nd, Ab, &nd, &done, rq+m2*iq, &m);
      ^

../src/plik/smica.c(1509): warning #266: function "dtrsm" declared implicitly
    dtrsm(&side, &uplo, &trans, &diag, &nn, &nn, &done, rq, &nn, rq_hat, &nn);
    ^


[ 88/125] Compiling build/src/python/clik/parametric.pyx.c
[ 89/125] Compiling src/lklbs.c
[ 90/125] Compiling src/plik/component_plugin/rel2015/corrnoise.c
[ 91/125] Compiling src/lenslike/plenslike/plenslike_dat_qecl.c
[ 92/125] Compiling src/plik/clik_parametric_addon.c
In file included from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/lkl.pyx.c(485):
/usr/include/python2.7/numpy/ndarraytypes.h(84): warning #2650: attributes ignored here
                      NPY_CHAR NPY_ATTR_DEPRECATE("Use NPY_STRING"),
                               ^

In file included from /usr/include/python2.7/numpy/ndarraytypes.h(1809),
                 from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/lkl.pyx.c(485):
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h(15): warning #1224: #warning directive: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
  #warning "Using deprecated NumPy API, disable it by " \
   ^

src/python/clik/lkl.pyx.c(3805): warning #266: function "clik_get_extra_parameter_names_by_lkl" declared implicitly
    __pyx_v_n_names = clik_get_extra_parameter_names_by_lkl(__pyx_v_self->celf, __pyx_v_ilkl, (&__pyx_v_names), __pyx_v_self->err);
                      ^


[ 93/125] Processing src/gibbs/clik_gibbs.f90
[ 94/125] Compiling src/minipmc/io.c
[ 95/125] Compiling src/cldf/cldf.c
[ 96/125] Compiling src/minipmc/errorlist.c
../src/lklbs.c(332): warning #266: function "dgemv" declared implicitly
      dgemv(&trans, &ndim, &npar, &done, llkl->bins, &ndim, cls, &one, &dzero, llkl->pls, &one);
      ^


[ 97/125] Compiling src/clik_example_c.c
[ 98/125] Compiling src/cldf/cfrd.c
../src/clik_example_c.c(45): warning #266: function "read_double_vector" declared implicitly
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                    ^

../src/clik_example_c.c(45): warning #556: a value of type "int" cannot be assigned to an entity of type "double *"
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                  ^

../src/clik_example_c.c(135): warning #266: function "read_double_vector" declared implicitly
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                    ^

../src/clik_example_c.c(135): warning #556: a value of type "int" cannot be assigned to an entity of type "double *"
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                  ^


[ 99/125] Compiling src/lowlike/clik_lowlike.c
[100/125] Compiling src/camspec/clik_CAMspec.c
[101/125] Compiling src/clik_fortran.c
[102/125] Processing src/bflike/long_intrinsic_smw.f90
[103/125] Processing src/lowlike/Planck_likelihood.F90
[104/125] Processing src/bflike/fitstools_smw.f90
[105/125] Processing src/lowlike/clik_lowlike.f90
In file included from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/lkl_lensing.pyx.c(485):
/usr/include/python2.7/numpy/ndarraytypes.h(84): warning #2650: attributes ignored here
                      NPY_CHAR NPY_ATTR_DEPRECATE("Use NPY_STRING"),
                               ^

In file included from /usr/include/python2.7/numpy/ndarraytypes.h(1809),
                 from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/lkl_lensing.pyx.c(485):
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h(15): warning #1224: #warning directive: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
  #warning "Using deprecated NumPy API, disable it by " \
   ^


[106/125] Processing src/bflike/bflike_smw.f90
[107/125] Processing src/bflike/bflike_QUonly.f90
[108/125] Processing src/bflike/bflike.f90
In file included from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/parametric.pyx.c(487):
/usr/include/python2.7/numpy/ndarraytypes.h(84): warning #2650: attributes ignored here
                      NPY_CHAR NPY_ATTR_DEPRECATE("Use NPY_STRING"),
                               ^

In file included from /usr/include/python2.7/numpy/ndarraytypes.h(1809),
                 from /usr/include/python2.7/numpy/ndarrayobject.h(18),
                 from /usr/include/python2.7/numpy/arrayobject.h(4),
                 from src/python/clik/parametric.pyx.c(487):
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h(15): warning #1224: #warning directive: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
  #warning "Using deprecated NumPy API, disable it by " \
   ^


[109/125] Processing src/bflike/clik_bflike.f90
[110/125] Linking build/src/libclik.so
+ install /home/hanyu/plc-2.0/lib/libclik.so (from build/src/libclik.so)
[115/125] Linking build/src/python/parametric.so
[115/125] Linking build/src/python/lkl.so
[115/125] Linking build/src/python/rel2015.so
[115/125] Linking build/src/python/lkl_lensing.so
[116/125] Linking build/src/clik_example_C
[117/125] Linking build/src/libclik_f90.so
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/parametric.so (from build/src/python/parametric.so)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/rel2015.so (from build/src/python/rel2015.so)
+ install /home/hanyu/plc-2.0/lib/python2.7/site-packages/clik/lkl.so (from build/src/python/lkl.so)
src/libclik.so: undefined reference to `for_f90_index'
src/libclik.so: undefined reference to `for_close'
src/libclik.so: undefined reference to `for_cpystr'
src/libclik.so: undefined reference to `for_allocate'
src/libclik.so: undefined reference to `for_backspace'
src/libclik.so: undefined reference to `for_concat'
src/libclik.so: undefined reference to `for_read_int_fmt'
src/libclik.so: undefined reference to `for_dealloc_allocatable'
src/libclik.so: undefined reference to `for_deallocate_all'
src/libclik.so: undefined reference to `for_read_seq'
src/libclik.so: undefined reference to `for_cpstr'
src/libclik.so: undefined reference to `for_alloc_allocatable'
src/libclik.so: undefined reference to `for_open'
src/libclik.so: undefined reference to `for_read_seq_fmt'
src/libclik.so: undefined reference to `for_deallocate'
src/libclik.so: undefined reference to `for_len_trim'
src/libclik.so: undefined reference to `for_realloc_lhs'
src/libclik.so: undefined reference to `for_array_copy_in'
src/libclik.so: undefined reference to `for_rewind'
src/libclik.so: undefined reference to `for_trim'
src/libclik.so: undefined reference to `for_read_int_lis'
src/libclik.so: undefined reference to `for_stop_core'
src/libclik.so: undefined reference to `for_cpusec_t'
src/libclik.so: undefined reference to `for_read_seq_lis'
src/libclik.so: undefined reference to `for_write_seq'
src/libclik.so: undefined reference to `for_inquire'
src/libclik.so: undefined reference to `for_contig_array'
src/libclik.so: undefined reference to `for_read_seq_lis_xmit'
src/libclik.so: undefined reference to `for_check_mult_overflow64'
src/libclik.so: undefined reference to `for_write_seq_fmt_xmit'
src/libclik.so: undefined reference to `for_write_seq_fmt'
src/libclik.so: undefined reference to `for_array_copy_out'
src/libclik.so: undefined reference to `for_read_seq_xmit'
src/libclik.so: undefined reference to `for_write_seq_lis_xmit'
src/libclik.so: undefined reference to `for_write_seq_lis'
src/libclik.so: undefined reference to `for_read_int_lis_xmit'
src/libclik.so: undefined reference to `for_adjustl'
src/libclik.so: undefined reference to `for_read_seq_nml'
src/libclik.so: undefined reference to `for_exit'

Waf: Leaving directory `/home/hanyu/plc-2.0/build'
Build failed
 -> task in 'clik_example_C' failed (exit status 1): 
	{task 139701496146064: cprogram clik_example_c.c.7.o -> clik_example_C}
['/home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/icc', '-m64', 'src/clik_example_c.c.7.o', '-o', '/home/hanyu/plc-2.0/build/src/clik_example_C', '-Wl,-rpath,/lib', '-Wl,-rpath,/lib64', '-Wl,-rpath,/home/hanyu/plc-2.0/lib', '-Wl,-rpath,/home/hanyu/plc-2.0/lib', '-Wl,-rpath,/lib', '-Wl,-rpath,/lib64', '-Wl,-rpath,/home/hanyu/cfitsio/lib', '-Wl,-rpath,/lib', '-Wl,-rpath,/lib64', '', '', '-L/lib', '-L/lib64', '-Lsrc', '-L/home/hanyu/plc-2.0/lib', '-L/lib', '-L/lib64', '-L/home/hanyu/cfitsio/lib', '-L/lib', '-L/lib64', '-lpthread', '-lclik', '-lclik_mkl', '-liomp5', '-lpthread', '-lm', '-ldl', '-lcfitsio', '-lirc', '-lpthread']
I would like to check what happen when I use Ma, kefile, I do some modifications to the Makefile, specific CFITSIOPATH, IFORLIBPATH, force use icc and ifort, set COPENMP and FOPENMP = -qopenmp, here is the cut of my Makefile,

Code: Select all

 20 # set the path of the cfitsio lib. 
 21 # bewared that cfitsio must have been compiled with the option "make shared"
 22 CFITSIOPATH := /home/hanyu/cfitsio
 23 #CFITSIOPATH := /softs/cfitsio/3.24
 24 # you have a CFITSIO lib in a weird location, also set those
 25 CFITSIO_INCPATH := $(CFITSIOPATH)/include
 26 CFITSIO_LIBPATH := $(CFITSIOPATH)/lib
 27 
 28 #define your compilers and stuff
 29 CC = icc
 30 FC = ifort
 31 
 32 # ifort
 33 # if you are using ifort set here where its lib are installed
 34 # and check the runtime libs
 35 # PLEASE note that gcc 4.9 and ifort <14.0.4 have an imcompativbility
 36 # (see https://software.intel.com/en-us/articles/gcc-49-openmp-code-cannot-b    e-linked-with-intel-openmp-runtime)
 37 
 38 # on my mac I got
 39 #IFORTLIBPATH = /usr/bin/ifort-2011-base/compiler/lib
 40 #IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifportmt -l    ifcoremt -lpthread
 41 
 42 # on a linux machine, ifort 11.1
 43 #IFORTLIBPATH = /softs/intel/fce/11.1.075/lib/intel64
 44 #IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifport -lif    coremt -lpthread
 45 
 46 # on a linux machine, ifort 14.0
 47 IFORTLIBPATH = /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bi    n/intel64
 48 IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifport -lifc    oremt -lirc -lpthread
 49 
 50 # gfortran
 51 # if you are using gfortran set here where the lib are installed
 52 # and check the runtime libs
 53 GFORTRANLIBPATH = /usr/lib
 54 GFORTRANRUNTIME = -L$(GFORTRANLIBPATH) -lgfortran -lgomp
 55 
 56 # if you are on linux and using mkl, you need to set this 
 57 MKLROOT = /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/mkl
 58 LAPACKLIBPATHMKL = -L$(MKLROOT)/lib/intel64
 59 #some example
 60 #MKLROOT = /softs/intel/mkl/10.2.6.038/
 61 # on mkl 10.3
 62 #LAPACKLIBPATHMKL = -L$(MKLROOT)/lib/intel64
 63 # on mkl 10.2
 64 #LAPACKLIBPATHMKL = -L$(MKLROOT)/lib/em64t
 65 
 66 #if you want to point to your own version of lapack set the following variab    les
 67 #LAPACK = -L/some/path -lsomefortranlapack -lsomedependencyforyourlapack
 68 #LAPACKLIBPATH = /some/path
 69 
 70 
 71 # pretty colors (comment to remove pretty colors or try to change echo to ec    ho -e)
 72 COLORS = 1
 73 
 74 #set echo to echo -e to have colourized output on some shell
 75 ECHO = echo
 76 
 77 
 78 # what is the openmp option for your C compiler (leave empty to cmpile witho    ut openmp)
 79 COPENMP = -qopenmp
 80 # what is the openmp option for your F90 compiler (leave empty to cmpile wit    hout openmp)
 81 FOPENMP = -qopenmp
After make, the error I got,

Code: Select all

\x1b[31;01mI suspect an error with your MKLROOT, or MKL_LIB_FULLPATH, please check\x1b[0m
build \x1b[36;11m/home/hanyu/plc-2.0/buildir/liblapack_clik.so \x1b[0m,
(see chapter 5 in http://software.intel.com/sites/products/documentation/hpc/mkl/lin/)
using the following command line:
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  -Wl,--end-group -L/home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64 -L/lib -L/lib64 -liomp5 -lpthread -lm -o /home/hanyu/plc-2.0/buildir/liblapack_clik.so
build \x1b[36;11m/home/hanyu/plc-2.0/buildir/libclik.so \x1b[0m
\x1b[32;11msrc/clik_fortran.c \x1b[0m -> \x1b[32;11m /home/hanyu/plc-2.0/buildir/tmp/clik_fortran.o \x1b[0m
\x1b[32;11msrc/clik.F90 \x1b[0m -> \x1b[32;11m /home/hanyu/plc-2.0/buildir/tmp/clik.f90.o \x1b[0m
build \x1b[36;11m/home/hanyu/plc-2.0/buildir/libclik_f90.so \x1b[0m
\x1b[32;11msrc/clik_example_c.c \x1b[0m -> \x1b[32;11m /home/hanyu/plc-2.0/buildir/tmp/clik_example_c.o \x1b[0m
src/clik_example_c.c(45): warning #266: function "read_double_vector" declared implicitly
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                    ^

src/clik_example_c.c(45): warning #556: a value of type "int" cannot be assigned to an entity of type "double *"
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                  ^

src/clik_example_c.c(135): warning #266: function "read_double_vector" declared implicitly
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                    ^

src/clik_example_c.c(135): warning #556: a value of type "int" cannot be assigned to an entity of type "double *"
      cl_and_pars = read_double_vector(argv[i],ndim,err);
                  ^

build \x1b[36;11m/home/hanyu/plc-2.0/buildir/clik_example_C \x1b[0m
icc: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsymm_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dpotrf_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dgemm_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dpotri_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dtrsv_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsyevr_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dpotrs_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsyr_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dtrsm_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsyevd_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `daxpy_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsyrk_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `ddot_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dsymv_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dgemv_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dlamch_'
/home/hanyu/plc-2.0/buildir/libclik.so: undefined reference to `dposv_'
Makefile:346: recipe for target '/home/hanyu/plc-2.0/buildir/clik_example_C' failed
make: *** [/home/hanyu/plc-2.0/buildir/clik_example_C] Error 1
I have struggled for the whole weekend for this. Seems like there is something wrong with my MKL library but I have no idea how to solve this. It's a similar situation as another post viewtopic.php?t=2307.

Finally, my .bashrc

Code: Select all

119 ###parallel studio####
120 source /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/ifortvars    .sh intel64
121 source /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/iccvars.s    h intel64
122 ###mpi###
123 PATH="/home/hanyu/openmpi/bin":${PATH}
124 export PATH
125 
126 LD_LIBRARY_PATH="/home/hanyu/openmpi/lib":$LD_LIBRARY_PATH
127 export LD_LIBRARY_PATH
128 ###cfitsio###
129 export LD_LIBRARY_PATH=/home/hanyu/cfitsio/lib:${LD_LIBRARY_PATH}
130 ###fftw###
131 #export LD_LIBRARY_PATH=/home/hanyu/fftw/lib:${LD_LIBRARY_PATH}
132 ###gsl###
133 #export LD_LIBRARY_PATH=/home/hanyu/gsl/lib:${LD_LIBRARY_PATH}
134 ###PLK2.0###
135 export PLANCKLIKE=cliklike
136 export CLIK_PATH=/home/hanyu/plc-2.0
137 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CLIK_PATH/lib
138 #source $CLIK_PATH/bin/clik_profile.sh
139 ###mkl###
140 #export MKLROOT=/home/hanyu/intel/mkl:${MKLROOT}
141 
142 
143 
144 source /home/hanyu/plc-2.0/bin/clik_profile.sh
145 export PYTHONPATH=/home/hanyu/projects/CosmoMC-Nov2016/python:$PYTHONPATH
Thanks you so much if anyone could help or even take a look!
Hanyu

Re: problem about module clik when compiling cosmomc

Posted: February 26 2019
by Antony Lewis
Check mpif90 is configured to use ifort, or change it accordingly?

Re: problem about module clik when compiling cosmomc

Posted: February 26 2019
by Shouvik Roychoudhury
Is your cluster version also running with Intel 2019?

Re: problem about module clik when compiling cosmomc

Posted: February 26 2019
by Hanyu Zhang
HI Antony,

Thank you for reply.
Do you mean mpif90 option at cosmomc/source/Makefile? I add MPIF90C = mpif90 -f90=ifort.
add some lines on .bashrc

Code: Select all

export I_MPI_CC=icc
export I_MPI_CXX=icc
export I_MPI_F77=ifort
export I_MPI_F90=ifort
and I also check

Code: Select all

hanyu@hanyus-ubuntu:~$ mpif90 --version
ifort (IFORT) 19.0.2.187 20190117
Copyright (C) 1985-2019 Intel Corporation.  All rights reserved.
When compile use source/Makefile the error are still there and the command -f90=ifort seems didn't work.

Code: Select all

hanyu@hanyus-ubuntu:~/projects/CosmoMC-Nov2016/source$ make
mkdir -p ReleaseMPI
cd ../camb && \
make --file=Makefile_main libcamb OUTPUT_DIR=ReleaseMPI \
RECOMBINATION=recfast EQUATIONS=equations_ppf NONLINEAR=halofit_ppf
make[1]: Entering directory '/home/hanyu/projects/CosmoMC-Nov2016/camb'
mkdir -p ReleaseMPI
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c constants.f90 -o ReleaseMPI/constants.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c utils.F90 -o ReleaseMPI/utils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c subroutines.f90 -o ReleaseMPI/subroutines.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c inifile.f90 -o ReleaseMPI/inifile.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c power_tilt.f90 -o ReleaseMPI/power_tilt.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c recfast.f90 -o ReleaseMPI/recfast.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c reionization.f90 -o ReleaseMPI/reionization.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c modules.f90 -o ReleaseMPI/modules.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c bessels.f90 -o ReleaseMPI/bessels.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c equations_ppf.f90 -o ReleaseMPI/equations_ppf.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c halofit_ppf.f90 -o ReleaseMPI/halofit_ppf.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c lensing.f90 -o ReleaseMPI/lensing.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c SeparableBispectrum.F90 -o ReleaseMPI/SeparableBispectrum.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c cmbmain.f90 -o ReleaseMPI/cmbmain.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -module ReleaseMPI -IReleaseMPI/ -c camb.f90 -o ReleaseMPI/camb.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ar -r ReleaseMPI/libcamb_recfast.a ReleaseMPI/constants.o  ReleaseMPI/utils.o   ReleaseMPI/subroutines.o ReleaseMPI/inifile.o  ReleaseMPI/power_tilt.o  ReleaseMPI/recfast.o ReleaseMPI/reionization.o ReleaseMPI/modules.o ReleaseMPI/bessels.o ReleaseMPI/equations_ppf.o ReleaseMPI/halofit_ppf.o ReleaseMPI/lensing.o ReleaseMPI/SeparableBispectrum.o ReleaseMPI/cmbmain.o ReleaseMPI/camb.o
ar: creating ReleaseMPI/libcamb_recfast.a
make[1]: Leaving directory '/home/hanyu/projects/CosmoMC-Nov2016/camb'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c MiscUtils.f90 -o ReleaseMPI/MiscUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c ArrayUtils.f90 -o ReleaseMPI/ArrayUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c StringUtils.f90 -o ReleaseMPI/StringUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c MpiUtils.f90 -o ReleaseMPI/MpiUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c FileUtils.f90 -o ReleaseMPI/FileUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c RandUtils.f90 -o ReleaseMPI/RandUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c ObjectLists.f90 -o ReleaseMPI/ObjectLists.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c Interpolation.f90 -o ReleaseMPI/Interpolation.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c IniObjects.f90 -o ReleaseMPI/IniObjects.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c ObjectParamNames.f90 -o ReleaseMPI/ObjectParamNames.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c Matrix_utils_new.f90 -o ReleaseMPI/Matrix_utils_new.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c settings.f90 -o ReleaseMPI/settings.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c samples.f90 -o ReleaseMPI/samples.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c IO.f90 -o ReleaseMPI/IO.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c GeneralTypes.f90 -o ReleaseMPI/GeneralTypes.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c likelihood.f90 -o ReleaseMPI/likelihood.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c BaseParameters.f90 -o ReleaseMPI/BaseParameters.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c propose.f90 -o ReleaseMPI/propose.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c ParamSet.f90 -o ReleaseMPI/ParamSet.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c PowellConstrainedMinimize.f90 -o ReleaseMPI/PowellConstrainedMinimize.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c CosmologyTypes.f90 -o ReleaseMPI/CosmologyTypes.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c CosmoTheory.f90 -o ReleaseMPI/CosmoTheory.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c Calculator_Cosmology.f90 -o ReleaseMPI/Calculator_Cosmology.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c Likelihood_Cosmology.f90 -o ReleaseMPI/Likelihood_Cosmology.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c CMBlikes.f90 -o ReleaseMPI/CMBlikes.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c CMB_BK_Planck.f90 -o ReleaseMPI/CMB_BK_Planck.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
mpif90 -f90=ifort -mkl -O3 -no-prec-div -fpp -qopenmp -xHost -DMPI -DCLIK -I../camb/ReleaseMPI -I/home/hanyu/plc-2.0/include -module ReleaseMPI -IReleaseMPI/ -c cliklike.f90 -o ReleaseMPI/cliklike.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
cliklike.f90(2): error #7013: This module file was not generated by any release of this compiler.   [CLIK]
    use clik
--------^
cliklike.f90(13): error #6457: This derived type name has not been declared.   [TCMBLIKELIHOOD]
    type, extends(TCMBLikelihood) :: ClikLikelihood
------------------^
cliklike.f90(14): error #6457: This derived type name has not been declared.   [CLIK_OBJECT]
        type(clik_object) :: clikid
-------------^
cliklike.f90(39): error #6457: This derived type name has not been declared.   [TLIKELIHOODLIST]
    class(TLikelihoodList) :: LikeList
----------^
cliklike.f90(40): error #6457: This derived type name has not been declared.   [TSETTINGINI]
    class(TSettingIni) Ini
----------^
cliklike.f90(129): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
---------^
cliklike.f90(131): error #6457: This derived type name has not been declared.   [CMBPARAMS]
    Class (CMBParams) CMB
-----------^
cliklike.f90(132): error #6457: This derived type name has not been declared.   [TCOSMOTHEORYPREDICTIONS]
    Class(TCosmoTheoryPredictions), target :: Theory
----------^
cliklike.f90(133): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) DataParams(:)
---------^
cliklike.f90(218): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
---------^
cliklike.f90(220): error #6457: This derived type name has not been declared.   [CMBPARAMS]
    Class (CMBParams) CMB
-----------^
cliklike.f90(221): error #6457: This derived type name has not been declared.   [TCOSMOTHEORYPREDICTIONS]
    Class(TCosmoTheoryPredictions), target :: Theory
----------^
cliklike.f90(222): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) DataParams(:)
---------^
cliklike.f90(218): error #6404: This name does not have a type, and must have an explicit type.   [CMB]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
-------------------------------------------------^
cliklike.f90(129): error #6404: This name does not have a type, and must have an explicit type.   [CMB]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
-----------------------------------------^
cliklike.f90(218): error #6404: This name does not have a type, and must have an explicit type.   [THEORY]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
------------------------------------------------------^
cliklike.f90(129): error #6404: This name does not have a type, and must have an explicit type.   [THEORY]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
----------------------------------------------^
cliklike.f90(47): error #6404: This name does not have a type, and must have an explicit type.   [INI]
    do i=1, Ini%Count
------------^
cliklike.f90(47): error #6460: This is not a field name that is defined in the encompassing structure.   [COUNT]
    do i=1, Ini%Count
----------------^
cliklike.f90(48): error #6460: This is not a field name that is defined in the encompassing structure.   [ITEMS]
        name = Ini%Items(i)%P%Name
-------------------^
cliklike.f90(48): error #6460: This is not a field name that is defined in the encompassing structure.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(48): error #6054: A CHARACTER data type is required in this context.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(49): error #6404: This name does not have a type, and must have an explicit type.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(49): error #6341: A logical data type is required in this context.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(50): error #6460: This is not a field name that is defined in the encompassing structure.   [READFILENAME]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
------------------------^
cliklike.f90(50): error #6054: A CHARACTER data type is required in this context.   [INI]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
--------------------^
cliklike.f90(52): error #6404: This name does not have a type, and must have an explicit type.   [MPIRANK]
            if (MpiRank==0 .and. feedback > 0) &
----------------^
cliklike.f90(52): error #6404: This name does not have a type, and must have an explicit type.   [FEEDBACK]
            if (MpiRank==0 .and. feedback > 0) &
---------------------------------^
cliklike.f90(61): error #6404: This name does not have a type, and must have an explicit type.   [LIKELIST]
            call LikeList%Add(Like)
-----------------^
cliklike.f90(61): error #6460: This is not a field name that is defined in the encompassing structure.   [ADD]
            call LikeList%Add(Like)
--------------------------^
/tmp/ifort0p4fz0.i90(269): catastrophic error: Too many errors, exiting
compilation aborted for cliklike.f90 (code 1)
Makefile:285: recipe for target 'ReleaseMPI/cliklike.o' failed
make: *** [ReleaseMPI/cliklike.o] Error 1
I actually don't know if plc-2.0 have clik module file outputted correctly, because the only time I install it using waf tool successfully is default setting with configure below

Code: Select all

hanyu@hanyus-ubuntu:~/plc-2.0$ ./waf configure --lapack_mkl=${MKLROOT} --cfitsio_prefix=/home/hanyu/cfitsio --install_all_deps
Setting top to                           : /home/hanyu/plc-2.0 
Setting out to                           : /home/hanyu/plc-2.0/build 
Checking for program 'gcc, cc'           : /usr/bin/gcc 
Checking for program 'ar'                : /usr/bin/ar 
Check gcc version                        : 7.3.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'              : /home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/ifort 
Checking for program 'xiar'               : /usr/bin/ar 
Check ifort version                       : 19.0.2.187 
Compile a test code with ifort            : yes 
retrieve ifort link line                  : not found 
ifort not found, defaulting to gfortran (cause: 'Command '/home/hanyu/intel/compilers_and_libraries_2019.2.187/linux/bin/intel64/ifort -m64 -openmp -dryrun -dynamiclib -shared-intel -no-cxxlib dummy.f90' returned 1') 
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/hanyu/plc-2.0 -lgfortran -lgomp 
Setting install root to                   : /home/hanyu/plc-2.0 
Setting install bin directory to          : /home/hanyu/plc-2.0/bin 
Setting install lib directory to          : /home/hanyu/plc-2.0/lib 
Setting install include directory to      : /home/hanyu/plc-2.0/include 
check compatibility of ifort and gcc versions : ok 
Checking for program 'python'                 : /usr/bin/python 
Checking for python version                   : 2.7.15 
python-config                                 : /usr/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                                            : /home/hanyu/plc-2.0/lib/libclik_mkl.so 
Checking for library ['clik_mkl', 'iomp5', 'pthread', 'm']         : yes 
Checking for function dposv                                        : yes 
Checking for function dtrsv                                        : yes 
Checking for function dpotrf                                       : yes 
Checking for function dpotrs                                       : yes 
Checking for function dpotri                                       : yes 
Checking for function dtrtri                                       : yes 
Checking for function dtrmm                                        : yes 
Checking for function dtrmv                                        : yes 
Checking for function dgeqrf                                       : yes 
Checking for function dormqr                                       : yes 
Checking for function dsyev                                        : yes 
Checking for function dgesvd                                       : yes 
Checking for function dsymv                                        : yes 
Checking for function dgemv                                        : yes 
Checking for function dgemm                                        : yes 
Checking for function dsyrk                                        : yes 
Checking for function dsyr2k                                       : yes 
Checking for function daxpy                                        : yes 
Checking for function dtrsm                                        : yes 
Checking for function dsymm                                        : yes 
Checking for function dsyr                                         : yes 
Checking for function ddot                                         : yes 
Checking for function dsyevd                                       : yes 
Checking for function dlamch                                       : yes 
Checking for function dsyevr                                       : yes 
Checking for library ['cfitsio']                                   : yes 
Checking for function fits_init_cfitsio                            : yes 
Checking python module 'numpy'                                     : ok 
Checking python module 'pyfits'                                    : ok 
Checking python module 'cython'                                    : ok 
Checking python module 'cython'                                    : ok 
Checking cython version (>0.12)                                    : 0.26.1 
Checking for program 'cython'                                      : /usr/bin/cython 
Add plugin : 'rel2015'                                             : ok 

*----------------------------------------------------*
|                                                    |
|   Configure step ok.                               |
|                                                    |
|   run './waf install' now !                        |
|                                                    |
*----------------------------------------------------*

'configure' finished successfully (3.238s)
Seems it use gfortran and gcc rather than intel compilers. when I force it use ifort and icc, there will be errors and could not ./waf install correctlly. (you can find the configure and errors on my last post)

Thanks,
Hanyu

Re: problem about module clik when compiling cosmomc

Posted: February 26 2019
by Hanyu Zhang
Hi Shouvik,

Thank you for reply.
I guess so, I just go intel official website and download the parallel studio linux version and seems there is no other options than cluster version.
Should I try different version fo intel compilers?

Hanyu

Re: problem about module clik when compiling cosmomc

Posted: February 27 2019
by Shouvik Roychoudhury
Hi Hanyu,

In a cluster, it didn't work for me with Intel 2019, but worked with Intel 2016 (and openmpi-3). I would suggest you try with the Intel 2016 and see what happens. Also, are you making sure that while installing CFITSIO you are using the same compilers (i.e. icc, ifort)?

Regards,
Shouvik

Re: problem about module clik when compiling cosmomc

Posted: February 28 2019
by Hanyu Zhang
Hi Shouvik,

Intel 2016 and openmpi-3 worked! However, I don't actually know which part make it work. Seems it actually doesn't matter if use intel compiler for CFITSIO and plc likelihood or not, just have to make sure mpif90 link to ifort.

Thanks a lot.

Cheers,
Hanyu

Re: problem about module clik when compiling cosmomc

Posted: April 17 2019
by Ayan MitraAM
Hi Everybody,
I have the exact error as this thread. While trying to run Cosmo MC I get the following error :

Code: Select all

cliklike.f90(2): error #7013: This module file was not generated by any release of this compiler.   [CLIK]
    use clik
--------^
cliklike.f90(13): error #6457: This derived type name has not been declared.   [TCMBLIKELIHOOD]
    type, extends(TCMBLikelihood) :: ClikLikelihood
------------------^
cliklike.f90(14): error #6457: This derived type name has not been declared.   [CLIK_OBJECT]
        type(clik_object) :: clikid
-------------^
cliklike.f90(39): error #6457: This derived type name has not been declared.   [TLIKELIHOODLIST]
    class(TLikelihoodList) :: LikeList
----------^
cliklike.f90(40): error #6457: This derived type name has not been declared.   [TSETTINGINI]
    class(TSettingIni) Ini
----------^
cliklike.f90(129): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
---------^
cliklike.f90(131): error #6457: This derived type name has not been declared.   [CMBPARAMS]
    Class (CMBParams) CMB
-----------^
cliklike.f90(132): error #6457: This derived type name has not been declared.   [TCOSMOTHEORYPREDICTIONS]
    Class(TCosmoTheoryPredictions), target :: Theory
----------^
cliklike.f90(133): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) DataParams(:)
---------^
cliklike.f90(218): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
---------^
cliklike.f90(220): error #6457: This derived type name has not been declared.   [CMBPARAMS]
    Class (CMBParams) CMB
-----------^
cliklike.f90(221): error #6457: This derived type name has not been declared.   [TCOSMOTHEORYPREDICTIONS]
    Class(TCosmoTheoryPredictions), target :: Theory
----------^
cliklike.f90(222): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) DataParams(:)
---------^
cliklike.f90(218): error #6404: This name does not have a type, and must have an explicit type.   [CMB]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
-------------------------------------------------^
cliklike.f90(129): error #6404: This name does not have a type, and must have an explicit type.   [CMB]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
-----------------------------------------^
cliklike.f90(218): error #6404: This name does not have a type, and must have an explicit type.   [THEORY]
    real(mcp) function clik_lensing_lnlike(this, CMB, Theory, DataParams)
------------------------------------------------------^
cliklike.f90(129): error #6404: This name does not have a type, and must have an explicit type.   [THEORY]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
----------------------------------------------^
cliklike.f90(47): error #6404: This name does not have a type, and must have an explicit type.   [INI]
    do i=1, Ini%Count
------------^
cliklike.f90(47): error #6460: This is not a field name that is defined in the encompassing structure.   [COUNT]
    do i=1, Ini%Count
----------------^
cliklike.f90(48): error #6460: This is not a field name that is defined in the encompassing structure.   [ITEMS]
        name = Ini%Items(i)%P%Name
-------------------^
cliklike.f90(48): error #6460: This is not a field name that is defined in the encompassing structure.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(48): error #6054: A CHARACTER data type is required in this context.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(49): error #6404: This name does not have a type, and must have an explicit type.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(49): error #6341: A logical data type is required in this context.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(50): error #6460: This is not a field name that is defined in the encompassing structure.   [READFILENAME]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
------------------------^
cliklike.f90(50): error #6054: A CHARACTER data type is required in this context.   [INI]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
--------------------^
cliklike.f90(52): error #6404: This name does not have a type, and must have an explicit type.   [MPIRANK]
            if (MpiRank==0 .and. feedback > 0) &
----------------^
cliklike.f90(52): error #6404: This name does not have a type, and must have an explicit type.   [FEEDBACK]
            if (MpiRank==0 .and. feedback > 0) &
---------------------------------^
cliklike.f90(61): error #6404: This name does not have a type, and must have an explicit type.   [LIKELIST]
            call LikeList%Add(Like)
-----------------^
cliklike.f90(61): error #6460: This is not a field name that is defined in the encompassing structure.   [ADD]
            call LikeList%Add(Like)
--------------------------^
/tmp/ifortH3JyeS.i90(269): catastrophic error: Too many errors, exiting
compilation aborted for cliklike.f90 (code 1)
Makefile:293: recipe for target 'ReleaseMPI/cliklike.o' failed
make: *** [ReleaseMPI/cliklike.o] Error 1
My .bashrc file reads this :

Code: Select all

export PLANCKLIKE=cliklike                                                                                                                                                                                                                                                                             
export CLIK_PATH=/home/ayan/Programs/plc-2.0/                                                                                                                                                                                                                                                          
source /home/ayan/Programs/plc-2.0/bin/clik_profile.sh                                                                                                                                                                                                                                                 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CLIK_PATH/lib                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                       
ln -s /home/ayan/Programs/plc-2.0/ /home/ayan/Programs/plc-2.0/src/python/clik                                                                                                                                                                                                                          
                                                                                     

If I execute the 'waf configuration' , apart from the other results which are ok, I get the same error on ifort as mentioned in the thread above :

Code: Select all

ifort not found, defaulting to gfortran (cause: 'Command '/opt/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64/ifort -m64 -openmp -dryrun -dynamiclib -shared-intel -no-cxxlib dummy.f90' returned 1')
I dont understand how to link ifort and hence gfortran is taking over I guess.
Apart from that, I have no clue!
Any help ?
thanks,
Ayan

Re: problem about module clik when compiling cosmomc

Posted: April 26 2019
by Ayan MitraAM
Okay, I have found some light in the dark,

Code: Select all

./waf configure --install_all_deps
I still get  retrieve ifort link line                  : not found 
ifort not found, defaulting to gfortran (cause: 'Command '/home/ayan/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64/ifort -m64 -openmp -dryrun -dynamiclib -shared-intel -no-cxxlib dummy.f90' returned 1')
if I just enter this command in terminal

Code: Select all

/home/ayan/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64/ifort -m64 -openmp -dryrun -dynamiclib -shared-intel -no-cxxlib dummy.f90
I get this error :

Code: Select all

ifort: command line error: option '-openmp' is not supported. Please use the replacement option '-qopenmp'
instead If i change the openmpi with qopenmpi and re-enter the same line in terminal , the above command executes without any error

So I edited the /waf_tools/try_ifort.py file : I looked for the flags ' openmp ' inside it, 2 are there, changing the first one to qopenmp, would solve this error. In essence that's why older versions of Ifort worked, because in older versions of Ifort, openmp is used and qopenmp is a new flag requirement.

But, I have a new problem now, when I do after the above,

Code: Select all

./waf install
I get error(s) like :

Code: Select all

src/libclik.so: undefined reference to `for_array_copy_out'
collect2: error: ld returned 1 exit status


in full like this

Code: Select all

[109/125] Processing src/bflike/clik_bflike.f90
[110/125] Linking build/src/libclik.so
[113/125] Linking build/src/python/lkl.so
[112/125] Linking build/src/python/lkl_lensing.so
[113/125] Linking build/src/python/parametric.so
[114/125] Linking build/src/clik_example_C
[115/125] Linking build/src/python/rel2015.so
[116/125] Linking build/src/libclik_f90.so
+ install /home/ayan/Programs/plc-2.0/lib/libclik.so (from build/src/libclik.so)
+ install /home/ayan/Programs/plc-2.0/lib/python2.7/site-packages/clik/lkl.so (from build/src/python/lkl.so)
+ install /home/ayan/Programs/plc-2.0/lib/python2.7/site-packages/clik/parametric.so (from build/src/python/parametric.so)
+ install /home/ayan/Programs/plc-2.0/lib/python2.7/site-packages/clik/rel2015.so (from build/src/python/rel2015.so)
+ install /home/ayan/Programs/plc-2.0/lib/python2.7/site-packages/clik/lkl_lensing.so (from build/src/python/lkl_lensing.so)
src/libclik.so: undefined reference to `for_inquire'
src/libclik.so: undefined reference to `for_open'
src/libclik.so: undefined reference to `__libm_sse2_sincos'
src/libclik.so: undefined reference to `GOMP_parallel'
src/libclik.so: undefined reference to `for_write_seq'
src/libclik.so: undefined reference to `for_write_seq_fmt'
src/libclik.so: undefined reference to `for_backspace'
src/libclik.so: undefined reference to `for_read_int_fmt'
src/libclik.so: undefined reference to `for_f90_index'
src/libclik.so: undefined reference to `GOMP_loop_dynamic_next'
src/libclik.so: undefined reference to `for_close'
src/libclik.so: undefined reference to `for_concat'
src/libclik.so: undefined reference to `for_contig_array'
src/libclik.so: undefined reference to `for_cpusec_t'
src/libclik.so: undefined reference to `for_array_copy_in'
src/libclik.so: undefined reference to `for_trim'
src/libclik.so: undefined reference to `for_check_mult_overflow64'
src/libclik.so: undefined reference to `__svml_pow2'
src/libclik.so: undefined reference to `for_write_seq_fmt_xmit'
src/libclik.so: undefined reference to `__svml_sincos2'
src/libclik.so: undefined reference to `for_adjustl'
src/libclik.so: undefined reference to `for_read_seq_fmt'
src/libclik.so: undefined reference to `for_write_seq_lis'
src/libclik.so: undefined reference to `for_deallocate'
src/libclik.so: undefined reference to `for_read_seq_lis_xmit'
src/libclik.so: undefined reference to `for_allocate'
src/libclik.so: undefined reference to `for_read_seq'
src/libclik.so: undefined reference to `__svml_log2'
src/libclik.so: undefined reference to `for_dealloc_allocatable'
src/libclik.so: undefined reference to `for_read_int_lis_xmit'
src/libclik.so: undefined reference to `for_cpstr'
src/libclik.so: undefined reference to `for_write_seq_lis_xmit'
src/libclik.so: undefined reference to `for_alloc_allocatable'
src/libclik.so: undefined reference to `for_rewind'
src/libclik.so: undefined reference to `for_exit'
src/libclik.so: undefined reference to `__svml_logf4'
src/libclik.so: undefined reference to `for_read_seq_xmit'
src/libclik.so: undefined reference to `for_read_int_lis'
src/libclik.so: undefined reference to `GOMP_loop_end_nowait'
src/libclik.so: undefined reference to `for_len_trim'
src/libclik.so: undefined reference to `for_read_seq_nml'
src/libclik.so: undefined reference to `for_stop_core'
src/libclik.so: undefined reference to `for_read_seq_lis'
src/libclik.so: undefined reference to `for_deallocate_all'
src/libclik.so: undefined reference to `for_cpystr'
src/libclik.so: undefined reference to `GOMP_loop_dynamic_start'
src/libclik.so: undefined reference to `for_realloc_lhs'
src/libclik.so: undefined reference to `for_array_copy_out'
collect2: error: ld returned 1 exit status

[123/125] Linking build/src/clik_example_f90
+ install /home/ayan/Programs/plc-2.0/lib/libclik_f90.so (from build/src/libclik_f90.so)
src/libclik.so: undefined reference to `GOMP_parallel'
src/libclik.so: undefined reference to `GOMP_loop_dynamic_next'
src/libclik.so: undefined reference to `GOMP_loop_end_nowait'
src/libclik.so: undefined reference to `GOMP_loop_dynamic_start'

Waf: Leaving directory `/home/ayan/Programs/plc-2.0/build'
Build failed
 -> task in 'clik_example_C' failed (exit status 1): 
	{task 139924176385616: cprogram clik_example_c.c.7.o -> clik_example_C}
['/usr/bin/gcc', '-m64', 'src/clik_example_c.c.7.o', '-o', '/home/ayan/Programs/plc-2.0/build/src/clik_example_C', '-Wl,-rpath,/home/ayan/Programs/plc-2.0/lib', '-Wl,-rpath,/home/ayan/Programs/plc-2.0/lib', '-Wl,-rpath,/lib', '-Wl,-rpath,/lib64', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Lsrc', '-L/home/ayan/Programs/plc-2.0/lib', '-L/lib', '-L/lib64', '-lclik', '-llapack', '-lblas', '-ldl', '-lcfitsio', '-lirc', '-lpthread']
 -> task in 'clik_example_f90' failed (exit status 1): 
	{task 139924176437520: fcprogram clik_example_f90.f90.9.o -> clik_example_f90}
['/home/ayan/intel/compilers_and_libraries_2019.3.199/linux/bin/intel64/ifort', '-m64', 'src/clik_example_f90.f90.9.o', '-o', '/home/ayan/Programs/plc-2.0/build/src/clik_example_f90', '-Wl,-rpath,/home/ayan/Programs/plc-2.0/lib', '', '', '-Lsrc', '-lclik_f90', '-lclik']
ayan@AM:
so I understand the linking is not working between them, any help ?

thanks,
Ayan

Re: problem about module clik when compiling cosmomc

Posted: April 27 2019
by Antony Lewis
Use the link at

viewtopic.php?f=11&t=3143

if you have problems with clik and newer compiler versions.

Re: problem about module clik when compiling cosmomc

Posted: May 29 2019
by Akhilesh Nautiyal(akhi)
I could resolve this issue by adding -lifcore in any_lapack.py.