[Hdf-forum] Multiple file opens
Allen Sanderson
allen at sci.utah.edu
Sat Jan 16 11:57:04 EST 2010
Hi Elena,
HDF5 did not dump out any errors, the call to H5Dopen returned a
negative pointer. That was all. Let me see if I can put together some
sample code that will make this failure happen.
Cheers,
Allen
On Jan 15, 2010, at 6:47 PM, Elena Pourmal wrote:
> Allen,
>
> You said that your program failed. Did it print out errors from the
> HDF5 library? This what we would like to see to assess the problem
> (a bug or a feature ;-)
> Having source code of the failing program would be even more helpful.
>
> Thank you!
>
> Elena
> On Jan 14, 2010, at 3:39 PM, Allen Sanderson wrote:
>
>> Hello Elena,
>>
>> Not a problem to send the stack info. Rarely do I gather this info
>> so could you point me to some sample code that will give you the
>> info you need.
>>
>> Cheers,
>>
>> Allen
>>
>>
>> Allen Sanderson
>> SCI Institute
>> University of Utah
>> www.sci.utah.edu
>>
>>
>>
>> On Jan 14, 2010, at 1:13 PM, Elena Pourmal wrote:
>>
>>> Allen,
>>>
>>> Thank you for your report!
>>> On Jan 14, 2010, at 12:37 PM, Allen Sanderson wrote:
>>>
>>>> HI,
>>>>
>>>> This morning I was able to track down a bug with a file with
>>>> external links where the file was opened twice simultaneously.
>>>> The first open was read only. The second open was read write.
>>>> However, if I create the file with the exact same hierarchy but
>>>> without links I do not see the bug. I found this odd.
>>>>
>>>> Here is the sequence
>>>>
>>>> fp1 = open file read only
>>>>
>>>> gp1 = open /group using fp1 (note /group is an eternal link)
>>>>
>>>> fp2 = open file read/write
>>>>
>>>> dp2 = open /group/dataset using fp2
>>>>
>>>> the last open fails. I can understand the failure given the gp1
>>>> is read only and dp2 which is under it is trying to perhaps do a
>>>> write which could cause some problems. So it fails.
>>>>
>>>> However, if the file has the same hierarchy but without the link
>>>> it does not fail. I found this behavior strange as I would have
>>>> expected both to behave the same.
>>>>
>>>> Obviously, one solution is not to open the file twice which is
>>>> certainly possible but also having both opens be read/write also
>>>> works. But I am more concerned with the inconsistency.
>>>>
>>> yes, good point. Could you please send us an error stack from the
>>> failed program?
>>>
>>> In our defense :-) RM entry for H5Fopen states "A file can often
>>> be opened with a new H5Fopen call without closing an already-open
>>> identifier established in a previous H5Fopen or H5Fcreate call.
>>> Each such H5Fopen call will return a unique identifier and the
>>> file can be accessed through any of these identifiers as long as
>>> the identifier remains valid. In such multiply-opened cases, all
>>> the open calls should use the same flags argument."
>>>
>>> Elena
>>>
>>>>
>>>> Cheers,
>>>>
>>>> Allen
>>>>
>>>>
>>>> Allen Sanderson
>>>> SCI Institute
>>>> University of Utah
>>>> www.sci.utah.edu
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Hdf-forum is for HDF software users discussion.
>>>> Hdf-forum at hdfgroup.org
>>>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>>
>>> _______________________________________________
>>> Hdf-forum is for HDF software users discussion.
>>> Hdf-forum at hdfgroup.org
>>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> Hdf-forum at hdfgroup.org
>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum at hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/attachments/20100116/2e4e08f2/attachment-0001.html>
More information about the Hdf-forum
mailing list