Hi,
I have a jython script which loops to find data clusters. Currently, I am performing some testing from the jython shell and it works fairly quickly for an area of 1840x2240, depending on how many pixels have a mask value of 1. However, I can only run once. If I try to run again or on another area, McIDAS-V stops responding. It does not appear that the memory at max: 862/1479/6537, but my session is locked. I think this is probably the jython loop causing this, but I don't know. I have posted the code and areas at /pub/incoming:
/pub/incoming/SH-*Band2_Unit_Pos[0-5].area
/pub/incoming/clusterDataMask.jar
generally, I have been running on the 5:45 data and masking values less than 160 and greater than 340.
a=selectData()
clusterDataMask(a[0],160,340,1,1)
Joleen
one try and I am done
Re: one try and I am done
Hi Joleen,
Sorry for the delay getting to your forum post, I did not grab the files and they have been deleted. Please repost the files.
Thanks,
Rick
Sorry for the delay getting to your forum post, I did not grab the files and they have been deleted. Please repost the files.
Thanks,
Rick
Re: one try and I am done
Hi Rick,
Tom looked at these and determined it was the createDisplay('imagedisplay',data) calls that were causing the problem. I am looking at alternatives now.
Joleen
Tom looked at these and determined it was the createDisplay('imagedisplay',data) calls that were causing the problem. I am looking at alternatives now.
Joleen
Re: one try and I am done
If I am running some code from the jython shell that creates a number of data objects to analyze a case study. I wish to use this code on multiple cases. Would it help to clear the output buffer or restart the jython shell to help address excessive memory usage?
Joleen
Joleen
Re: one try and I am done
Hi Joleen,
From our testing, we believe that this is a threading issue. Jon is making changes to run createLayer on the event dispatch thread, which fixes the problem for us. I don't think he's checked that in yet, but I'll talk to him today and find out the status.
- Becky
From our testing, we believe that this is a threading issue. Jon is making changes to run createLayer on the event dispatch thread, which fixes the problem for us. I don't think he's checked that in yet, but I'll talk to him today and find out the status.
- Becky
Re: one try and I am done
Hi Becky,
I think I have strayed onto two different issues and probably should have started a new post. I am working with a student who is doing some data analysis in McIDAS-V. The code itself creates a number of flatFields along with displaying them. I understand that collectGarbage() does not consistently free memory and was wondering if there was anything else that could be attempted to free the memory before he starts a new case. He would not need of the old arrays for the next run. I was thinking that clearing the output buffer my free up memory used for the extra arrays and give him a cleaner start for the next run, but I don't know enough about this.
Joleen
I think I have strayed onto two different issues and probably should have started a new post. I am working with a student who is doing some data analysis in McIDAS-V. The code itself creates a number of flatFields along with displaying them. I understand that collectGarbage() does not consistently free memory and was wondering if there was anything else that could be attempted to free the memory before he starts a new case. He would not need of the old arrays for the next run. I was thinking that clearing the output buffer my free up memory used for the extra arrays and give him a cleaner start for the next run, but I don't know enough about this.
Joleen
Re: one try and I am done
Jon,
Is the system.gc() different than collectGarbage()?
Joleen
Is the system.gc() different than collectGarbage()?
Joleen
Re: one try and I am done
joleenf wrote:Jon,
Is the system.gc() different than collectGarbage()?
Joleen
D'oh! Thanks for asking, because they're currently the same thing. collectGarbage() is just a more informative name for System.gc().
Re: one try and I am done
Jon added code to createLayer to now run on the Event Dispatch Thread. The change will be in the next nightly build. He's also working on something to reset the session, so that objects that are no longer needed will be eligible for garbage collection.
Re: one try and I am done
Thanks for the info!
Joleen
Joleen