Open in new window / Try shogun cloud
--- Log opened Fri Nov 11 00:00:45 2011
-!- blackburn [~blackburn@] has quit [Quit: Leaving.]02:32
-!- sonne|work [~sonnenbu@] has quit [Ping timeout: 256 seconds]05:00
-!- sonne|work [~sonnenbu@] has joined #shogun05:05
-!- ron___ [54e4e203@gateway/web/freenode/ip.] has joined #shogun15:40
ron___hi there15:40
ron___re installing ruby modular over osx15:41
-!- ron___ [54e4e203@gateway/web/freenode/ip.] has quit [Ping timeout: 265 seconds]15:51
-!- blackburn [~blackburn@] has joined #shogun17:45
blackburnsonney2k: I would ask you to answer alessandro qs, I am afraid to get wrong and busy with java memleaks :(19:35
-!- blackburn [~blackburn@] has quit [Quit: Leaving.]20:02
-!- blackburn [~blackburn@] has joined #shogun20:26
CIA-37shogun: Soeren Sonnenburg master * r2f2a895 / (2 files in 2 dirs): Fix compilation under cygwin and for octave 3.4.x -
blackburnsonney2k: around?21:06
blackburnsonney2k: need help here21:07
blackburncustomkernel is buggy..21:07
blackburnin particular it leaks memory :)21:07
@sonney2kcustomkernel is buggy ?21:12
@sonney2khard to believe...21:12
blackburnsonney2k: try valgrind21:17
blackburnsonney2k: okay so the process is: DoubleMatrix passes to typemap, SGMatrix is created with no do_free flag21:17
blackburnthen kernel initializes with another one matrix (but float32)21:18
blackburnand I guess this SGMatrix is not being deleted21:18
blackburnI see valgrind warnings in python21:19
blackburnthat's definitely a problem21:22
blackburnsonney2k: where SGMatrices are being freed?21:31
blackburne.g. k = kernel.get_kernel_matrix()21:32
blackburnwhat frees k?21:32
CIA-37shogun: Sergey Lisitsyn master * r2478ae7 / src/shogun/kernel/Kernel.h : Fixed kernel get kernel matrix routine -
@sonney2kso you are only talking about memory leaks?22:16
blackburnsonney2k: sure22:17
blackburnI think I found a way22:17
blackburnsonney2k: that's madeleine's issue22:18
@sonney2krecall - we have trace malloc support22:18
@sonney2kso you could just compile with that and see what's wrong22:18
blackburnsonney2k: remind me how to use it22:18
blackburnI know what is wrong22:18
@sonney2kconfigure flag22:18
blackburnsonney2k: but I'm unsure about this decision22:19
blackburnsonney2k: see - if we do set_full_kernel_matrix_from_full22:19
blackburnwe definitely should to destroy matrix that was passed22:20
@sonney2knot for the 32bit variant22:21
blackburnfor 64 one22:22
@sonney2kso just call free_matrix() at the end of the  routine22:22
blackburnsonney2k: free flag is not being set in the right way22:24
blackburnin java,python..22:24
blackburnI guess for now it would be better to destroy it22:25
blackburnno chance of reused SGMatrix mapped from say DoubleMatrix22:25
blackburnthere would be different matrices for every typemapping..22:26
@sonney2kno that would be stupid22:26
@sonney2kthe only other idea I have is to fix the typemaps22:26
blackburnsonney2k: freeing matrix is as stupid as destroy it22:27
@sonney2kthe problem is that from C++ code one usually would only want to pass a ptr22:27
blackburnbecause it is being destroyed in both ways, but if we call free_matrix we could leak memory because of not proper typemaps22:27
blackburnthen check free_matrix code22:28
@sonney2kif free_matrix() is called but the free flag is not set it won't be freed22:28
@sonney2kI did22:28
blackburnyes, won't be freed22:28
blackburnbut lost a pointer22:28
@sonney2kthat is a local argument22:29
@sonney2knot a reference22:29
@sonney2kso only inside the function the ptr is reset22:29
blackburnsonney2k:  matrix=NULL??22:29
@sonney2kyes exactly22:30
@sonney2kwon't change anything outside the function22:30
blackburnsonney2k: T* matrix??22:30
blackburnwhat is you are talking about? we will lost the pointer if it is a SGMatrix generated by typemap22:30
blackburnsure we will22:31
@sonney2kthis is not java where everything is a refernce22:31
@sonney2kit is a local variable we are changing22:31
@sonney2kso only this local matrix variable is gone22:31
blackburnsonney2k: interfaces/java_modular/swig_typemaps.i:35922:32
blackburnsonney2k: SGMatrix created with data copied from matrix, then it passes to CustomKernel(SGMatrix<float64_t>)22:33
blackburnif do_free is false22:33
blackburnand we call free_matrix22:33
@sonney2ksure that is a different issue22:33
blackburnsonney2k: same for python I guess22:34
blackburnI'll check22:34
@sonney2kI would say - we currently have the assumption that every SGMatrix/Vector etc object passed into shogun is owned by shogun22:34
@sonney2kso destroy is very valid22:34
blackburnI think the same22:34
blackburnmoreover it fixes a bug and I can continue to live22:35
@sonney2khowever, the proper fix would be to set the do_free flag in the typemaps22:35
@sonney2kand use free_matrix()22:35
blackburnsonney2k: okay, TODO22:35
@sonney2kthis way a C++ function could just pass a ptr that is then converted to float3222:36
blackburnyes I understand C++ issue22:36
@sonney2kthe content I mean is converted from float54 to float3222:36
blackburnsure sure22:36
@sonney2kproblem 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 set22:37
@sonney2kotherwise we cannot own the object22:37
@sonney2kor we would need some helper copy function or so22:37
blackburnsonney2k: that's crazy22:38
blackburnwe moving memory all around :)22:38
@sonney2kwhat is crazy22:38
blackburnbut no way to avoid this..22:38
@sonney2kwell we have to avoid moving memory at all cost22:38
CIA-37shogun: Sergey Lisitsyn master * r4b4d8c5 / src/shogun/kernel/CustomKernel.h : Fixes memory leak on custom kernel creation -
@sonney2kanother regression bug gone...22:42
@sonney2kplease also create a bug report to fix the typemaps / utilize the do_free stuff22:42
@sonney2kblackburn, btw cygwin did compile today :)22:43
@sonney2kI am missing swig2.0.4 so I couldn't compile octave_modular22:43
blackburnsonney2k: nice22:43
blackburnwhy you didn't install it?22:43
@sonney2kbut python_modular+static, cmdline/libshogun, octavte_static all worked22:43
@sonney2kit is not in cygwin22:43
blackburnah I see22:44
@sonney2kthere is only 1.3.x22:44
@sonney2k1.3.40 IIRC22:44
blackburn1.2 gb instead of >20gb22:46
blackburnmadeleine would be happy hah22:47
blackburnsonney2k: that is a little fantastic you get it compiled on cygwin22:50
blackburnin fact I didn't tested #else branch of #ifdef HAVE_PTHREADS that much22:50
blackburnI have much of them in my code22:50
@sonney2k1.2GB instead of >20GB?22:52
@sonney2kahh memory22:52
blackburnsonney2k: yes22:52
blackburnsonney2k: see you23:16
-!- blackburn [~blackburn@] has quit [Quit: Leaving.]23:16
--- Log closed Sat Nov 12 00:00:51 2011