TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Error in Triqs cmake #102

Closed arshadfarhan closed 11 years ago

arshadfarhan commented 11 years ago

hello, i have been trying to compile TRIQS but facing some error as i'm a new user of linux. i used the command:

cmake /home/mafarhan/src/TRIQS-src/TRIQS-master -DBOOST_SOURCE_DIR=/home/mafarhan/src/TRIQS-src/boost_1_49_0 -DCMAKE_INSTALL_PREFIX=/home/mafarhan/programs/triqs_build/triqs-install -DBLAS_LIBRARY=/opt/gsl-1.8/lib/libgslcblas.so.0:/usr/lib64/libblas.so.3 -DMKL_LIBRARY=/opt/intel/mkl/11.1.059/lib/em64t/libmkl_intel_lp64.a:/opt/intel/mkl/11.1.059/lib/em64t/libmkl_sequential.a:/opt/intel/mkl/11.1.059/lib/em64t/libmkl_core.a -DLAPACK_LIBRARY=/opt/intel/mkl/11.1.059/lib/em64t/libmkl_solver_lp64_sequential.a -DMKL_INCLUDE_DIR=/opt/intel/mkl/11.1.059/include/ -DPYTHON_LIBRARY=/home/mafarhan/bin/lib/python3.3/ -DPYTHON_INCLUDE_DIR=/home/mafarhan/bin/include/python3.3m/

and the output of this cmake is as :

-- Installation directory is /home/mafarhan/programs/triqs_build/triqs-install -- DYNAMIC Built -- CMAKE_GENERATOR: Unix Makefiles -- CMAKE_CL_64: -- CMAKE_SIZEOF_VOID_P: 8 -- CMAKE_GENERATOR: Unix Makefiles -- CMAKE_CL_64: -- Build type: Release -- MPI compiler was /opt/mpi/intel/mpich2-1.4.1p1/bin/mpic++ -- HDF5 version found is 1.8.10 in /home/mafarhan/bin/include CMake Error: Error in cmake code at /home/mafarhan/src/TRIQS-src/TRIQS-master/cmake/FindPython.cmake:211: Parse error. Function missing ending ")". Instead found unterminated string with text " ${BUILD_SHARED_LIBS})

IF(PYTHON_ENABLEMODULE${_NAME}) IF(PYTHONMODULE${_NAME}_BUILD_SHARED) SET(PY_MODULE_TYPE MODULE) ELSE(PYTHONMODULE${_NAME}_BUILD_SHARED) SET(PY_MODULE_TYPE STATIC) SET_PROPERTY(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) ENDIF(PYTHONMODULE${_NAME}_BUILD_SHARED) SET_PROPERTY(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})

TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})

ENDIF(PYTHON_ENABLEMODULE${_NAME}) ENDFUNCTION(PYTHON_ADD_MODULE)

". CMake Error at cmake/FindTRIQS_dep_libs.cmake:182 (find_package): find_package Error reading CMake code from "/home/mafarhan/src/TRIQS-src/TRIQS-master/cmake/FindPython.cmake". Call Stack (most recent call first): CMakeLists.txt:44 (find_package)

-- HDF5_LIBRARIES = debug;/home/mafarhan/bin/lib/libhdf5_hl.so;/home/mafarhan/bin/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/librt.so;/usr/lib64/libm.so;/home/mafarhan/bin/lib/libhdf5_cpp.so;optimized;/home/mafarhan/bin/lib/libhdf5_hl.so;/home/mafarhan/bin/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/librt.so;/usr/lib64/libm.so;/home/mafarhan/bin/lib/libhdf5_cpp.so -- Triqs general lib detection ( but boost ) -- Adding definitions -D_LARGEFILE_SOURCE;-D_LARGEFILE64_SOURCE;-D_BSD_SOURCE;-D_LARGEFILE_SOURCE;-D_LARGEFILE64_SOURCE;-D_BSD_SOURCE -- Adding include /opt/mpi/intel/mpich2-1.4.1p1/include;/home/mafarhan/bin/include -- Adding libs /opt/mpi/intel/mpich2-1.4.1p1/lib/libmpichcxx.a;/opt/mpi/intel/mpich2-1.4.1p1/lib/libmpich.a;/opt/mpi/intel/mpich2-1.4.1p1/lib/libopa.a;/opt/mpi/intel/mpich2-1.4.1p1/lib/libmpl.a;/usr/lib64/librt.so;/usr/lib64/libpthread.so;debug;/home/mafarhan/bin/lib/libhdf5_hl.so;/home/mafarhan/bin/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/librt.so;/usr/lib64/libm.so;/home/mafarhan/bin/lib/libhdf5_cpp.so;optimized;/home/mafarhan/bin/lib/libhdf5_hl.so;/home/mafarhan/bin/lib/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/librt.so;/usr/lib64/libm.so;/home/mafarhan/bin/lib/libhdf5_cpp.so;/home/mafarhan/bin/lib/python3.3/ -- Adding library dir
CMake Error at CMakeLists.txt:59 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command.

