TRIQS / triqs_0.x

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

Problem with install #87

Closed dtompsett closed 12 years ago

dtompsett commented 12 years ago

Dear All,

I've been attempting an install on Fedora and have come up against the errors below during cmake. Is the GMP issue a problem? Then the line "string sub-command REGEX, mode REPLACE" followed by a further error "I can not find the cblas headers (cblas.h or mkl_cblas.h)".

I seem to have a few problems, but some idea as to where to start would be much appreciated.

Many thanks, David.

-- GMP libs: GMP_LIBRARIES-NOTFOUND GMPXX_LIBRARIES-NOTFOUND -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARIES) -- Triqs general lib detection ( but boost ) -- Adding definitions -D_FORTIFY_SOURCE=2;-D_LARGEFILE_SOURCE;-D_LARGEFILE64_SOURCE;-D_FILE_OFFSET_BITS=64;-D_POSIX_SOURCE;-D_BSD_SOURCE;-D_FORTIFY_SOURCE=2 -- Adding include /usr/include/openmpi-x86_64;/usr/include -- Adding libs /usr/lib64/openmpi/lib/libmpi_cxx.so;/usr/lib64/openmpi/lib/libmpi.so;/usr/lib64/openmpi/lib/libopen-rte.so;/usr/lib64/openmpi/lib/libopen-pal.so;/usr/lib64/libdl.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libm.so;/usr/lib64/libdl.so;/usr/lib64/libpthread.so;debug;/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;HDF5_z_LIBRARY_DEBUG-NOTFOUND;/usr/lib64/libm.so;/usr/lib64/libhdf5_cpp.so;optimized;/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;HDF5_z_LIBRARY_RELEASE-NOTFOUND;/usr/lib64/libm.so;/usr/lib64/libhdf5_cpp.so -- Adding library dir
CMake Error at CMakeLists.txt:57 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command.

-- Python modules will be installed in /home/dt331/Programs/INSTALL_DIR//pytriqs -- I am using boost sources from /home/dt331/Programs/boost_1_49_0/ to compile a mini boost_for_triqs -- BOOST_INCLUDE_DIR = /home/dt331/Programs/boost_1_49_0/ -- You are not using mkl CMake Error at cmake/FindCBLAS.cmake:42 (MESSAGE): I can not find the cblas headers (cblas.h or mkl_cblas.h) ! Call Stack (most recent call first): CMakeLists.txt:73 (find_package)

mferrero commented 12 years ago

Hi,

At first, you can try to turn off the Use_Pade option. This will turn off the detection of the GMP and allow you to focus on the other problems (I don't know if the REGEX problem is linked to the failed detection of the GMP). The missing cblas header is a problem though. You will have to install it. In Ubuntu this file would be in the libblas-dev package. In Fedora, I don't know, you might have to install the gsl library or atlas.

dtompsett commented 12 years ago

Hi, Thanks for the reply. I don't know how to alter the Use_Pade option (not familiar with cmake and it produces lots of files). Can you let me know how?

Thanks

mferrero commented 12 years ago

Call cmake with -DUse_Pade=OFF. Something like:

cmake path_to_triqs_sources -DBOOST_SOURCE_DIR=path_to_boost_sources \
      -DCMAKE_INSTALL_PREFIX=path_to_install_directory -DUse_Pade=OFF
dtompsett commented 12 years ago

Thanks again,

Even with -DUse_Pade=OFF it still looks for GMP (see below). Also, I installed gsl which has a header gsl_cblas.h, but cmake does not find it. Any further tips?

Thanks.

-- GMP libs: GMP_LIBRARIES-NOTFOUND GMPXX_LIBRARIES-NOTFOUND -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARIES) -- Triqs general lib detection ( but boost ) -- Adding definitions -D_FORTIFY_SOURCE=2;-D_LARGEFILE_SOURCE;-D_LARGEFILE64_SOURCE;-D_FILE_OFFSET_BITS=64;-D_POSIX_SOURCE;-D_BSD_SOURCE;-D_FORTIFY_SOURCE=2 -- Adding include /usr/include/openmpi-x86_64;/usr/include -- Adding libs /usr/lib64/openmpi/lib/libmpi_cxx.so;/usr/lib64/openmpi/lib/libmpi.so;/usr/lib64/openmpi/lib/libopen-rte.so;/usr/lib64/openmpi/lib/libopen-pal.so;/usr/lib64/libdl.so;/usr/lib64/libnsl.so;/usr/lib64/libutil.so;/usr/lib64/libm.so;/usr/lib64/libdl.so;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;/usr/lib64/libpthread.so;debug;/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;HDF5_z_LIBRARY_DEBUG-NOTFOUND;/usr/lib64/libm.so;/usr/lib64/libhdf5_cpp.so;optimized;/usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so;HDF5_z_LIBRARY_RELEASE-NOTFOUND;/usr/lib64/libm.so;/usr/lib64/libhdf5_cpp.so -- Adding library dir
CMake Error at CMakeLists.txt:57 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command.

-- Python modules will be installed in /home/dt331/Programs/INSTALL_DIR//pytriqs -- I am using boost sources from /home/dt331/Programs/boost_1_49_0/ to compile a mini boost_for_triqs -- BOOST_INCLUDE_DIR = /home/dt331/Programs/boost_1_49_0/ -- You are not using mkl CMake Error at cmake/FindCBLAS.cmake:42 (MESSAGE): I can not find the cblas headers (cblas.h or mkl_cblas.h) !

mferrero commented 12 years ago
dtompsett commented 12 years ago

Hi, I've made some more progress. With the symbolic link and a fresh cmake I get to the blitz++. But I still have the following two errors: 1) CMake Error at CMakeLists.txt:59 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command. 2) CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: HDF5_z_LIBRARY_DEBUG (ADVANCED)

