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

Home » Public Forums » archive » Inconsistent problem of HDF I/O
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
Inconsistent problem of HDF I/O [message #33038] Wed, 27 November 2002 08:02 Go to next message
K.Y.Choi is currently offline  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
Re: Inconsistent problem of HDF I/O [message #85288 is a reply to message #33038] Mon, 22 July 2013 11:15 Go to previous messageGo to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
On Wednesday, November 27, 2002 8:02:31 AM UTC-8, Reno Choi wrote:
>
> % HDF_CLOSE: Failed to close file (¬).

I have just been bitten by this problem. The file passes HDF_ISHDF() and HDF_OPEN(), but HDF_CLOSE gives an error. No SD or VG or any kind of access statement between HDF_OPEN() and HDF_CLOSE() is required to give this error. Any other tests people use out there that can catch a bad HDF before it breaks IDL?
Re: Inconsistent problem of HDF I/O [message #85290 is a reply to message #85288] Mon, 22 July 2013 11:49 Go to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
On Monday, July 22, 2013 11:15:28 AM UTC-7, Edward Hyer wrote:
> I have just been bitten by this problem. The file passes HDF_ISHDF() and HDF_OPEN(), but HDF_CLOSE gives an error. No SD or VG or any kind of access statement between HDF_OPEN() and HDF_CLOSE() is required to give this error. Any other tests people use out there that can catch a bad HDF before it breaks IDL?

The file does cause 'ncdump' to fail. So my worst-case scenario is to add another layer of checks with 'ncdump,' but I'd be much happier if there was a check I could do within IDL.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Extracting pixel values from large image using RasterIterator
Next Topic: Slightly incorrect values using readf on a plain text file

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

Current Time: Wed Oct 08 15:07:28 PDT 2025

Total time taken to generate the page: 0.00620 seconds