ubuntu 12.04 64 bit abinit 7.6.2 install test problem  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
osmanb
Posts: 3
Joined: Mon Mar 17, 2014 3:15 am

ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Post by osmanb » Mon Mar 17, 2014 3:24 am

Hello,
I am trying to install abinit 7.6.2 on my ubuntu 12.04 system. I think the build went ok. I followed the instruction in the forum for ubuntu installs (use dthe config file but changed lib64 to just lib). But when I tried to do make check, I get the following python errror:
osman@osman-AV019AA-ABA-p6228p:~/src/abinit/abinit-7.6.2/tests$ ./runtests.py fast
Traceback (most recent call last):
File "./runtests.py", line 28, in <module>
abenv = tests.abenv
AttributeError: 'module' object has no attribute 'abenv'

Do I need some special python module to be installed??
Thanks in advance

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Post by gmatteo » Tue Mar 18, 2014 12:36 am

Hi,

could you edit the code in ~abinit/tests/runtests.py around line 396?

# Add the two lines below:
print(dir(tests))
print(tests.__path__)

# Before this old code
abenv = tests.abenv


Could you rerun the script, and post the output so that I can pinpoint the problem.

Do I need some special python module to be installed??


No, the python script is compatible with python > 2.4 (no py3k) and it only requires the python standard library.

osmanb
Posts: 3
Joined: Mon Mar 17, 2014 3:15 am

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Post by osmanb » Tue Mar 18, 2014 1:53 am

Thanks for replying. I put those lines before line 28 (which is where abenv=tests.abenv line is ) :
osman@osman-AV019AA-ABA-p6228p:~/src/abinit/abinit-7.6.2/tests$ ./runtests.py
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']
['/usr/lib/pymodules/python2.7/tests']
Traceback (most recent call last):
File "./runtests.py", line 30, in <module>
abenv = tests.abenv
AttributeError: 'module' object has no attribute 'abenv'

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem

Post by gmatteo » Tue Mar 18, 2014 2:14 am

['/usr/lib/pymodules/python2.7/tests']


Ok, it's a well known problem.
Your python library defines a package module named "tests" whose name enters in conflict with the tests package provided by abinit

temporary workaround: change the PYTHONPATH variable so that the "tests" directory in the abinit top level directory comes first, i.e. (bash shell)

export PYTHONPATH=~abinit:$PYTHONPATH

where ~abinit is the *absolute* path pointing the abinit top level directory

osmanb
Posts: 3
Joined: Mon Mar 17, 2014 3:15 am

Re: ubuntu 12.04 64 bit abinit 7.6.2 install test problem  [SOLVED]

Post by osmanb » Tue Mar 18, 2014 2:34 am

Thanks that solved my problem.
:D

Locked