> I know what I would change, but I don't have HDF on my machine so I cannot > test any changes I might make to the PDL bindings. Does any of the other > devs have HDF? > Edward, do you think you could boil this down to something we could put in > the test suite?
David,
I am just a lowly end user. I'm not sure what we would put in a test: a
corrupt HDF file and a code snippet that tries to open it 10,000 times?
>From your analysis, doesn't seem complex, just a simple bug in the
implementation where SDend never gets called in case of error.
I would love to see it fixed in a future PDL release. Moreover, if someone can
put some TLC into this code, would it be possible to implement graceful error
handling instead of 'die'? I don't think there is a good reason for this code
to 'die' if it can't open the provided file-- this forces me to use eval{} in
the upstream call, and seems generally suboptimal.
Thanks for all you do. Please let me know how I can help.
--Edward H.
From: David Mertens [mailto:[email protected]]
Sent: Monday, May 11, 2015 9:14 PM
To: Hyer, Dr. Edward
Cc: [email protected]
Subject: Re: [Pdl-general] PDL::IO::HDF::SD housekeeping 'Too many open files'
In more digging (again, I'm not an HDF expert, but this problem piques my
curiosity), it looks like the HDF library imposes its own file-open
limitation. The number of open files was limited to 32 prior to HDF v4.2r2,
but can now be set to any arbitrary number. Perhaps the most interesting
factoid, apparently unknown to the implementor of PDL::IO::HDF::SD, is that
"The calling program must make one SDend call for every SDstart call made
during its execution." This is not stated in the documentation that I
mentioned previously, and clearly this is not happening in the constructor
method. I think the each call to die not immediately preceded by a call to
_SDend needs to be preceded by a call to _SDend, such as here, here, here, and
others like it.
I know what I would change, but I don't have HDF on my machine so I cannot
test any changes I might make to the PDL bindings. Does any of the other devs
have HDF?
Edward, do you think you could boil this down to something we could put in the
test suite?
David
On Mon, May 11, 2015 at 6:10 PM, Hyer, Dr. Edward
<[email protected]> wrote:
>Your code logs the error messages. Do they all say "_ERR::SDstart" ?
Yes, I'm pretty sure all the errors are the same.
--Edward H.
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." -- Brian Kernighan
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
