TRIQS / triqs_0.x

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

'NoneType' object attribute '__doc__' is read-only #48

Closed aeantipov closed 12 years ago

aeantipov commented 12 years ago

Hi Everyone,

Installed triqs on a yet another cluster machine. ( MacOS, Darwin kernel 10.8.0 ) Running a following scipt:

from pytriqs.Base.GF_Local import *
from pytriqs.Base.Archive import *
import pytriqs.Base.Utility.MPI as MPI

Getting a following error now:

Traceback (most recent call last):
  File "MPITest.py", line 3, in 
    import pytriqs.Base.Utility.MPI as MPI
  File "/Volumes/Users/antipov/_local/lib/python2.6/site-packages/pytriqs/Base/Utility/MPI.py", line 30, in 
    from pytriqs.boost.mpi import *
  File "/Volumes/Users/antipov/_local/lib/python2.6/site-packages/pytriqs/boost/__init__.py", line 9, in 
    import mpi
AttributeError: 'NoneType' object attribute '__doc__' is read-only

The error dissapears if I just leave import pytriqs.Base.Utility.MPI as MPI line. Thus I receive the same error for any tutorial scripts, e.g. aim.py from http://ipht.cea.fr/triqs/doc/user_manual/solvers/aim.html#aim Any good ideas on that?

mferrero commented 12 years ago

Hey Andrey! Can you tell me which version of python and of boost you are using? Thanks!

aeantipov commented 12 years ago

Hi, Michel! That is boost 1.49 and python 2.6.7 (built by apple-gcc). I compiled with intel 12.0.4. Also hdf is 1.8.8. Compiled triqs-0.8 - this problem doesn't emerge there.

aeantipov commented 12 years ago

Some update. The error is produced with the intel compiler

CXX="icpc" CC="icc" FC="ifort"
cmake \
-DBOOST_SOURCE_DIR=/Volumes/Users/antipov/dist/boost_1_49_0 \
-DCMAKE_INSTALL_PREFIX=/Volumes/Users/antipov/_local \
-DPYTHON_INTERPRETER="/opt/local/bin/python" \
-DBuild_Wien2k=false \
-DBuild_HubbardI=false \
${path_to_triqs}

As soon as I switch to the configuration

CXX="g++" CC="gcc" FC="/opt/local/bin/gfortran-mp-4.4" 
cmake \
-DBOOST_SOURCE_DIR=/Volumes/Users/antipov/dist/boost_1_49_0 \
-DCMAKE_INSTALL_PREFIX=/Volumes/Users/antipov/_local \
-DPYTHON_INTERPRETER="/opt/local/bin/python" \
-DBuild_Wien2k=false \
-DBuild_HubbardI=false \
-DCMAKE_COMPILER_IS_GNUCXX=1 \
${path_to_triqs}

the metioned scripts start to work.

mferrero commented 12 years ago

Let me understand this right. When you compile the tagged version 0.8 there is no problem?

aeantipov commented 12 years ago

Just made some updates to the last post - there's nothing with mkl. Yes - with the triqs downloaded from https://github.com/TRIQS/TRIQS/tarball/v0.8 I don't receive this particular problem.

mferrero commented 12 years ago

OK, then can you try to see if the problem appeared after the commit 3d266d7cdfd6391a02fdc68c1a0fb261d2ca5b77? We changed some things about dynamic loading there. Maybe this is where problems were introduced...

mferrero commented 12 years ago

One more thing: if you just type

from pytriqs.boost.mpi import *

from a pytriqs shell, do you get the error as well? Or do you need to have imported some other stuff earlier?

aeantipov commented 12 years ago

This works fine.

aeantipov commented 12 years ago

With the older version ( 3f9cfa347700f2bb93b40dd641920130b2f73a79 - the one prior to that commit ) I get

[ 56%] Building CXX object triqs/arrays/test/C++/CMakeFiles/a_x_ty_nopy.dir/a_x_ty.cpp.o
/Volumes/Users/antipov/code/triqs_src2/triqs/arrays/test/C++/a_x_ty.cpp(23): catastrophic error: cannot open source file "./src/array.hpp"
  #include "./src/array.hpp"
parcollet commented 12 years ago

Even more bizarre ... Can you try going a bit few commits earlier (git co ...). It is quite hard for us to track this down since we can not reproduce it (we don't have icc 12 here anyway). What is your mpi libs ? Can you make an ldd of the .so modules ? On the mac, we already had bizarre problems due to mixing compilers (different versions of gcc, etc...) and glibc (I worry about having libmpi using some glibc, icc some other...)

aeantipov commented 12 years ago

Sorry, next week I'm not here, will try to test it more. Will write down what I receive.

aeantipov commented 12 years ago

While I was out there was some change in hardware. Obtained a successful compilation of triqs with clang and mkl on macos x64 arch!

CXX="clang++" CC="clang" cmake \
-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" \
-DCBLAS_INCLUDE_DIR=/opt/intel/composerxe/mkl/include \
-DLAPACK_LINKER_FLAGS=-L/opt/intel/composerxe/mkl/lib \
-DMPI_COMPILER=openmpic++ \
-DMPI_Fortran_COMPILER=openmpif90 \
-DMPIEXEC=/opt/local/bin/openmpirun \
-DBOOST_SOURCE_DIR=/Volumes/Users/antipov/dist/boost_1_49_0 \
-DPYTHON_INTERPRETER="/opt/local/bin/python" \
-DBuild_Wien2k=false \
-DBuild_HubbardI=false \
${path_to_triqs}