Thanks

mferrero commented 12 years ago

Great! Can you put your CMakeCache.txt file somewhere on https://gist.github.com and give me the link? It will help me figure out the problem. We're making progress!

The second error message seems to complain about missing HDF5 libraries. Do you have HDF5 on your system. You should have files like /usr/lib/libhdf5_cpp.so and so on.

dtompsett commented 12 years ago

OK, I've place CMakeCache.txt here: Public Clone URL: git://gist.github.com/3953298.git. I do have HDF5 and the path is set up, so I'm not sure what this issue is.

Thanks

mferrero commented 12 years ago

I see. It looks like you are missing the zlib. You should install this library (zlib-devel). It will provide a libz.so which is needed by HDF5.

dtompsett commented 12 years ago

OK, that gets rid of the second error, but not the first. I'm attaching CMakeCache.txt again Public Clone URL: git://gist.github.com/3953505.git. I assume that I'll end up with a Makefile after a successful cmake?

Thanks

mferrero commented 12 years ago

Yes, you'll end up with a bunch of Makefiles. The first error seems to be related to the location of python dist-packages. Can you show me the full output of a clean cmake? I fear there was a problem with the detection of your python.

dtompsett commented 12 years ago

OK, here is the output Public Clone URL: git://gist.github.com/3953682.git

Thanks

mferrero commented 12 years ago

Great! As you can see from the output it looks like you have python 2.6.2 and you need at least 2.6.5! If you update your python it should work fine!

dtompsett commented 12 years ago

Great, unfortunately my fedora repository only has up to 2.6.2. I'll have to hunt around for an rpm tomorrow.

Thanks for all the help. I'll let you know how it goes tomorrow.

parcollet commented 12 years ago

Use Enthought, you will have a recent python.

dtompsett commented 12 years ago

Hi, I installed Enthought and then cmake ran without warnings. But I am now getting compile time errors. I have put the output here Public Clone URL: git://gist.github.com/3957718.git.

Some more pointers would be appreciated.

mferrero commented 12 years ago

Hi, I think the code is not linked against the gsl cblas library. Try to add this to the cmake command:

cmake -DBLAS_LIBRARY=/usr/lib/libgslcblas.so ...

I just guessed where the gslcblas.so could be. You might want ot check that first...

dtompsett commented 12 years ago

Hi, I tried the suggestion with: cmake Triqs/ -DBOOST_SOURCE_DIR=/home/dt331/Programs/boost_1_49_0/ -DUse_Pade=OFF -DBLAS_LIBRARY=/usr/lib64/libgslcblas.so.0

But still receive similar compile time problems. I've put the output from both cmake and the compile at Public Clone URL: git://gist.github.com/3958381.git.

Thanks

mferrero commented 12 years ago

OK, sorry. Next try:

cmake Triqs/ -DBOOST_SOURCE_DIR=/home/dt331/Programs/boost_1_49_0 -DUse_Pade=OFF -DBLAS_blas_LIBRARY="/usr/lib64/libgslcblas.so.0;/usr/lib64/libblas.so"
dtompsett commented 12 years ago

Hi, the compile went a bit further this time. But still died eventally, the output is here: Public Clone URL: git://gist.github.com/3958649.git

It looks like this is native errors in the compile of Triqs itself? Perhaps some compile options will help?

Thanks

mferrero commented 12 years ago

Hi. The output only shows what cmake did. Can you append the output of the make?

dtompsett commented 12 years ago

Sorry, here is the output of make Public Clone URL: git://gist.github.com/3958833.git

Thanks

mferrero commented 12 years ago

Hi! The problem is that the latest commits of the project require an earlier version of g++. There are two solutions:

This should solve your problems!

dtompsett commented 12 years ago

Dear Michel, I have now compiled and run all of the tests successfully. Many thanks for your help!

I have also tried running one of the examples in doc/user_manual/green. When running "pytriqs example.py" the code seems to run, then a plot flashes up in a new window, but then instantly disappears. So I can't view the results. Am I doing this the right way?

Thanks

aichhorn commented 12 years ago

Easy fix: type "pytriqs -i example.py", that leaves the console and the plot open.

dtompsett commented 12 years ago

Hi, thanks for the quick response. I tried that but it only left me with ">>>" prompt, but then the plot did not open at all.

Any other ideas?

mferrero commented 12 years ago

Hi, can you try the following: start a standard python prompt and type:

import matplotlib.pyplot
matplotlib.pyplot.plot([2,1,3])

Does anything show up?

dtompsett commented 12 years ago

Hi, I don't see anything. Just the error matplotlib.lines.Line2D object at 0x32b2150

mferrero commented 12 years ago

OK, two solutions:

1) Instead of using pytriqs, launch

ipytriqs --pylab

2) Edit the file ~/.matplotlib/matplotlibrc and add:

backend : TkAgg
interactive : True

then the standard python should behave better.

dtompsett commented 12 years ago

Hi Michel, fix 2) seems to fix the problem with standard python and the plot now shows up with "pytriqs -i " too.

The --pylab using "ipytriqs --pylab < example.py" does what was happening originally. The plot pops up and disappears. What is pylab meant to do?

mferrero commented 12 years ago

Sorry, also ipytriqs needs to be run interactively:

ipytriqs -i example.py --pylab

The --pylab flag tells python to import the matplotlib and numpy libraries. This way you don't need to import anything to do a plot. Moreover, ipython is interactive by default, so any plot command should display immediately.

parcollet commented 12 years ago

or simply ipytriqs_notebook ?

dtompsett commented 12 years ago

Thanks again, I guess the best thing for running the code regularly is to put the /bin of the install in my PATH so that I can access of the these binaries. Looking forward to trying some science now!