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

Home » Public Forums » archive » HDF_SD_START: Invalid HDF file or filename: problem related to network issues
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: HDF_SD_START: Invalid HDF file or filename: problem related to network issues [message #86281 is a reply to message #86278] Tue, 22 October 2013 11:44 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Robert Levy writes:

>
> Hi all,
> I am a group newbie, so i apologize if a solution exists but I didn't find.
>
> Anyway, I am running a giant script to read thousands of MODIS HDF data files, which the files are located on a LVES mount (data are virtually mounted through a network).
>
> So the problem seems to be that there are occasional network "blips" that happen. For example, I run these command:
>
> 1) determine that the file exists and is a proper HDF file
> fileHandle = HDF_OPEN(Filename, /READ )
> IF fileHandle LT 1 THEN BEGIN
> errorLevel = 1
> Return, errorLevel
> ENDIF
> HDF_CLOSE, fileHandle
>
>
> 2) Then I go and actually open the file:
>
> hdfid = HDF_SD_START(Filename, /READ)
>
>
> This is where the code bombs and gives me:
> HDF_SD_START: Invalid HDF file or filename
>
> and stops my whole code. This file exists and is a perfectly fine file.
>
>
> Note that this may happen after the code is running for days (opening and closing files). If I try a second later, it works fine. Is there any way to have HDF_SD_START exit gracefully, and return an error code, rather than stop with error message? Then I could know it is a network problem and try again a few seconds later.
>
> Thanks for any ideas.

Well, CATCH error handlers are always pretty useful. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 8 byte to double?
Next Topic: Interesting results when using IMAGE function

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

Current Time: Wed Oct 08 13:58:46 PDT 2025

Total time taken to generate the page: 0.00416 seconds