-- Python modules will be installed in /home/mafarhan/programs/triqs_build/triqs-install//pytriqs -- I am using boost sources from /home/mafarhan/src/TRIQS-src/boost_1_49_0 to compile a mini boost_for_triqs -- BOOST_INCLUDE_DIR = /home/mafarhan/src/TRIQS-src/boost_1_49_0 -- You are using mkl -- cblas header found at /opt/intel/Compiler/11.1/059/mkl/include -- Could NOT find Git (missing: GIT_EXECUTABLE) -- 64 bit machine : Adding -fpic CMake Error at triqs/arrays/test/CMakeLists.txt:9 (add_subdirectory): add_subdirectory given source "C++_with_py_support" which is not an existing directory.

-- Preparing python module ArrayTests -- Making pytriqs/Base/Tests/array_tests.py -- Preparing python module test_converter -- Making pytriqs/Tools/test/pytriqs_test_converter.py CMake Error at pytriqs/Base/CMakeLists.txt:14 (add_subdirectory): add_subdirectory given source "GF_Local" which is not an existing directory.

-- Preparing python module LatticeTools -- Making pytriqs/Base/Lattice/pytriqs_LatticeTools.py -- MPI launch command is : /opt/mpi/intel/mpich2-1.4.1p1/bin/mpiexec -np PROCS EXECUTABLE ARGS


-- **** WARNING **** -- Wien2k users : after installation of TRIQS, copy the files from -- /home/mafarhan/programs/triqs_build/triqs-install/share/triqs/Wien2k_SRC_files/SRC_templates -- to your Wien2k installation WIENROOT/SRC_templates (Cf documentation).
-- This is not handled automatically by the installation process.


-- Preparing optional python module CTHyb -- Preparing python module CTHyb -- Making pytriqs/Solvers/HybridizationExpansion/pytriqs_Solver_HybridizationExpansion.py -- Preparing the various scripts -- Configuring incomplete, errors occurred!

mferrero commented 11 years ago

Hi! In your cmake command, you used a colon : to separate libraries. Try using a semicolon ; instead.

arshadfarhan commented 11 years ago

error remains the same with an additional segmentation fault

Segmentation fault /opt/intel/mkl/11.1.059/lib/em64t/libmkl_sequential.a: line 1: syntax error near unexpected token newline' /opt/intel/mkl/11.1.059/lib/em64t/libmkl_sequential.a: line 1:!' /opt/intel/mkl/11.1.059/lib/em64t/libmkl_core.a: line 1: syntax error near unexpected token newline' /opt/intel/mkl/11.1.059/lib/em64t/libmkl_core.a: line 1:!

aeantipov commented 11 years ago

Hi! Can you please provide a CMakeCache.txt file? You can use https://gist.github.com to upload it? I noticed you want to install TRIQS using mkl. This is a bit complicated task and I suggest you first try to do it without mkl support. After you've done it, try using

-DBLAS_LIBRARY="-L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm" \
-DLAPACK_LIBRARY="-L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm" \
-DLAPACK_LIBS="-L${MKLROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm" \
-DLAPACK_LINKER_FLAGS=-L${MKLROOT} -L${MPIROOT}/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm \
-DCBLAS_INCLUDE_DIR=${MKLROOT}/include

The ${MKLROOT} environment library should be set after installation of MKL, you might want to check it with echo $MKLROOT

arshadfarhan commented 11 years ago

ok, i have uploaded CMakeCache.txt file at https://gist.github.com/4471415

aeantipov commented 11 years ago

There is a python3.3 linking, right? @mferrero is it supported? However in CMakeCache it is not used anywhere. Is the error still the same?

mferrero commented 11 years ago

Indeed, I'm not sure about what happens with python 3.3. @parcollet: have you ever tried? Could this be the problem? @arshadfarhan: you might want to try with an version 2.x of python, e.g. 2.7.3. What linux distribution are you using?

aeantipov commented 11 years ago

Anyway, there's no python 3.3 in CMakeCache, so it's a different bug. @arshadfarhan Have you tried the installation without mkl?

parcollet commented 11 years ago

Hi, Python 3.3 has not been tested. We will not use it before all the tools of the scientific python community are ported to 3.x anyway (it seems to be more or less there, but that is clearly not a priority for us).

arshadfarhan commented 11 years ago

i have tried without flags of any library with cmake command but the result was same i also tried with Python-2.7.3 and this time instead of 1 i get 3 tests failed

347 tests OK. 3 tests failed: test_distutils test_gdb test_nis 39 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_dl test_gl test_imageop test_imgfile test_kqueue test_linuxaudiodev test_macos test_macostools test_msilib test_ossaudiodev test_scriptpackages test_smtpnet test_socketserver test_sqlite test_startfile test_sunaudiodev test_tcl test_timeout test_tk test_ttk_guionly test_ttk_textonly test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 4 skips unexpected on linux2: test_tcl test_tk test_ttk_guionly test_ttk_textonly make: *\ [test] Error 1

so effectively, i can't settle with Python to install TRIQS ! :(

aeantipov commented 11 years ago

Well, wait, these are not tests for triqs. Which linux distribution are you using? After setup of python 2.7 try to remove TRIQS CMakeCache.txt and build TRIQS from scratch.

parcollet commented 11 years ago

Seems to be resolved.