Hello,
I'm currently attempting to install fenics on one of our cluster machines. So far I have managed to build fenics using dorsal. I then proceed to install petsc4py using pip and virtualenv (by pointing my PETSC_DIR at the fenics installation).
When I'm done I can import dolfin in my scripts, however when I attempt to import petsc4py I receive the following exception.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-f4a6ff127338> in <module>()
----> 1 from petsc4py import PETSc
/exports/work/geos_eps_williams/FEniCS/petsc4py/lib/python2.6/site-packages/petsc4py/PETSc.pyc in <module>()
1 ARCH = None
2 from petsc4py.lib import ImportPETSc
----> 3 PETSc = ImportPETSc(ARCH)
4 PETSc._initialize()
5 del PETSc
/exports/work/geos_eps_williams/FEniCS/petsc4py/lib/python2.6/site-packages/petsc4py/lib/__init__.pyc in ImportPETSc(arch)
27 """
28 path, arch = getPathArchPETSc(arch)
---> 29 return Import('petsc4py', 'PETSc', path, arch)
30
31 def getPathArchPETSc(arch=None):
/exports/work/geos_eps_williams/FEniCS/petsc4py/lib/python2.6/site-packages/petsc4py/lib/__init__.pyc in Import(pkg, name, path, arch)
62 pathlist = [os.path.join(path, arch)]
63 fo, fn, stuff = imp.find_module(name, pathlist)
---> 64 module = imp.load_module(fullname, fo, fn, stuff)
65 module.__arch__ = arch # save arch value
66 setattr(sys.modules[pkg], name, module)
ImportError: /exports/work/geos_eps_williams/FEniCS/fenics1/install/lib/libpetsc.so: undefined symbol: _SCOTCHintRandVal
My platform file looks like the following. Incidentally if I uncomment slepc, the fenics build fails with a similar error message, i.e. the the slepc build fails because of the same undefined symbol in libpetsc.so.
# Fedora 14
# This build script assumes that you have several packages already
# installed via Fedora's yum using the following command:
#
# su -c 'yum install -y redhat-lsb bzr bzrtools subversion \
# libxml2-devel gcc gcc-c++ openmpi-devel openmpi numpy swig wget \
# vtk-python atlas-devel suitesparse-devel blas-devel \
# lapack-devel cln-devel ginac-devel python-devel cmake \
# ScientificPython mpfr-devel armadillo-devel gmp-devel CGAL-devel \
# cppunit-devel flex'
#
# If you have multiple MPI libraries installed, make sure the
# appropriate version is selected. For this, on a 32-bit operating
# system, run:
#
# module load openmpi-i386
#
# or on a 64-bit operating system, run:
#
# module load openmpi-x86_64
#
# After Dorsal has completed, please make sure the following
# environment variable is set before running any Python DOLFIN
# programs:
#
# export BOOST_DIR=${INSTALL_PATH}
#
# Also, if you are using SELinux, you may need to disable it to run
# DOLFIN programs.
##
# Platform specific variables
default PETSC_ARCH=linux-gnu-cxx-opt
default SCOTCH_ARCH=pc_linux2
default UMFPACK_INCLUDE_DIR=/usr/include/suitesparse
# Define the packages this platform needs
PACKAGES=(
boost
swig
vtkdata
vtk
parmetis
scotch
trilinos
petsc
#slepc
# swiginac
cgal
scientificpython
fiat
ferari
ufc
ufl
ffc
# syfi
viper
instant
dolfin
)
My os is scientific linux (SE6). Any help would be greatly appreciated!
Kind regards
Les