← Back to team overview

dolfin team mailing list archive

Re: Problems after shared_ptr patch

 

On Tuesday 13 January 2009 21:55:24 Kent Andre wrote:
> I now get:
>
> scons: `dolfin/libdolfin.so.0.9.0' is up to date.
> mpic++ -o dolfin/swig/cpp_wrap.os -c -Wall -pipe -ansi -DDEBUG -g
> -DNDEBUG -O2 -DHAS_MPI=1 -DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=
> \"0.9.0\" -DHAS_PETSC=1 -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_TRILINOS=1
> -DHAS_CHOLMOD=1 -DHAS_PARMETIS=1 -fno-strict-aliasing -fPIC -I.
> -I/usr/local/include -I/usr/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/include
> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -Idolfin
> -I/usr/include/suitesparse -I/usr/include -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/local/include
> -I/usr/include/suitesparse -I/usr/include -I/usr/include/python2.5
> -I/usr/include/python2.5
> -I/usr/lib/python2.5/site-packages/numpy/core/include
> -I/usr/local/include -I/usr/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/include
> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -Idolfin
> -I/usr/include/suitesparse -I/usr/include -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/local/include
> -I/usr/include/suitesparse -I/usr/include dolfin/swig/cpp_wrap.cc
> dolfin/swig/cpp_wrap.cc: In function «PyObject*
> _wrap_delete_Function(PyObject*, PyObject*)»:
> dolfin/swig/cpp_wrap.cc:63569: error: «debug_shared» was not declared in
> this scope

Looks like the same problem you had with compiling the swig generated file 
from ufc.i. 

What swig version do you have. I see that they in going from 1.3.34 to 1.3.35 
removed some debug stuff for shared_ptr. Maybe you should upgrade your swig 
version. 

You need a new version of swig I think 1.3.35 or 1.3.36 or more to be able to 
use it. I have had some correspondense with the swig developers and they 
claim the shared_ptr interface is stable now. 

The swig version is a general consern using shared_ptr. Not all is able 
install a new swig version. Any suggestion of how to takle this? 

Making shared_ptr an option can be doable but in some sense makes it difficult 
to develop the python library in PyDOLFIN as we somewhere assume that 
shared_ptrs is used.

Johan

> dolfin/swig/cpp_wrap.cc:63570: error: ambiguous overload for
> «operator<<» in «dolfin::cout.dolfin::LogStream::operator<<(((const
> char*)"deleting use_count: ")) <<
> smartarg1->boost::shared_ptr<T>::use_count [with T =
> dolfin::Function]()»
> ./dolfin/log/LogStream.h:29: note: candidates are: dolfin::LogStream&
> dolfin::LogStream::operator<<(const char*) <near match>
> ./dolfin/log/LogStream.h:30: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(const std::string&) <near match>
> ./dolfin/log/LogStream.h:31: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(int)
> ./dolfin/log/LogStream.h:32: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(unsigned int)
> ./dolfin/log/LogStream.h:33: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(double)
> ./dolfin/log/LogStream.h:34: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(dolfin::complex)
> ./dolfin/log/LogStream.h:35: note:                 dolfin::LogStream&
> dolfin::LogStream::operator<<(const dolfin::LogStream&) <near match>
>
> On ti., 2009-01-13 at 21:08 +0100, Johan Hake wrote:
> > On Tuesday 13 January 2009 18:36:26 Anders Logg wrote:
> > > I can't run the Poisson demo in DOLFIN after applying all the
> > > shared_ptr patches. JIT-compilation of forms sees to work, but it
> > > breaks at the JIT-compilation of the Functions:
> > >
> > > dolfin_compile_function_c2c6ca28e8e29b2498da8bbcedb6ff5e/compile.log
> > > /scratch/fenics/dolfin/dolfin-dev/local/include/dolfin/swig/dolfin_shar
> > >ed_p tr_classes.i:6: Error: Unable to find 'swig/ufc.i'
> >
> > Should be fixed now.
> >
> > Johan
> >
> > > running build_ext
> > > building '_dolfin_compile_function_c2c6ca28e8e29b2498da8bbcedb6ff5e'
> > > extension
> > > creating build
> > > creating build/temp.linux-i686-2.5
> > > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> > > -Wstrict-prototypes -fPIC
> > > -I/scratch/fenics/dolfin/dolfin-dev/local/include
> > > -I/usr/lib/python2.5/site-packages/numpy/core/include
> > > -I/usr/local/lib/slepc -I/usr/local/lib/slepc/include
> > > -I/usr/include/suitesparse -I/usr/include/python2.5
> > > -I/usr/local/lib/petsc/bmake/linux-gnu-cxx-debug
> > > -I/usr/local/lib/petsc/include -I/usr/local/include -I/usr/local/lib
> > > -I. -I/usr/include -I/usr/include/libxml2 -I/usr/include/glib-2.0
> > > -I/usr/lib/glib-2.0/include
> > > -I/usr/lib/python2.5/site-packages/numpy/core/include
> > > -I/usr/include/python2.5 -c
> > > dolfin_compile_function_c2c6ca28e8e29b2498da8bbcedb6ff5e_wrap.cxx -o
> > > build/temp.linux-i686-2.5/dolfin_compile_function_c2c6ca28e8e29b2498da8
> > >bbce db6ff5e_wrap.o gcc:
> > > dolfin_compile_function_c2c6ca28e8e29b2498da8bbcedb6ff5e_wrap.cxx: No
> > > such file or directory
> > > gcc: no input files
> > > error: command 'gcc' failed with exit status 1
> > >
> > > I have ufc.i in /usr/include/swig/ufc.i
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev




References