Toby St Clere Smithe <m...@tsmithe.net> writes: > So having split up my sources, I'm having trouble with shared > pointers. It seems that because of the way the sources have been split > into a number of functions, some pointer goes out of scope and gets > dereferenced twice.. I'm not sure the problem is in ViennaCL, but > something tricky is happening here at the interface between Python, > Boost and ViennaCL..
Then, bizarrely, when I use Valgrind, I get some success: ... Test: initialisation of vector with CPU scalar passed Test: initialisation of vector with ndarray passed Test: initialisation of vector with Vector passed Test: negation passed ERROR 2013-12-20 22:18:57,950 pyviennacl.pycore 2754 execute EXCEPTION EXECUTING: Assign(Scalar, Dot(Vector, Vector)=>Scalar)=>NoResult Traceback (most recent call last): File "../tests/pyviennacl/vector_operations.py", line 458, in <module> sys.exit(test()) File "../tests/pyviennacl/vector_operations.py", line 444, in test test_vector_slice(run_test, epsilon, p.float32, 11) File "/home/toby/src/viennacl/pyviennacl-dev/tests/pyviennacl/test_common.py", line 124, in test_vector_slice dtype = dtype) File "../tests/pyviennacl/vector_operations.py", line 72, in run_test act_diff = math.fabs(X - Y) File "/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py", line 458, in __sub__ return self.value - rhs File "/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py", line 2107, in value return self.result.value File "/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py", line 2085, in result self.execute() File "/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py", line 2096, in execute self._result = s.execute() File "/home/toby/src/viennacl/pyviennacl-dev/build/pyviennacl/build/lib.linux-x86_64-2.7/pyviennacl/pycore.py", line 2752, in execute self.vcl_statement.execute() RuntimeError: ViennaCL: Internal memory error: unknown memory handle! ToolObject::processDone( 1, 0 ) ... And without either Valgrind or gdb, the error is not a double free, but "Error in `python': invalid fastbin entry (free): 0x00000000013aa550"... Does anyone have a good reference for scoping and shared pointers in C++? Or should I just try and write some code reproducing this sort of error? (This may mean the 1.0.0 release has to wait till 2014..) Toby ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ ViennaCL-devel mailing list ViennaCL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viennacl-devel