This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

import dolfin error, petsc error

0 votes

Hi,

I tried to upgrade my petsc4py so that I can use tao solver. After I upgraded petsc4py with pip, each time I from dolfin import *, I got the following nasty error,

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run 
[0]PETSC ERROR: to get more information on the crash.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD 
with errorcode 2093801067.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

Strangely when I do the following, it works fine, but might contain bug

import petsc4py as pet 
pet.init()
from dolfin import *
....

I somehow ruined my petsc when I tried to upgrade to petsc3.7.

Description:
ubuntu14.04 LTS 64 bit
install fenics use ppa and sudo apt-get install
upgrade petsc4py using pip

I have referred the discussion in user group, but it does not help me out.
https://groups.google.com/forum/#!msg/fenics-support/Hq3chBYqeXU/hMVmCNMFBQAJ

Thx!

asked Aug 3, 2016 by truemerlin FEniCS Novice (410 points)

You cannot upgrade petsc4py after installing DOLFIN. You have to rebuild DOLFIN from source with the version of petsc4py that you want to use.

thank you for your reply!

could you hint on how to build dolfin from src and specify the petsc4py version and other things related with petsc?

...