Re: reading hdf files [message #63143 is a reply to message #913] |
Wed, 29 October 2008 06:06   |
loebasboy
Messages: 26 Registered: August 2008
|
Junior Member |
|
|
On 29 okt, 12:10, David Fanning <n...@dfanning.com> wrote:
> TimLS writes:
>> Has anyone else had problems reading hdf files? I'm using a program
>> that uses a variety of the H5* routines in IDL version 6.2.. I read
>> one of my data files and the program takes around 5 seconds. I read a
>> couple more files and suddenly it takes an age to read. The solution I
>> adopt is to shutdown IDL and re-start at the point that I'd got to.
>> Programming purists may disapprove but it works for me as all I'm
>> doing with the data is writing it out to another format. Presumably
>> there is some kind of memory allocation problem going on, but what can
>> I do about it?
>
> I think your best bet might be to read this article:
>
> http://www.catb.org/~esr/faqs/smart-questions.html
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
You should notice that it is important to close al file_id and
datasets_id you've used as such:
file_id = H5F_OPEN(file)
dataset_id = H5D_OPEN(file_id, nr_bands_str)
nr_bands = H5D_READ(dataset_id)
H5D_CLOSE, dataset_id
H5F_CLOSE, file_id
In this way there is no memory leakage. If this does not help I must
refer you to the link David provided.
|
|
|