Inconsistent problem of HDF I/O [message #33038] |
Wed, 27 November 2002 08:02  |
K.Y.Choi
Messages: 4 Registered: April 2002
|
Junior Member |
|
|
Hello
I've got HDF files that have been created with NCSA HDF Version 3.3
Release 3, February 1994. It contains several VGroups and one or two
SD objects. I wrote an IDL code for the HDF file I/O, that extracts
some file information from VGroups, as well as image data in SD
objects.
My routine has inconsistant problem, that is, when I tried to run my
code to open a file, it some times yields error message like
% HDF_CLOSE: Failed to close file (�).
In parentheses, it shows funny ASCII shapes, such as � shape or |
shape. With or without recompiling, it *sometimes* works after a
couple of trials for the same file. The file has no problem whatsoever
with HDF_BROWSER, indicating that the HDF file is fine.
Only solution I can think of was to seperate HDF_OPEN - HDF_CLOSE from
HDF_SD_START - HDF_SD_ENDACCESS - HDF_SD_END. Hence structure of my
code is as follows,
HDF_OPEN
:
access VGroup
:
HDF_CLOSE
HDF_SD_START
:
access SD
:
HDF_SD_ENDACCESS
HDF_SD_END
HDF_OPEN
:
access VGroup
:
HDF_CLOSE
The error always points HDF_CLOSE at the end of the routine
I thought (still think) HDF_OPEN - HDF_CLOSE and HDF_SD_START -
HDF_SD_ENDACCESS - HDF_SD_END behave exactly like OPENR /GET_LUN -
FREE_LUN. But they don't?
Should I blame a guy who creats the HDF file or IDL or myself? How am
I improve my routine as solid as BMW?
I look forward to hearing from you guys soom. Please share your wisdom
and experience...
Thanks
Reno
|
|
|