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

Segmentation fault: 11 due to PointSource

0 votes

Hi,

I tried to run the following code from MiroK

from dolfin import *

mesh = UnitSquareMesh(2, 2)
V = VectorFunctionSpace(mesh, 'CG', 1)
v = TestFunction(V)
b = assemble(inner(Constant((0, 0)), v)*dx)

x = Point(0.25, 0.25)
# Apply to components
p0 = PointSource(V.sub(0), x, 1)  # Assuming that V.sub(0) is a scalar-valued space!
p1 = PointSource(V.sub(1), x, 2)  # Assuming that V.sub(1) is a scalar-valued space!

p0.apply(b)
print b.array()
p1.apply(b)
print b.array()

and I get the error: Segmentation fault: 11
I have Fenics 1.3.0 on Mac OSX 10.7.5, but there is the same problem on another computer with Linux (also with Fenics 1.3.0)

Also I get the following error message:

Python quit unexpectedly while using the libdolfin.1.3.dylib plug-in.

To be precise, the error happens exactly at the line

p0.apply(b)

Do you think it is because the version is too old?
Do you have the same problem?
thanks

related to an answer for: Problem with creating a point source
closed with the note: Something for support mailing list.
asked Feb 5, 2016 by Antoine FEniCS Novice (810 points)
closed Feb 23, 2016 by Garth N. Wells

Your example works fine for me both with the latest stable version (1.6.0) and the development version of FEniCS.

A newbie question about the installation of fenics (i know about the rules of this forum, but i think that this question can be rapidly solved here): how i can install the development version on ubuntu machine? i have tried to do it using

curl -s http://fenicsproject.org/fenics-install.sh | bash` 

but i can't to acces to the libraries (using from dolfin import * in the python interface, for example).

However, after concluding the installation a file named fenics.dev was created in my home folder with the following contents:

# FEniCS configuration file created by fenics-install.sh on lun feb  8 19:28:33 CLT 2016
# Build type: development
 # Changeset for dolfin: 6629a0071fee796559c0ff24bd677f48d4773b48
 # Changeset for ffc: e97a780f2a1b7b0c11d98418e81eee0191295dcd
 # Changeset for fiat: 5b7f77abcea7d7e9b67b597a32543a12547ddf9b
 # Changeset for instant: 406c1a85a8a90aa8a156a03b0e020abe035e056e
 # Changeset for mshr: 445e0e3a42e53ddf782ee84304c1d724ec8334a9
 # Changeset for ufl: 9ce4d0935223b82d8d5cd81dd5f21e7854090e71
 # Changeset for uflacs: 22953185a9c61168b42812a4c4547a89636a85cc

export PROFILE=cbbbtm2cqijw
export PROFILE_INSTALL_DIR=/home/hernan/.hashdist/bld/profile/$PROFILE
export PATH=$PROFILE_INSTALL_DIR/bin:$PATH
export CMAKE_PREFIX_PATH=$PROFILE_INSTALL_DIR:$CMAKE_PREFIX_PATH
export PYTHONPATH=$PROFILE_INSTALL_DIR/lib/python2.7/site-packages:$PYTHONPATH
export INSTANT_CACHE_DIR=$HOME/.cache/instant/$PROFILE

I'm not an expert user of linux/ubuntu, so any suggestion would be greatly appreciated for me.

Thanks in advance!

(the question also was submitted to the fenics support mailing list)

...