comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Does the ENVI_SVM_DOIT function have memory leak problem?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Does the ENVI_SVM_DOIT function have memory leak problem? [message #59510] Fri, 28 March 2008 02:43 Go to next message
Neve is currently offline  Neve
Messages: 4
Registered: March 2008
Junior Member
Hi, all. I found that the ENVI_SVM_DOIT function may have memory leak
problem. I used the "Help, /memory" command before and after the
ENVI_SVM_DOIT function was called and found that certain amount memory
lost, even if I remove the image to be classified and training ROIs.
The size of the "lost" memory was different to either that of the
image to be classified or that of the classification result.

It may not be a big issue if one just call the ENVI_SVM_DOIT function
a few times, 'cause the size of "lost" memory is not large. My problem
is that I need to repeatedly use the SVM classifier for around a
thousand times, in which case the memory will finally be consumed and
leads to error.

Could anybody tell me if I am using the ENVI_SVM_DOIT function in a
wrong way or the function has memory leak problem? I also hope that
someone from the ENVI team may see this and solve the problem if it
turns out to be their problem. ; )

I attached my procedure below. The image I used is the one under the
envi\data\ folder.

Pro test
ori_data_path = 'D:\bhtmref'
envi_open_file, ori_data_path, r_fid=ori_img_fid
envi_file_query, ori_img_fid, dims=ori_img_dims, nb=ori_img_nb
numFeatures = ori_img_nb
Feature_Subset = indgen(numFeatures)
Para_C = 100
Para_gamma = 1/numFeatures
out_name = 'D:\clsrst'
envi_restore_rois,'D:\test.roi'
tr_roi_ids = envi_get_roi_ids(fid=fid)
help, /memory
print, '=================='
; Call the svm classification doit routine, using the optimized
parameters
envi_doit, 'envi_svm_doit', $
fid=ori_img_fid, pos=Feature_Subset, dims=ori_img_dims, $
out_name=out_name, roi_ids=tr_roi_ids , $
penalty=Para_C, kernel_gamma= Para_gamma
help, /memory
; Remove the original image and training ROI IDS
envi_file_mng, id=ori_img_fid, /remove
help, /memory
envi_delete_rois, tr_roi_ids

End
Re: Does the ENVI_SVM_DOIT function have memory leak problem? [message #59579 is a reply to message #59510] Thu, 03 April 2008 01:52 Go to previous messageGo to next message
Neve is currently offline  Neve
Messages: 4
Registered: March 2008
Junior Member
Pete,
The error you descibed is just the same one I wanted to say. It
happens when the memory is used up, right?
I am now 99% sure that it's caused by the envi_svm_doit function,
since I have ruled out all the possible causes I could image.
Maybe we should report this problem to the ENVI techinic team and
count on them to solve it. ;)
All the Best,
Neve
Re: Does the ENVI_SVM_DOIT function have memory leak problem? [message #59604 is a reply to message #59510] Wed, 02 April 2008 08:08 Go to previous messageGo to next message
peter.eddy@shaw.ca is currently offline  peter.eddy@shaw.ca
Messages: 19
Registered: March 2005
Junior Member
Neve,
We have been using SVM in ENVI4.4/IDL6.4 (windows XP) for the last few
weeks and have run into a similar problem. I'm not sure that its an
issue with your code because we get an error when initializing several
SVM classifications and running them using the queue manager (no
external user coding).

After a few queued classifications an error occurs "Unable to allocate
memory: to make array".
This leads me to believe that there is a memory leak as well.

Pete
Re: Does the ENVI_SVM_DOIT function have memory leak problem? [message #59645 is a reply to message #59579] Fri, 04 April 2008 07:27 Go to previous message
peter.eddy@shaw.ca is currently offline  peter.eddy@shaw.ca
Messages: 19
Registered: March 2005
Junior Member
> The error you described is just the same one I wanted to say. It
> happens when the memory is used up, right?

I believe so - I used to get this error quite a bit before I learned
about tile processing images =)


Pete
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: pollyfillv, area of a blob, etc...
Next Topic: IDL and RH 9 [ RH Enterprise WS 3 ]

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:59:07 PDT 2025

Total time taken to generate the page: 0.00472 seconds