I don't know. My only guess is that there is an incompatibility between libraries and/or compilers. What is python compiled with?
Kent > Thanks for your reply Kent. I used enableDebug=no to get > dolfin_wrap.cc to compile, because otherwise warnings are treated as > errors. Not sure if this will affect the output from gdb. Anyway, here > is the output from your suggestion: > > GNU gdb 6.8-debian > Copyright (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu"... > (gdb) run demo.py > Starting program: /usr/bin/python demo.py > [Thread debugging using libthread_db enabled] > [New Thread 0x7fe52a4266e0 (LWP 17418)] > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7fe52a4266e0 (LWP 17418)] > 0x00007fe51fdadf94 in MPID_CH_InitMsgPass () from > /home/tjc/computer/fenics/dolfin/dolfin/dolfin/libdolfin.so > Current language: auto; currently asm > (gdb) where > #0 0x00007fe51fdadf94 in MPID_CH_InitMsgPass () from > /home/tjc/computer/fenics/dolfin/dolfin/dolfin/libdolfin.so > #1 0x00007fe51fdab053 in MPID_Init () from > /home/tjc/computer/fenics/dolfin/dolfin/dolfin/libdolfin.so > #2 0x00007fe51fd8faa0 in MPIR_Init () from > /home/tjc/computer/fenics/dolfin/dolfin/dolfin/libdolfin.so > #3 0x00007fe51fcf1271 in dolfin::SubSystemsManager::initMPI () at > /usr/lib/openmpi/include/openmpi/ompi/mpi/cxx/functions_inln.h:104 > #4 0x00007fe51fcf1069 in dolfin::MPI::numProcesses () at > dolfin/main/MPI.cpp:29 > #5 0x00007fe51fcf1099 in dolfin::MPI::receive () at > dolfin/main/MPI.cpp:42 > #6 0x00007fe51fd2afab in UnitSquare (this=0x2ba2390, nx=32, ny=32, > type=dolfin::UnitSquare::right) at dolfin/mesh/UnitSquare.cpp:20 > #7 0x00007fe522e031e4 in _wrap_new_UnitSquare (self=<value optimized > out>, args=<value optimized out>) at dolfin/swig/dolfin_wrap.cc:90885 > #8 0x00000000004187b3 in PyObject_Call (func=0x0, arg=0x0, > kw=0x7fff324447a1) at ../Objects/abstract.c:1861 > #9 0x0000000000490257 in PyEval_EvalFrameEx (f=0x2ceb3e0, > throwflag=<value optimized out>) at ../Python/ceval.c:3855 > #10 0x00000000004930fd in PyEval_EvalCodeEx (co=0x2b5f558, > globals=<value optimized out>, locals=<value optimized out>, > args=0x7fe52a3d3c98, > argcount=3, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) > at ../Python/ceval.c:2838 > #11 0x00000000004dd692 in function_call (func=0x2c44b18, > arg=0x7fe52a3d3c80, kw=0x0) at ../Objects/funcobject.c:517 > #12 0x00000000004187b3 in PyObject_Call (func=0x0, arg=0x0, > kw=0x7fff324447a1) at ../Objects/abstract.c:1861 > #13 0x000000000041f658 in instancemethod_call (func=0x2c44b18, > arg=0x7fe52a3d3c80, kw=0x0) at ../Objects/classobject.c:2519 > #14 0x00000000004187b3 in PyObject_Call (func=0x0, arg=0x0, > kw=0x7fff324447a1) at ../Objects/abstract.c:1861 > #15 0x0000000000465ca6 in slot_tp_init (self=0x7fe52a3df6d0, > args=0x7fe52a3e0ea8, kwds=0x0) at ../Objects/typeobject.c:4943 > #16 0x000000000046df9b in type_call (type=0x2ceaa40, > args=0x7fe52a3e0ea8, kwds=0x0) at ../Objects/typeobject.c:436 > #17 0x00000000004187b3 in PyObject_Call (func=0x0, arg=0x0, > kw=0x7fff324447a1) at ../Objects/abstract.c:1861 > #18 0x000000000048feb2 in PyEval_EvalFrameEx (f=0x2245650, > throwflag=<value optimized out>) at ../Python/ceval.c:3786 > #19 0x00000000004930fd in PyEval_EvalCodeEx (co=0x7fe52a3d9288, > globals=<value optimized out>, locals=<value optimized out>, args=0x0, > argcount=0, > kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at > ../Python/ceval.c:2838 > #20 0x00000000004932f2 in PyEval_EvalCode (co=0x0, globals=0x0, > locals=0x7fff324447a1) at ../Python/ceval.c:494 > #21 0x00000000004b2d08 in PyRun_FileExFlags (fp=0x222c010, > filename=0x7fff324475a1 "demo.py", start=<value optimized out>, > globals=0x224f580, > locals=0x224f580, closeit=1, flags=0x7fff32445640) at > ../Python/pythonrun.c:1273 > #22 0x00000000004b2fab in PyRun_SimpleFileExFlags (fp=0x222c010, > filename=0x7fff324475a1 "demo.py", closeit=1, flags=0x7fff32445640) > at ../Python/pythonrun.c:879 > ---Type <return> to continue, or q <return> to quit--- > #23 0x0000000000414542 in Py_Main (argc=1, argv=<value optimized out>) > at ../Modules/main.c:532 > #24 0x00007fe5296511a6 in __libc_start_main () from /lib/libc.so.6 > #25 0x0000000000413989 in _start () > (gdb) > > By the way, the Lorenz Python demo seems to work okay, although it > warns "Not solving the dual problem as requested" at the end. > > Thanks, > Tim > > On Mon, Aug 25, 2008 at 4:02 PM, <[EMAIL PROTECTED]> wrote: >> >> Can you try with a debugger: >> >> gdb python >> (gdb) run demo.py >> .... >> (gdb) where >> >> It is strange if these warnings have anything to do with the seg. fault. >> >> Kent >> >> >>> Hello, >>> >>> Does anyone know a workaround to the problem of compiling the Pydolfin >>> file dolfin_wrap.cc with mpicxx version 4.3.1? I get several warnings >>> during compile, and segmentation faults at runtime. I am using Debian >>> Lenny, which uses 4.3.1 as the default compiler. SWIG is version >>> 1.3.33. Any help in this matter would be greatly appreciated. >>> >>> Here are the errors when enableDebug=no: >>> >>> mpicxx -o dolfin/swig/dolfin_wrap.os -c -Wall -pipe -ansi -DNDEBUG -O3 >>> -DHAS_MPI=1 -DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=\"0.8.0\" >>> -DHAS_PETSC=1 -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_CHOLMOD=1 >>> -fno-strict-aliasing -fPIC -I. -I/usr/include/libxml2 >>> -I/usr/lib/petscdir/2.3.3/bmake/linux-gnu-c-opt >>> -I/usr/lib/petscdir/2.3.3/include -I/usr/lib/openmpi/include >>> -I/usr/lib/openmpi/lib -Idolfin -I/usr/include/suitesparse >>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include >>> -I/usr/include/suitesparse -I/usr/include/python2.5 >>> -I/usr/include/python2.5 >>> -I/usr/lib/python2.5/site-packages/numpy/core/include >>> -I/usr/include/libxml2 -I/usr/lib/petscdir/2.3.3/bmake/linux-gnu-c-opt >>> -I/usr/lib/petscdir/2.3.3/include -I/usr/lib/openmpi/include >>> -I/usr/lib/openmpi/lib -Idolfin -I/usr/include/suitesparse >>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include >>> -I/usr/include/suitesparse dolfin/swig/dolfin_wrap.cc >>> dolfin/swig/dolfin_wrap.cc: In constructor >>> 'swig::PyObject_ptr::PyObject_ptr(PyObject*, bool)': >>> dolfin/swig/dolfin_wrap.cc:3286: warning: suggest explicit braces to >>> avoid ambiguous 'else' >>> dolfin/swig/dolfin_wrap.cc: In destructor >>> 'swig::PySequence_Cont<T>::~PySequence_Cont()': >>> dolfin/swig/dolfin_wrap.cc:4727: warning: suggest explicit braces to >>> avoid ambiguous 'else' >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_summary(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:29893: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_ios_base_sync_with_stdio(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:17337: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_TimeDependent(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:28067: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_BoundaryMesh(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:90450: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_MeshTopology(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:74482: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_MeshConnectivity(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:76492: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_MeshGeometry(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:75192: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_Vector(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:50862: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_uBLASVector(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:41746: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_uBLASILUPreconditioner(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:50585: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_PETScVector(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:44047: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_Table(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:30960: warning: 'argv[0]' may be used >>> uninitialized in this function >>> dolfin/swig/dolfin_wrap.cc: In function 'PyObject* >>> _wrap_new_Mesh(PyObject*, PyObject*)': >>> dolfin/swig/dolfin_wrap.cc:78823: warning: 'argv[0]' may be used >>> uninitialized in this function >>> mpicxx -o dolfin/swig/_dolfin.so -pthread -Wl,--export-dynamic -shared >>> dolfin/swig/dolfin_wrap.os -Ldolfin >>> -L/usr/lib/petscdir/2.3.3/lib/linux-gnu-c-opt -L/usr/lib/atlas >>> -L/usr/lib/atlas -lxml2 -lpetscts -lpetscsnes -lpetscksp -lpetscdm >>> -lpetscmat -lpetscvec -lpetsc -lblas -lumfpack -lamd -lgts -lm >>> -lgthread-2.0 -lrt -lgmodule-2.0 -ldl -lglib-2.0 -llapack -lblas >>> -lcholmod -lamd -lcolamd -ldolfin >>> scons: done building targets. >>> >>> Thanks, >>> Tim >>> _______________________________________________ >>> DOLFIN-dev mailing list >>> [email protected] >>> http://www.fenics.org/mailman/listinfo/dolfin-dev >>> >> >> >> > > > > -- > Timothy J. Crone > Lamont-Doherty Earth Observatory > Columbia University > 61 Route 9W > Palisades, NY 10964 > Tel: 845-365-8687 > > http://dactyl.ldeo.columbia.edu > _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
