Re: 2 questions [message #26317 is a reply to message #26316] |
Thu, 16 August 2001 01:40  |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
Bob Fugate wrote:
> I am batch processing a number of HDF files, saving output to results files.
> I have a short procedure that first checks the validity of the files using
> HDF_ISHDF -- just to avoid file access problems during the main processing
> routines. The files are located on a server, or if old enough, on a tape
> library, with only a stub left on the server. A file on tape opened by
> HDF_ISHDF (or any other routine) is automatically restored from tape to the
> server. The problem is, if the file is on tape, HDF_ISHDF times out before
> the file gets reloaded. HDF_ISHDF fails. I could modify the check routine to
> put these files in a separate list to process on the second pass once the
> files are restored. I don't have a simple way (and apparently not even a
> complicated way) to check on the status of these files to know whether they
> are on the server or in the library.
>
> Question: Is there a better way to handle this? For instance, is there a way
> to extend the time-out period to allow the file to be restored so it can be
> checked and subsequently processed? Is there a way to terminate the
> HDF_ISHDF query before it times out and put this file on a list to process
> in a second batch? Any suggestions greatly appreciated.
>
Is there some feature of the stub files which you could test before
calling HDF_ISHDF? Perhaps the length, or the first few bytes of the
contents.
Then you could use logic like:
for each file
test file
if stub
add file to list of deferred files
else
HDF_ISHDF file
This way you avoid calling HDF_ISHDF for the stub files.
--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
|
|
|