Dear friends,
I am trying to install ALPS and my interest is to use it in combination with python, which I am still learning. The installation has so far been more or less easy. However I am stuck with a problem with python. Possibly its only python
I downloaded alps-2.0.0-r5363-src-with-boost.tar.gz and followed the instructions in http://alps.comp-phys.org/mediawiki/index.php/Download_and_install_ALPS_2#Bu... for a generic distribution, until ******************************************** make test ******************************************** where some errors are reported: ******************************************** $ make test ... The following tests FAILED: 1 - ising_single (Failed) 2 - loop_single (Failed) 3 - exchange (Failed) 90 - python_hlist_test (Failed) 91 - python_mcdata (Failed) 92 - python_pyhdf5 (Failed) Errors while running CTest make: *** [test] Error 8 ******************************************** Some of them are trivial, I think. Namely, for the Ising model instead of having an error of exactly 0, the error is of the order of 10^-8. However for the python part it is mode problematic. I managed to trace back the errors to the command ******************************************** carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ /usr/bin/ctest --force-new-ctest-process -V
UpdateCTestConfiguration from :/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/DartConfiguration.tcl UpdateCTestConfiguration from :/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/DartConfiguration.tcl Test project /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps Constructing a list of tests Done constructing a list of tests Checking test dependency graph... test 1 Start 1: python_hlist_test
1: Test command: /usr/bin/cmake -Dcmd=hlist_test.py -Dinput=hlist_test -Doutput=hlist_test -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 1: Test timeout computed to be: 9.99988e+06 1: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 1: error runing test 'python_hlist_test.py': Traceback (most recent call 1: last): 1: 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/hlist_test.py", line 28, in <module> 1: from pyalps.hlist import HList 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 1: from tools import * 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 1: import tempfile 1: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 1: from random import Random as _Random 1: File "/usr/lib/python2.6/random.py", line 45, in <module> 1: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 1: 1: ImportError: cannot import name pi 1: 1: ; shell output: 1! 1: 1: 1/3 Test #1: python_hlist_test ................***Failed 0.09 sec test 2 Start 2: python_mcdata
2: Test command: /usr/bin/cmake -Dcmd=mcdata.py -Dinput=mcdata -Doutput=mcdata -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 2: Test timeout computed to be: 9.99988e+06 2: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 2: error runing test 'python_mcdata.py': Traceback (most recent call last): 2: 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/mcdata.py", line 30, in <module> 2: from pyalps.alea import * 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 2: from tools import * 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 2: import tempfile 2: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 2: from random import Random as _Random 2: File "/usr/lib/python2.6/random.py", line 45, in <module> 2: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 2: 2: ImportError: cannot import name pi 2: 2: ; shell output: 1! 2: 2: 2/3 Test #2: python_mcdata ....................***Failed 0.09 sec test 3 Start 3: python_pyhdf5
3: Test command: /usr/bin/cmake -Dcmd=pyhdf5.py -Dinput=pyhdf5 -Doutput=pyhdf5 -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 3: Test timeout computed to be: 9.99988e+06 3: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 3: error runing test 'python_pyhdf5.py': Traceback (most recent call last): 3: 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/pyhdf5.py", line 30, in <module> 3: import pyalps.hdf5 as h5 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 3: from tools import * 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 3: import tempfile 3: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 3: from random import Random as _Random 3: File "/usr/lib/python2.6/random.py", line 45, in <module> 3: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 3: 3: ImportError: cannot import name pi 3: 3: ; shell output: 1! 3: 3: 3/3 Test #3: python_pyhdf5 ....................***Failed 0.09 sec
0% tests passed, 3 tests failed out of 3
Total Test time (real) = 0.28 sec
The following tests FAILED: 1 - python_hlist_test (Failed) 2 - python_mcdata (Failed) 3 - python_pyhdf5 (Failed) Errors while running CTest ******************************************************************** however the "bad" line seems to be working in normal python: ******************************************************************** carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ python Python 2.6.6 (r266:84292, Jan 19 2011, 11:02:33) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil exit()
******************************************************************** my python version: ******************************************************************** carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ python -V Python 2.6.6 ********************************************************************
Thanks a lot for your help! carlos
Hi Carlos,
Can you try launching your python interpreter and type:
from math import pi
Also, which version of Python do you have?
Matthias
On Jan 19, 2011, at 9:22 AM, Carlos Pineda wrote:
Dear friends,
I am trying to install ALPS and my interest is to use it in combination with python, which I am still learning. The installation has so far been more or less easy. However I am stuck with a problem with python. Possibly its only python
I downloaded alps-2.0.0-r5363-src-with-boost.tar.gz and followed the instructions in http://alps.comp-phys.org/mediawiki/index.php/Download_and_install_ALPS_2#Bu... for a generic distribution, until
make test
where some errors are reported:
$ make test ... The following tests FAILED: 1 - ising_single (Failed) 2 - loop_single (Failed) 3 - exchange (Failed) 90 - python_hlist_test (Failed) 91 - python_mcdata (Failed) 92 - python_pyhdf5 (Failed) Errors while running CTest make: *** [test] Error 8
Some of them are trivial, I think. Namely, for the Ising model instead of having an error of exactly 0, the error is of the order of 10^-8. However for the python part it is mode problematic. I managed to trace back the errors to the command
carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ /usr/bin/ctest --force-new-ctest-process -V
UpdateCTestConfiguration from :/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/DartConfiguration.tcl UpdateCTestConfiguration from :/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/DartConfiguration.tcl Test project /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps Constructing a list of tests Done constructing a list of tests Checking test dependency graph... test 1 Start 1: python_hlist_test
1: Test command: /usr/bin/cmake -Dcmd=hlist_test.py -Dinput=hlist_test -Doutput=hlist_test -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 1: Test timeout computed to be: 9.99988e+06 1: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 1: error runing test 'python_hlist_test.py': Traceback (most recent call 1: last): 1: 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/hlist_test.py", line 28, in <module> 1: from pyalps.hlist import HList 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 1: from tools import * 1: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 1: import tempfile 1: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 1: from random import Random as _Random 1: File "/usr/lib/python2.6/random.py", line 45, in <module> 1: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 1: 1: ImportError: cannot import name pi 1: 1: ; shell output: 1! 1: 1: 1/3 Test #1: python_hlist_test ................***Failed 0.09 sec test 2 Start 2: python_mcdata
2: Test command: /usr/bin/cmake -Dcmd=mcdata.py -Dinput=mcdata -Doutput=mcdata -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 2: Test timeout computed to be: 9.99988e+06 2: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 2: error runing test 'python_mcdata.py': Traceback (most recent call last): 2: 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/mcdata.py", line 30, in <module> 2: from pyalps.alea import * 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 2: from tools import * 2: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 2: import tempfile 2: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 2: from random import Random as _Random 2: File "/usr/lib/python2.6/random.py", line 45, in <module> 2: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 2: 2: ImportError: cannot import name pi 2: 2: ; shell output: 1! 2: 2: 2/3 Test #2: python_mcdata ....................***Failed 0.09 sec test 3 Start 3: python_pyhdf5
3: Test command: /usr/bin/cmake -Dcmd=pyhdf5.py -Dinput=pyhdf5 -Doutput=pyhdf5 -Dsourcedir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dbinarydir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps -Dcmddir=/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps -P /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake 3: Test timeout computed to be: 9.99988e+06 3: CMake Error at /home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/config/run_python_test.cmake:33 (message): 3: error runing test 'python_pyhdf5.py': Traceback (most recent call last): 3: 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps/pyhdf5.py", line 30, in <module> 3: import pyalps.hdf5 as h5 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/__init__.py", line 38, in <module> 3: from tools import * 3: File "/home/carlosp/Desktop/alps-2.0.0-r5363-src-with-boost/alps/lib/pyalps/tools.py", line 31, in <module> 3: import tempfile 3: File "/usr/lib/python2.6/tempfile.py", line 34, in <module> 3: from random import Random as _Random 3: File "/usr/lib/python2.6/random.py", line 45, in <module> 3: from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil 3: 3: ImportError: cannot import name pi 3: 3: ; shell output: 1! 3: 3: 3/3 Test #3: python_pyhdf5 ....................***Failed 0.09 sec
0% tests passed, 3 tests failed out of 3
Total Test time (real) = 0.28 sec
The following tests FAILED: 1 - python_hlist_test (Failed) 2 - python_mcdata (Failed) 3 - python_pyhdf5 (Failed) Errors while running CTest
however the "bad" line seems to be working in normal python:
carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ python Python 2.6.6 (r266:84292, Jan 19 2011, 11:02:33) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil exit()
my python version:
carlosp@papa ~/Desktop/alps-2.0.0-r5363-src-with-boost/alps/test/pyalps $ python -V Python 2.6.6
Thanks a lot for your help! carlos
Thanks for the response Matthias! I have already tried that, but no error. I tried even the way the line is given in the source code. Also, the version of python is reported as I launch the interpreter:
carlosp@papa ~ $ python Python 2.6.6 (r266:84292, Jan 19 2011, 11:02:33) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from math import pi exit()
carlosp@papa ~ $ python Python 2.6.6 (r266:84292, Jan 19 2011, 11:02:33) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil exit()
Thanks for your interest, Carlos
comp-phys-alps-users@lists.phys.ethz.ch