[CIG-SHORT] problem with installation of pylith 64bit from source code

Leif Strand leif at geodynamics.org
Thu Oct 2 11:57:11 PDT 2008


As Matt said, something probably went wrong when you installed 
'nemesis'.  I notice that in your 'sys.path', you have:

/usr/local2/lib/python2.5/site-packages/nemesis-1.0-py2.5.egg

This directory should not exist.  If it does exist, it suggests you ran 
the Nemesis 'setup.py' script.  But the nemesis 'setup.py' script should 
not be run directly.  Instead, install 'nemesis' as follows:

./configure --prefix=/usr/local2
make
make install

Make sure the correct MPI tools are on your path when you do this.  Also 
make sure the correct 'python' is on your path.

Afterwards, you should have a 'nemesis' executable 
(/usr/local2/bin/nemesis) which behaves just like Python, except that it 
knows about '_mpi':

[dry at n100 ~]$ nemesis
Python 2.5.2 (r252:60911, Sep 25 2008, 15:56:45)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import _mpi
 >>>

I must confess that I'm baffled by the error message you sent:

ImportError: No module named _mpi

If you installed 'nemesis' incorrectly, then you wouldn't have a 
'nemesis' program, and you wouldn't be able to run 'pylith' at all. 
Note that the very first line of the 'pylith' script is:

#!/usr/bin/env nemesis

On the other hand, if 'nemesis' does exist, then it must have been 
successfully installed... and it should be able to "import _mpi".

--Leif


Matthew Knepley wrote:
> This is a problem with the nemesis installation, since this is what loads the
> _mpi module for Python. It is common (if you have multiple MPI installations)
> to select the wrong one at nemesis installation time. You muse have the
> correct 'mpirun' or 'mpiexec' in your path when installing nemesis.
> 
>   Thanks,
> 
>      Matt
> 
> 2008/10/2 Makoto Hoshino <m-hoshino at aist.go.jp>:
>> Dear pylith developers,
>>
>> As written in the previous email from Ikuo, I have installed Pylith from
>> the source code into a 64bit computer machine with specification:
>>
>> OS: CentOS release 4.4 (Final)
>> linux: 2.6.9-42.0.10.ELsmp x86_64
>> CPU(64bit): Intel(R) Xeon(R) X5355 @ 2.66GHz
>>
>> As a note, I installed Python2.5 to /usr/local2/ and export
>> PYTHONPATH=/usr/local2/lib/python2.5/site-packages,
>> and installed pylith so that it does NOT depend on MPICH but MPICH2.
>>
>>  No noticeable warning was found in the installation process of Pylith,
>> but I was not able to run it correctly. To be specific, I tried to run
>> Pylith in the directory src/pylith/examples/3d/hex8 by typing " pylith
>> dislocation.cfg". However, I only obtained the following messages.
>>
>> Traceback (most recent call last):
>> File "/usr/local2/bin/pylith", line 31, in <module>
>> from pylith.PyLithApp import PyLithApp
>> File "/usr/local2/lib/python2.5/site-packages/pylith/PyLithApp.py", line
>> 17, in <module>
>> from mpi import Application
>> File
>> "/usr/local2/lib/python2.5/site-packages/pythia-0.8.1.7-py2.5.egg/mpi/__init__.py",
>> line 14, in <module>
>> from _mpi import *
>> ImportError: No module named _mpi
>>
>> Could you tell me what happened? I think the following information
>> obtained from the python shell is useful to make a diagnosis.
>>
>> [dry at n100 ~]$ python
>> Python 2.5.2 (r252:60911, Sep 25 2008, 15:56:45)
>> [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>>>>>>>> import sys
>>>>>>>> sys.path
>> ['', '/usr/local2/lib/python2.5/site-packages/merlin-1.4.egg',
>> '/usr/local2/lib/python2.5/site-packages/Cheetah-2.0.1-py2.5-linux-x86_64.egg',
>> '/usr/local2/lib/python2.5/site-packages/pythia-0.8.1.7-py2.5.egg',
>> '/usr/local2/lib/python2.5/site-packages/nemesis-1.0-py2.5.egg',
>> '/usr/local2/lib/python2.5/site-packages',
>> '/usr/local2/lib/python25.zip', '/usr/local2/lib/python2.5',
>> '/usr/local2/lib/python2.5/plat-linux2',
>> '/usr/local2/lib/python2.5/lib-tk', '/usr/local2/lib/python2.5/lib-dynload']
>>
>>>>>>>> import mpi
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File
>> "/usr/local2/lib/python2.5/site-packages/pythia-0.8.1.7-py2.5.egg/mpi/__init__.py",
>> line 14, in <module>
>> from _mpi import *
>> ImportError: No module named _mpi
>>
>> ------------------------------------------------------
>> Makoto HOSHINO
>> Seismogenic Process Research Group
>> Institute of Geology and Geoinformation
>> National Institute of Advanced Industrial Science and Technology
>> tel; 029-861-2460, fax; 029-861-3682
>> email; m-hoshino at aist.go.jp
>> -------------------------------------------------------
>>
>>
>>
>>
>>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org
>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>
> 
> 
> 



More information about the CIG-SHORT mailing list