error compiling cliklike

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Elisa Ferreira
Posts: 13
Joined: March 21 2014
Affiliation: McGill University

error compiling cliklike

Post by Elisa Ferreira » March 21 2014

Hi,

I have been having this problem for compiling cosmomc and don't know what to do.

After following all the instructions on the website and modifying the bashrc like this:

Code: Select all

export PLANCKLIKE=cliklike
export CLIKPATH=/home/elisa/cosmomc_bicep2/PLC/plc-1.0/
source /home/elisa/cosmomc_bicep2/PLC/plc-1.0/bin/clik_profile.sh
export PYTHONPATH=/home/elisa/cosmomc_bicep2/cosmomc/python:$PYTHONPATH
and putting the command

Code: Select all

ln -s /home/elisa/cosmomc_bicep2/PLC/plc-1.0/ ./data/clik
when I make the cosmomc I get the error:

Code: Select all

mpif90 -mkl -openmp -O3 -xHost -no-prec-div -fpp -DMPI -DCLIK -I../camb -I/home/elisa/cosmomc_bicep2/PLC/plc-1.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
--------^
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(128): error #6683: A kind type parameter must be a compile-time constant.   [MCP]
    real(mcp) function clik_lnlike(this, CMB, Theory, DataParams)
---------^
cliklike.f90(130): error #6457: This derived type name has not been declared.   [CMBPARAMS]
    Class (CMBParams) CMB
-----------^
cliklike.f90(131): error #6457: This derived type name has not been declared.   [TCOSMOTHEORYPREDICTIONS]
    Class(TCosmoTheoryPredictions), target :: Theory
----------^
cliklike.f90(132): 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(128): 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(128): 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(46): error #6404: This name does not have a type, and must have an explicit type.   [INI]
    do i=1, Ini%Count
------------^
cliklike.f90(46): error #6460: This is not a field name that is defined in the encompassing structure.   [COUNT]
    do i=1, Ini%Count
----------------^
cliklike.f90(47): error #6460: This is not a field name that is defined in the encompassing structure.   [ITEMS]
        name = Ini%Items(i)%P%Name
-------------------^
cliklike.f90(47): error #6460: This is not a field name that is defined in the encompassing structure.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(47): error #6054: A CHARACTER data type is required in this context.   [NAME]
        name = Ini%Items(i)%P%Name
------------------------------^
cliklike.f90(48): error #6404: This name does not have a type, and must have an explicit type.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(48): error #6341: A logical data type is required in this context.   [STRINGSTARTS]
        if (StringStarts(name,'clik_data_')) then
------------^
cliklike.f90(49): error #6460: This is not a field name that is defined in the encompassing structure.   [READFILENAME]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
------------------------^
cliklike.f90(49): error #6054: A CHARACTER data type is required in this context.   [INI]
            fname = Ini%ReadFileName(name, NotFoundFail = .false.)
--------------------^
cliklike.f90(51): error #6404: This name does not have a type, and must have an explicit type.   [MPIRANK]
            if (MpiRank==0 .and. feedback > 0) &
----------------^
cliklike.f90(51): error #6404: This name does not have a type, and must have an explicit type.   [FEEDBACK]
            if (MpiRank==0 .and. feedback > 0) &
---------------------------------^
cliklike.f90(59): error #6404: This name does not have a type, and must have an explicit type.   [LIKELIST]
            call LikeList%Add(Like)
-----------------^
cliklike.f90(59): error #6460: This is not a field name that is defined in the encompassing structure.   [ADD]
            call LikeList%Add(Like)
