--- Log opened Fri Nov 11 00:00:45 2011 | ||
-!- blackburn [~blackburn@188.168.4.136] has quit [Quit: Leaving.] | 02:32 | |
-!- sonne|work [~sonnenbu@194.78.35.195] has quit [Ping timeout: 256 seconds] | 05:00 | |
-!- sonne|work [~sonnenbu@194.78.35.195] has joined #shogun | 05:05 | |
-!- ron___ [54e4e203@gateway/web/freenode/ip.84.228.226.3] has joined #shogun | 15:40 | |
ron___ | hi there | 15:40 |
---|---|---|
ron___ | re installing ruby modular over osx | 15:41 |
-!- ron___ [54e4e203@gateway/web/freenode/ip.84.228.226.3] has quit [Ping timeout: 265 seconds] | 15:51 | |
-!- blackburn [~blackburn@83.234.54.236] has joined #shogun | 17:45 | |
blackburn | sonney2k: I would ask you to answer alessandro qs, I am afraid to get wrong and busy with java memleaks :( | 19:35 |
-!- blackburn [~blackburn@83.234.54.236] has quit [Quit: Leaving.] | 20:02 | |
-!- blackburn [~blackburn@188.168.4.41] has joined #shogun | 20:26 | |
CIA-37 | shogun: Soeren Sonnenburg master * r2f2a895 / (2 files in 2 dirs): Fix compilation under cygwin and for octave 3.4.x - http://git.io/FpEMPQ | 20:58 |
blackburn | sonney2k: around? | 21:06 |
blackburn | sonney2k: need help here | 21:07 |
blackburn | customkernel is buggy.. | 21:07 |
blackburn | in particular it leaks memory :) | 21:07 |
@sonney2k | customkernel is buggy ? | 21:12 |
@sonney2k | hard to believe... | 21:12 |
blackburn | sonney2k: try valgrind | 21:17 |
blackburn | sonney2k: okay so the process is: DoubleMatrix passes to typemap, SGMatrix is created with no do_free flag | 21:17 |
blackburn | then kernel initializes with another one matrix (but float32) | 21:18 |
blackburn | and I guess this SGMatrix is not being deleted | 21:18 |
blackburn | I see valgrind warnings in python | 21:19 |
blackburn | that's definitely a problem | 21:22 |
blackburn | sonney2k: where SGMatrices are being freed? | 21:31 |
blackburn | e.g. k = kernel.get_kernel_matrix() | 21:32 |
blackburn | what frees k? | 21:32 |
CIA-37 | shogun: Sergey Lisitsyn master * r2478ae7 / src/shogun/kernel/Kernel.h : Fixed kernel get kernel matrix routine - http://git.io/x2WmFg | 21:55 |
@sonney2k | so you are only talking about memory leaks? | 22:16 |
blackburn | sonney2k: sure | 22:17 |
blackburn | I think I found a way | 22:17 |
blackburn | sonney2k: that's madeleine's issue | 22:18 |
@sonney2k | recall - we have trace malloc support | 22:18 |
@sonney2k | so you could just compile with that and see what's wrong | 22:18 |
blackburn | sonney2k: remind me how to use it | 22:18 |
blackburn | I know what is wrong | 22:18 |
@sonney2k | configure flag | 22:18 |
@sonney2k | ok | 22:18 |
blackburn | sonney2k: but I'm unsure about this decision | 22:19 |
blackburn | sonney2k: see - if we do set_full_kernel_matrix_from_full | 22:19 |
blackburn | we definitely should to destroy matrix that was passed | 22:20 |
@sonney2k | not for the 32bit variant | 22:21 |
blackburn | sure | 22:21 |
blackburn | for 64 one | 22:22 |
@sonney2k | so just call free_matrix() at the end of the routine | 22:22 |
blackburn | sonney2k: free flag is not being set in the right way | 22:24 |
blackburn | in java,python.. | 22:24 |
blackburn | I guess for now it would be better to destroy it | 22:25 |
blackburn | no chance of reused SGMatrix mapped from say DoubleMatrix | 22:25 |
blackburn | there would be different matrices for every typemapping.. | 22:26 |
@sonney2k | no that would be stupid | 22:26 |
@sonney2k | hmmhh | 22:26 |
@sonney2k | the only other idea I have is to fix the typemaps | 22:26 |
blackburn | sonney2k: freeing matrix is as stupid as destroy it | 22:27 |
@sonney2k | why? | 22:27 |
@sonney2k | the problem is that from C++ code one usually would only want to pass a ptr | 22:27 |
blackburn | because it is being destroyed in both ways, but if we call free_matrix we could leak memory because of not proper typemaps | 22:27 |
@sonney2k | nope | 22:28 |
blackburn | then check free_matrix code | 22:28 |
@sonney2k | if free_matrix() is called but the free flag is not set it won't be freed | 22:28 |
@sonney2k | I did | 22:28 |
blackburn | yes, won't be freed | 22:28 |
blackburn | but lost a pointer | 22:28 |
@sonney2k | no | 22:28 |
@sonney2k | that is a local argument | 22:29 |
@sonney2k | not a reference | 22:29 |
@sonney2k | so only inside the function the ptr is reset | 22:29 |
blackburn | sonney2k: matrix=NULL?? | 22:29 |
@sonney2k | yes exactly | 22:30 |
@sonney2k | won't change anything outside the function | 22:30 |
blackburn | sonney2k: T* matrix?? | 22:30 |
@sonney2k | ? | 22:30 |
blackburn | what is you are talking about? we will lost the pointer if it is a SGMatrix generated by typemap | 22:30 |
@sonney2k | nope | 22:31 |
blackburn | sure we will | 22:31 |
@sonney2k | this is not java where everything is a refernce | 22:31 |
@sonney2k | it is a local variable we are changing | 22:31 |
@sonney2k | so only this local matrix variable is gone | 22:31 |
blackburn | sonney2k: interfaces/java_modular/swig_typemaps.i:359 | 22:32 |
blackburn | sonney2k: SGMatrix created with data copied from matrix, then it passes to CustomKernel(SGMatrix<float64_t>) | 22:33 |
blackburn | if do_free is false | 22:33 |
blackburn | and we call free_matrix | 22:33 |
@sonney2k | sure that is a different issue | 22:33 |
blackburn | sonney2k: same for python I guess | 22:34 |
blackburn | I'll check | 22:34 |
@sonney2k | I would say - we currently have the assumption that every SGMatrix/Vector etc object passed into shogun is owned by shogun | 22:34 |
blackburn | so | 22:34 |
blackburn | ? | 22:34 |
@sonney2k | so destroy is very valid | 22:34 |
blackburn | I think the same | 22:34 |
blackburn | moreover it fixes a bug and I can continue to live | 22:35 |
blackburn | :D | 22:35 |
@sonney2k | however, the proper fix would be to set the do_free flag in the typemaps | 22:35 |
@sonney2k | and use free_matrix() | 22:35 |
blackburn | sonney2k: okay, TODO | 22:35 |
@sonney2k | this way a C++ function could just pass a ptr that is then converted to float32 | 22:36 |
blackburn | yes I understand C++ issue | 22:36 |
@sonney2k | the content I mean is converted from float54 to float32 | 22:36 |
blackburn | sure sure | 22:36 |
@sonney2k | problem is that we for exampel in the set_full_kernel_matrix_from_full for float32 types we need to ASSERT() that the free flag is set | 22:37 |
@sonney2k | otherwise we cannot own the object | 22:37 |
@sonney2k | or we would need some helper copy function or so | 22:37 |
blackburn | sonney2k: that's crazy | 22:38 |
blackburn | we moving memory all around :) | 22:38 |
@sonney2k | what is crazy | 22:38 |
blackburn | but no way to avoid this.. | 22:38 |
@sonney2k | well we have to avoid moving memory at all cost | 22:38 |
CIA-37 | shogun: Sergey Lisitsyn master * r4b4d8c5 / src/shogun/kernel/CustomKernel.h : Fixes memory leak on custom kernel creation - http://git.io/FHe61w | 22:40 |
@sonney2k | another regression bug gone... | 22:42 |
@sonney2k | please also create a bug report to fix the typemaps / utilize the do_free stuff | 22:42 |
@sonney2k | blackburn, btw cygwin did compile today :) | 22:43 |
@sonney2k | I am missing swig2.0.4 so I couldn't compile octave_modular | 22:43 |
blackburn | sonney2k: nice | 22:43 |
blackburn | why you didn't install it? | 22:43 |
@sonney2k | but python_modular+static, cmdline/libshogun, octavte_static all worked | 22:43 |
@sonney2k | it is not in cygwin | 22:43 |
blackburn | ah I see | 22:44 |
@sonney2k | there is only 1.3.x | 22:44 |
@sonney2k | 1.3.40 IIRC | 22:44 |
blackburn | 1.2 gb instead of >20gb | 22:46 |
blackburn | madeleine would be happy hah | 22:47 |
blackburn | sonney2k: that is a little fantastic you get it compiled on cygwin | 22:50 |
blackburn | in fact I didn't tested #else branch of #ifdef HAVE_PTHREADS that much | 22:50 |
blackburn | I have much of them in my code | 22:50 |
@sonney2k | 1.2GB instead of >20GB? | 22:52 |
@sonney2k | ahh memory | 22:52 |
blackburn | sonney2k: yes | 22:52 |
blackburn | sonney2k: see you | 23:16 |
-!- blackburn [~blackburn@188.168.4.41] has quit [Quit: Leaving.] | 23:16 | |
--- Log closed Sat Nov 12 00:00:51 2011 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!