On Thu, 14 Jun 2007, Tim Jenness wrote:
> On Thu, 14 Jun 2007, Peter W. Draper wrote:
>
> >> I'll have a poke around and see if an obvious cause leaps out.
> >
> > Not really that obvious, but I've uncovered the problem in HDS.
> >
> > Pre-HDS4 the value of hds_gl_status was set to DAT__OK on entry to HDS_CLOSE,
> > post that the relevant line seems to have been removed, no idea why, but I've
> > restored it anyway (see hdsopclos.c).
>
> Yes. It was changed in the HDS4 branch. It looks a bit odd so it could
> probably do with a comment attached to it.
Actually looking closely at the other interface routines it became clear
that this is the standard pattern, that's check the global status and if
clear also clear the hds global status, so I don't think it's anything
special, just a slip of the hand sometime.
> > The upshot of this change meant that if you called HDS_CLOSE when HDS had
> > already raised an error (like it had just looked for a global object that
> > didn't exist) it didn't execute, so the file wasn't closed. Should probably
> > replace the HDS_CLOSE call with DAT_ANNUL (line 185 in sup_hdslocs.f), but
> > I'm not feeling that brave.
>
> Thanks for the fix :-)
>
> Subpar does need a bit of a cleanout on a rainy day.
Agreed, does seem to be carrying a lot of cruft.
Peter.
|