--------------------------^
/tmp/ifortOf3ET2.i90(267): catastrophic error: Too many errors, exiting
compilation aborted for cliklike.f90 (code 1)
make[1]: *** [ReleaseMPI/cliklike.o] Error 1
make[1]: Leaving directory `/sb/home/elisa/cosmomc_bicep2/cosmomc/source'
make: *** [cosmomc] Error 2
Maybe it is relevant to say that when I configured the plc file i couldn't put like in the website:
./waf configure --lapack_mkl=${MKLROOT} --lapack_mkl_version=10.3 --install_all_deps

so I only put

Code: Select all

./waf configure  --install_all_deps
and the lapack and blas installed automatically.

Thank you very much,
Elisa

*PS: I am compiling in a cluster and added "all"the necessary modules, including ifort 14.

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

error compiling cliklike

Post by Jason Dossett » March 21 2014

Here is my .bashrc set up

Code: Select all

export PLC_PATH=/home/uqdpark7/Planck_likelihood
export PLANCKLIKE=cliklike
export CLIKPATH=$PLC_PATH/plc-1.0
source $CLIKPATH/bin/clik_profile.sh
export PYTHONPATH=$PYTHONPATH:/home/uqjdosse/repos/cosmomc/python
Also, it looks like you linked data/clik wrong, I use

Code: Select all

ln -s $PLC_PATH ./data/clik
which points the clik directory to one level up from where you have it pointing now.

As far as why CosmoMC doesn't compile, that is a good question. Based upon your error messages when compiling, it looks like clik is not getting built with the intel compilers. You can check plc-1.0/build/config.log and search for ifort and icc to see if CC and FC are getting pointed to them or not when running waf. Finally, double check mpif90 is pointing to the correct version of ifort with

Code: Select all

mpif90 --version
Hope that helps.

-Jason

Elisa Ferreira
Posts: 13
Joined: March 21 2014
Affiliation: McGill University

error compiling cliklike

Post by Elisa Ferreira » March 21 2014

Hi Jason,

Thank you very much for your help. I corrected the mistakes you pointed and checked the config.log and indeed it is pointing ifort to gfortran, which is weird since I didn't edit anything regarding that.

Code: Select all

----------------------------------------
Checking for program ifort
gfortran
find program=['ifort'] paths='' var='FC' -> 'gfortran'
from /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0: cannot determine ifort version.
This could be happening because I am in the cluster and I had to add ifort 14 as a module and somehow ifort is not being found? Would you happen to know how to fix that?

Double checking the version:

Code: Select all

mpif90 --version 
I get:

Code: Select all

[elisa@lg-1r14-n03 build]$ mpif90 --version
ifort (IFORT) 14.0.0 20130728
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.
Thank you very much,
Elisa
[/code]

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

error compiling cliklike

Post by Jason Dossett » March 21 2014

Hi Elisa,
To override the compilers and force ifort/icc use

Code: Select all

./waf configure  --install_all_deps --icc --ifort
If that doesn't work it probably indicates that your ifort module on the cluster has not loaded "properly" and assigned the environmental variables as it should.

Also, it is preferable to use mkl for lapack as it is much faster. Check and see if there is an MKL module available on your cluster, loading it should load the environmental variable $MKLROOT (although it should load with your ifort modules). After that you should be able to add

Code: Select all

--lapack_mkl=$MKLROOT --lapack_mkl_version=10.3
back into the configure line.


-Jason

Elisa Ferreira
Posts: 13
Joined: March 21 2014
Affiliation: McGill University

error compiling cliklike

Post by Elisa Ferreira » March 22 2014

Hi Jason,

First of all thank you very much for your help. It is really helping me understand the program a little better.

I tried what you suggested to force using ifort and icc:

Code: Select all

./waf configure  --install_all_deps --icc --ifort
However, I get:

Code: Select all

Setting top to                           : /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0 
Setting out to                           : /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/build 
Checking for program gcc,cc              : gcc 
Checking for program ar                  : /usr/bin/ar 
Check gcc version                        : gcc (4.7.2-clumeq) 4.7.2 
Compile a test code with gcc             : yes 
Setting architecture flag to             : -m64 
Checking for program ifort               : gfortran 
No suitable fortran compiler found (cause: 'cannot determine ifort version.
(complete log in /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/build/config.log)') 
The configuration failed
(complete log in /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/build/config.log)
So, it seems that the waf is not finding my ifort. I know it is loaded and is the right version. The compiler is located in the path:

Code: Select all

[elisa@lg-1r14-n02 waf_tools]$ type -p ifort
/software/compilers/Intel/2013-sp1-14.0/bin/ifort
and not even forcing I waf was able to find it.

The same weird thing happened when I tried to include:

Code: Select all

--lapack_mkl=$MKLROOT --lapack_mkl_version=10.3
in the waf configure. It doesn't find MKL. And I checked if $MKLROOT was giving me the right path and got:

Code: Select all

[elisa@lg-1r14-n04 ~]$ echo $MKLROOT
/sb/software/libraries/MKL/10.3
so, it seems ok, but still doesn't work.


Another thing that I tried was to change the Makefile and put the paths by hand and make after. It works fine until it gets to clik and then it seems it the lapack libraries are not well installed. The error that I get is:

Code: Select all

[elisa@lg-1r14-n04 plc-1.0]$ make
\n\x1b[35;11mCompile\x1b[0m clik 5887 MAKEFILE 
\x1b[35;11mUsing \x1b[0m CC = icc
\x1b[35;11mUsing \x1b[0m FC = ifort
\x1b[35;11mUsing \x1b[0m CFLAGS = -m64  -fopenmp -fPIC  -D HAS_LAPACK -D LAPACK_CLIK -D NOHEALPIX -D CLIK_LENSING -D 'CLIKSVNVERSION=5887 MAKEFILE' -I src -I src/cldf -I src/minipmc -I src/lenslike/plenslike -I/software/libraries/CFITSIO/3.28/include
\x1b[35;11mUsing \x1b[0m FFLAGS =  -m64 -openmp -fPIC  -D HAS_LAPACK -D LAPACK_CLIK -D NOHEALPIX -D CLIK_LENSING -D 'CLIKSVNVERSION=5887 MAKEFILE' -module /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp
\x1b[35;11mUsing the following lapack link line:\x1b[0m -L /build/lapack-3.3.1 
\x1b[35;11mUsing the following cfitsio link line:\x1b[0m -L/software/libraries/CFITSIO/3.28/lib -lcfitsio
\x1b[35;11mUsing the following fortran runtime link line:\x1b[0m -L/software/compilers/Intel/2013-sp1-14.0/lib/intel64/ -lintlc -limf -lsvml -liomp5 -lifport -lifcoremt -lpthread
\x1b[35;11mBuild dir:\x1b[0m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir

\x1b[32;11msrc/minipmc/errorlist.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/errorlist.o \x1b[0m
\x1b[32;11msrc/minipmc/io.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/io.o \x1b[0m
\x1b[32;11msrc/minipmc/distribution.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/distribution.o \x1b[0m
\x1b[32;11msrc/cldf/cldf.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/cldf.o \x1b[0m
\x1b[32;11msrc/clik.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik.o \x1b[0m
\x1b[32;11msrc/lklbs.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/lklbs.o \x1b[0m
\x1b[32;11msrc/lowly_common.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/lowly_common.o \x1b[0m
\x1b[32;11msrc/clik_helper.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_helper.o \x1b[0m
\x1b[32;11msrc/clik_lowlike.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_lowlike.o \x1b[0m
\x1b[32;11msrc/clik_actspt.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_actspt.o \x1b[0m
\x1b[32;11msrc/clik_gibbs.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_gibbs.o \x1b[0m
\x1b[32;11msrc/CAMspec/clik_CAMspec.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_CAMspec.o \x1b[0m
\x1b[32;11msrc/act_spt/Highell_options.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Highell_options.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/Highell_subroutines.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Highell_subroutines.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/Foregrounds_loading.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Foregrounds_loading.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/ACT_equa_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/ACT_equa_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/SPT_reichardt_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/SPT_reichardt_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/ACT_south_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/ACT_south_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/SPT_keisler_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/SPT_keisler_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/act_spt/Highell_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Highell_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/clik_actspt.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_actspt.f90.o \x1b[0m
\x1b[32;11msrc/CAMspec/CAMspec.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/CAMspec.f90.o \x1b[0m
\x1b[32;11msrc/CAMspec/clik_CAMspec.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_CAMspec.f90.o \x1b[0m
\x1b[32;11msrc/gibbs/comm_br_mod.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/comm_br_mod.f90.o \x1b[0m
\x1b[32;11msrc/clik_gibbs.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_gibbs.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/healpix_types.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/healpix_types.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/read_archive_map.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/read_archive_map.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/read_fits.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/read_fits.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/br_mod_dist.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/br_mod_dist.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/Planck_options.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Planck_options.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/Planck_teeebb_pixlike.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Planck_teeebb_pixlike.f90.o \x1b[0m
\x1b[32;11msrc/lowlike/Planck_likelihood.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/Planck_likelihood.f90.o \x1b[0m
\x1b[32;11msrc/clik_lowlike.f90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_lowlike.f90.o \x1b[0m
\x1b[32;11msrc/lenslike/plenslike/plenslike_dat_mono.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/plenslike_dat_mono.o \x1b[0m
\x1b[32;11msrc/lenslike/plenslike/plenslike_dat_quad.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/plenslike_dat_quad.o \x1b[0m
src/lenslike/plenslike/plenslike_dat_quad.c(95): warning #187: use of "=" where "==" may have been intended
      assert( err = 3 );
      ^

src/lenslike/plenslike/plenslike_dat_quad.c(127): warning #187: use of "=" where "==" may have been intended
        assert( err = 2 );
        ^

\x1b[32;11msrc/lenslike/plenslike/qest.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/qest.o \x1b[0m
\x1b[32;11msrc/lenslike/plenslike/wignerd.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/wignerd.o \x1b[0m
build \x1b[35;11m/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so \x1b[0m
\x1b[32;11msrc/clik_fortran.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_fortran.o \x1b[0m
\x1b[32;11msrc/clik.F90 \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik.f90.o \x1b[0m
build \x1b[35;11m/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik_f90.so \x1b[0m
\x1b[32;11msrc/clik_example_c.c \x1b[0m -> \x1b[32;11m /sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/tmp/clik_example_c.o \x1b[0m
build \x1b[35;11m/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/clik_example_C \x1b[0m
icc: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `dtrsv_'
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `ddot_'
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `dpotrf_'
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `dpotri_'
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `dgemv_'
/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/libclik.so: undefined reference to `dsymv_'
make: *** [/sb/home/elisa/cosmomc_bicep2/PLC/plc-1.0/buildir/clik_example_C] Error 1
The makefile was modified in the following way (only the first part of the

Code: Select all

makefile):
# to build
# $> make

# to install the core utilities
# $> make install

# to install the optional python utilities
# $> make python_install

# cleanup
# $> make clean

# here are the thing that you should modify
################################################################################################

# set your prefix to where you want to install clik.
# default is to let it in the current directory
PREFIX := $(shell pwd)

# set the path of the cfitsio lib.
#CFITSIOPATH := /usr/local
CFITSIOPATH := /software/libraries/CFITSIO/3.28
# you have a CFITSIO lib in a weird location, also set those
CFITSIO_INCPATH := $(CFITSIOPATH)/include
CFITSIO_LIBPATH := $(CFITSIOPATH)/lib

#define your compilers and stuff
CC = icc
FC = ifort

# ifort
# if you are using ifort set here where its lib are installed
# and check the runtime libs

# on my mac I got
#IFORTLIBPATH = /softwares/compilers/intel
#IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifportmt -lifcoremt -lpthread

# on a linux machine, ifort 11.1
IFORTLIBPATH = /software/compilers/Intel/2013-sp1-14.0/lib/intel64/
IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifport -lifcoremt -lpthread

# gfortran
# if you are using gfortran set here where the lib are installed
# and check the runtime libs
#GFORTRANLIBPATH = /usr/lib
#GFORTRANRUNTIME = -L$(GFORTRANLIBPATH) -lgfortran -lgomp

# if you are on linux and using mkl, you need to set this
$MKLROOT = /software/compilers/Intel/2013-sp1-14.0/mkl
$LAPACKLIBPATHMKL = -L$(MKROOT)/lib/intel64
#some example
#MKLROOT = /softs/intel/mkl/10.2.6.038/
# on mkl 10.3
#LAPACKLIBPATHMKL = -L$(MKLROOT)/lib/intel64
# on mkl 10.2
#LAPACKLIBPATHMKL = -L$(MKLROOT)/lib/em64t

#if you want to point to your own version of lapack set the following variables
LAPACK =-L /build/lapack-3.3.1
LAPACKLIBPATH = /build/lapack-3.3.1


# pretty colors (comment to remove pretty colors)
COLORS = 1

# what is the openmp option for your C compiler (leave empty to cmpile without openmp)
COPENMP = -fopenmp
# what is the openmp option for your F90 compiler (leave empty to cmpile without openmp)
FOPENMP = -openmp

# what is the 32/64 bit option for your C compiler (leave empty if you don't want to know)
CM64 =
#CM64 = -arch x86_64 #macos
CM64 = -m64 #linux

# what is the 32/64 bit option for your F90 compiler (leave empty if you don't want to know)
FM64 =
#FM64 = -arch x86_64 #macos
FM64 = -m64

# set the variable to the python cli to compile and install the python tools
PYTHON = python


################################################################################################
Any ideas on how to modify the waf to find the ifort or how to make the "make"work? :-)

Thank you very much,
Elisa

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

error compiling cliklike

Post by Jason Dossett » March 22 2014

Hi Elisa,

I think the trouble with waf probably has to do with something in your environment not being set up right. Without seeing your environment set up I can't tell you much more on that part. I can however help with your manual makefile set up. Here is mine from a while back when I was compiling without waf:

Code: Select all

# to build 
# $> make

# to install the core utilities
# $> make install

# to install the optional python utilities
# $> make python_install

# cleanup
# $> make clean

# here are the thing that you should modify 
################################################################################################

# set your prefix to where you want to install clik.
# default is to let it in the current directory
PREFIX := $(shell pwd)

# set the path of the cfitsio lib. 
#CFITSIOPATH := /net/ff/ph/1/dist/cfitsio
#CFITSIOPATH := /softs/cfitsio/3.24
# you have a CFITSIO lib in a weird location, also set those
#CFITSIO_INCPATH := $(CFITSIOPATH)/include
#CFITSIO_LIBPATH := $(CFITSIOPATH)/lib
CFITSIO_INCPATH := /usr/include/cfitsio
CFITSIO_LIBPATH := /usr/lib64

#define your compilers and stuff
CC = icc
FC = ifort

# ifort
# if you are using ifort set here where its lib are installed
# and check the runtime libs

# on my mac I got
IFORTLIBPATH = /opt/intel/compiler/lib/intel64
IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifport -lifcoremt -lpthread

# on a linux machine, ifort 11.1
#IFORTLIBPATH = /softs/intel/fce/11.1.075/lib/intel64
#IFORTRUNTIME = -L$(IFORTLIBPATH) -lintlc -limf -lsvml -liomp5 -lifport -lifcoremt -lpthread

# gfortran
# if you are using gfortran set here where the lib are installed
# and check the runtime libs
GFORTRANLIBPATH = /usr/lib
GFORTRANRUNTIME = -L$(GFORTRANLIBPATH) -lgfortran -lgomp

# if you are on linux and using mkl, you need to set this 
MKLROOT = /opt/intel/mkl
LAPACKLIBPATHMKL = $(MKLROOT)/lib/intel64

#if you want to point to your own version of lapack set the following variables
#LAPACK = -L/some/path -lsomefortranlapack -lsomedependencyforyourlapack
#LAPACKLIBPATH = /some/path
The major issue I see with what you have used is that you put a $ in front of your MKLROOT when defining it as well as your LAPACKLIBPATHMKL.

Also compiling manually with the makefile causes the intel compilers to complain about where -lm. After a bit of fudging I was able to fix this. I have a modified Makefile at https://www.dropbox.com/s/sl6v4me1uuiny ... ile_planck. I updated it to the paths you have shown above, so it should be plug and go.

Hope that can help you,
Jason

Elisa Ferreira
Posts: 13
Joined: March 21 2014
Affiliation: McGill University

error compiling cliklike

Post by Elisa Ferreira » March 24 2014

Hi Jason,

Thank you very very much for all your help. I had already tried the path that you put for the MKL and got the same errors. I tried to compile with the Makefile you provided me and also got the same error as before (the -lm error).
Now I contacted the people from the cluster that I am working to see if it is something related to their system, because I really don't know what to do next.
But, again, thank you very much for all your help!!

Best,
Elisa

Gansukh Tumurtushaa
Posts: 34
Joined: October 05 2013
Affiliation: Sogang univ.

error compiling cliklike

Post by Gansukh Tumurtushaa » March 28 2014

Hi all?

Exactly same error occurred when I compile.

How did you handle the error?

-Gansukh T

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

error compiling cliklike

Post by Jason Dossett » March 28 2014

Just a heads up, those errors are not related to -lm but are rather related to lapack. Most likely your MKL is not linking correctly. The -lm warning is something separate that the compiler is giving a warning about but should not actually keep the program from compiling.

Gansukh Tumurtushaa
Posts: 34
Joined: October 05 2013
Affiliation: Sogang univ.

error compiling cliklike

Post by Gansukh Tumurtushaa » March 31 2014

I am not sure whether this is solution or not but I made a change in the source/Makefile that:

Code: Select all

F90C     = ifort
MPIF90C = mpif90
FFLAGS = -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp
added -f90 = ifort . It compiled without any error, but results with some warnings:

Code: Select all

make[1]: Entering directory `/home/gansuh2/project1/cosmomc/source'
mkdir -p Release
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c MiscUtils.f90 -o Release/MiscUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c ArrayUtils.f90 -o Release/ArrayUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c StringUtils.f90 -o Release/StringUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c MpiUtils.f90 -o Release/MpiUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c FileUtils.f90 -o Release/FileUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c RandUtils.f90 -o Release/RandUtils.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c ObjectLists.f90 -o Release/ObjectLists.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c Interpolation.f90 -o Release/Interpolation.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c IniObjects.f90 -o Release/IniObjects.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c ObjectParamNames.f90 -o Release/ObjectParamNames.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c Matrix_utils_new.f90 -o Release/Matrix_utils_new.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c settings.f90 -o Release/settings.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c samples.f90 -o Release/samples.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c IO.f90 -o Release/IO.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK -I../camb -I/home/gansuh2/project1/plc-1.0/include -module Release -IRelease/ -c GetDist.f90 -o Release/GetDist.o
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
ifort -o ../getdist Release/MiscUtils.o Release/ArrayUtils.o Release/StringUtils.o Release/MpiUtils.o Release/FileUtils.o Release/RandUtils.o Release/ObjectLists.o Release/Interpolation.o Release/IniObjects.o Release/ObjectParamNames.o Release/Matrix_utils_new.o Release/settings.o Release/samples.o Release/IO.o Release/GetDist.o  -f90=ifort -mkl -openmp -O3 -xHost -no-prec-div -fpp -DCLIK
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
make[1]: Leaving directory `/home/gansuh2/project1/cosmomc/source'
gansuh2@soliton2:~/project1/cosmomc$ ls
I have no idea whether this is good or not.

To see things are start running OK, I also checked

Code: Select all

mpirun -np 2 ./cosmomc test.ini
It compiled fine, without any error and warnings. But there is no output files in the chain directory. I think running was okay.
Any comments on why there are no outputs in chain?

-Gansukh

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

error compiling cliklike

Post by Jason Dossett » March 31 2014

It looks like you are running the latest version of CosmoMC. Note that with the latest version, test.ini is setup to run with action = 4. This is a new option that is there so you can quickly test the code and any new likelihood codes. No chains are produced with action = 4. The code simply calculates and prints the likelihoods at the central parameter value. In order to produce chains you have to run with action = 0.

As far as the warnings you saw. I suggest rewriting your makefile to the following instead:

Code: Select all

F90C     = ifort 
MPIF90C = mpif90 -f90=ifort
FFLAGS = -mkl -openmp -O3 -xHost -no-prec-div -fpp 
that should alleviate your warnings.

Zhaoyi Zhou
Posts: 10
Joined: September 22 2018
Affiliation: Shandong University

Re: error compiling cliklike

Post by Zhaoyi Zhou » September 23 2018

Hello, I meet the cliklike.f90 problem when I am compiling CosmoMC, the error shows below:

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)
--------------------------^
I think where the error starts

Code: Select all

This module file was not generated by any release of this compiler
might helps to solve the question. But I still don't understand how to solve it. Is there someone who know how to fix it?
Thanks a lot.

Post Reply