ImportError: /usr/lib/libmpi_mpifh.so.12: undefined symbol: mpi_fortran_weights_empty

Issue #97 closed
Former user created an issue

I installed PETSC and seems to be working properly. Also petsc4py install with no error messages. But when I do "from petsc4py import PETSc" I get the following error:

Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/oem/.local/lib/python2.7/site-packages/petsc4py/PETSc.py", line 3, in <module> PETSc = ImportPETSc(ARCH) File "/home/oem/.local/lib/python2.7/site-packages/petsc4py/lib/init.py", line 29, in ImportPETSc return Import('petsc4py', 'PETSc', path, arch) File "/home/oem/.local/lib/python2.7/site-packages/petsc4py/lib/init.py", line 67, in Import with f: module = imp.load_module(fullname, f, fn, info) ImportError: /usr/lib/libmpi_mpifh.so.12: undefined symbol: mpi_fortran_weights_empty

Comments (7)

  1. Lisandro Dalcin

    @adantra What MPI implementation are you using? On what kind of system? Can you provide the configure line you used to build PETSc? Are you using latest PETSc release?

    @balay Any idea what could be wrong? This seems like an issue in core PETSc.

  2. Satish Balay

    Hm - if the problem is visible with PETSc, it should come up with make test

    Its likely an inssue with MPI used. In this case - its easier to just switch to a newer MPI - say with --download-mpich

  3. Former user Account Deleted reporter

    I found what is causing the problem. It has to do with the environment variables related to the intel compiler. Even though I specified gnu compilers and the --download-mpich option, if the intel variables are in the environment, petsc4py will fail with the above message. When the intel variables are not in the environment then everything works as expected. I still need to investigate the problem further as I would like to use the intel compilers for the final product release.

  4. Satish Balay

    Glad you figured out the cause.

    If using --download-mpich - /usr/lib/libmpi_mpifh.so.12 should not get used. So you might have to figure out where that reference is coming from - and why.

  5. Log in to comment