I am eager to use PyTrilinos solvers in FiPy 2.0.  The operating
system is Debian with a 4-processor AMD64.  I have installed the
Trilinos packages (MPI version) and can run the command
>>> import PyTrilinos
without error.  This comes after manipulating the LD_LIBRARY_PATH to
point to the appropriate folders in my user directory.

Errors begin appearing when trying to import modules from PyTrilinos such as
>>> from PyTrilinos import ML

The ImportError that occurs complains about an undefined symbol.
There is a mangled variable name that seems to be some sort of error
handler.  More confusing still, the offending .so file changed
depending on which module I try to import.  When importing ML, the
undefined symbol is in libaztecoo.so.  from PyTrilinos import AztecOO
yields a traceback from libteuchos.so, and so on.

This seems very similar to a problem Daniel Wheeler reported in
February 2009.  I was unable to find a resolution to that problem in
the mailing list.

Included below is a paste of the cycle of tracebacks I receive, as
well as Daniel's original mailing list post.

Thank you for your help in investigating this strange behavior.

Will Gathright
Rensselaer Polytechnic Institute


gat...@ridcully:~$ python2.4
Python 2.4.6 (#2, Dec 20 2008, 15:43:33)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyTrilinos import ML
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/home/gathrw/trilinos/LINUX_MPI/lib/python2.4/site-packages/PyTrilinos/ML.py",
line 43, in ?
    import _ML
ImportError: /home/gathrw/trilinos/LINUX_MPI/lib/libaztecoo.so:
undefined symbol: _ZN3MPI3Win14Set_errhandlerERKNS_10ErrhandlerE
>>> from PyTrilinos import AztecOO
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/home/gathrw/trilinos/LINUX_MPI/lib/python2.4/site-packages/PyTrilinos/AztecOO.py",
line 34, in ?
    import _AztecOO
ImportError: /home/gathrw/trilinos/LINUX_MPI/lib/libteuchos.so:
undefined symbol: _ZN3MPI3Win14Set_errhandlerERKNS_10ErrhandlerE
>>> from PyTrilinos import Teuchos
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/home/gathrw/trilinos/LINUX_MPI/lib/python2.4/site-packages/PyTrilinos/Teuchos.py",
line 45, in ?
    import _Teuchos
ImportError: /home/gathrw/trilinos/LINUX_MPI/lib/libepetra.so:
undefined symbol:_ZN3MPI3Win14Set_errhandlerERKNS_10ErrhandlerE
>>> from PyTrilinos import Epetra
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File 
"/home/gathrw/trilinos/LINUX_MPI/lib/python2.4/site-packages/PyTrilinos/Epetra.py",
line 59, in ?
    import _Epetra
ImportError: /home/gathrw/trilinos/LINUX_MPI/lib/libteuchos.so:
undefined symbol: _ZN3MPI3Win14Set_errhandlerERKNS_10ErrhandlerE

-=-=-=-=-=-=-=-=-=-=-

On Mon, Feb 9, 2009 at 8:44 PM, Recif <[email protected]> wrote:
>
> Thanks for your response.
> I had not set the --enable-pytrilinos option while configuring trilinos, and
> after doing that and updating LD_LIBRARY_PATH, I can use the trilinos solver.

Very good.

> In case it helps somebody else compiling trilinos on a 64-bit system, I had to
> slightly modify the suggested configuration in the FiPy 2.0 manual: adding the
> -fpic option for CFLAGS, CXXFLAGS and FFLAGS, and removing the -malign-double
> option for FFLAGS.

Actually, it is mentioned on the webpage I sent you, which I have now
noted in the manual in the Trilinos section.

I have been trying to get Trilinos working on a machine with Ubuntu
8.10. It seems to compile and install without difficulties, but when I
try and import something from PyTrilinos it throws the following
error.

   Traceback (most recent call last):
   File "/var/build/build_trunk_992/setup.py", line 780, in <module>
   'Topic :: Software Development :: Libraries :: Python Modules'

   ...

   File "/usr/lib/python2.5/site-packages/PyTrilinos/ML.py", line 43,
in <module>
   import _ML
   ImportError: /usr/local/lib/libaztecoo.so: undefined symbol: r_sign

Do you have any idea about this?

-- 
Daniel Wheeler

Reply via email to