|
dpb <none@non.net> wrote in message <jfhphb$pv0$1@speranza.aioe.org>...
> On 1/22/2012 1:36 PM, Jun wrote:
> > Dear Matlab Experts:
> > Very weired error message showed during the execution of timer object.
> > -------------------------------------------------------------------------
> > Error while evaluating TimerFcn for timer 'timer-1' Could not open file.
> > -------------------------------------------------------------------------
> > Everything was perfectly fine, for the first 20 times execution of the
> > callback TimerFcn, then suddenly an error poped out as above. What i do
> > not understand is that why there is a limited number of execution for
> > the timer's callback function.
> > My code structure is shown below-- very simple one
> > %%%% t =
> > timer('Period',5,'busyMode','queue','ExecutionMode','fixedSpacing');
> > t.TimerFcn = {@h5_write};
> >
> > function h5_write(t, TimerFcn)
> > %%%%
> ...
>
> Doubt it's the timer at all but the callback function apparently is
> trying to open a file. I suspect it is running out of available file
> handles as did another poster in a loop not long ago altho it's not
> possible to tell w/o the actual code for the callback.
>
I have exactly the same thought. The timer function seems fine. I am indeed handling a large number of files( more than 100,000 image files). For those file, I need to write them onto a single hdf5 dataset and then delete each one of them. Because the images are captured continously, my function has to be executed periodically. However, I did not include any command to reclaim handle space in my code.
I wonder would Matlab pop out a different error message such like 'out of memory' or ' too many files', if this is the case.
I had solved the 'heap space' problem. Do you have any suggestion to increase the number of available handles.
Many thanks in advance.
Jun
|