Dear all,
in the HDF5 version I am currently using (1.8.9) the flag
H5F_ACC_CREAT
is not working. An exception is thrown when I try to create a file like this:
H5::H5File H5file_ptr=newH5File("./test.h5",H5F_ACC_CREAT);
->
Exception at 0x761bc42d, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at c:\...\hdf5-1.8.9.tar\hdf5-1.8.9\hdf5-1.8.9\c++\src\h5file.cpp:121
refering to the following source code (h5file.cpp):
void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist)
{
// These bits only set for creation, so if any of them are set,
// create the file.
if( flags & (H5F_ACC_CREAT|H5F_ACC_EXCL|H5F_ACC_TRUNC|H5F_ACC_DEBUG))
{
hid_t create_plist_id = create_plist.getId();
hid_t access_plist_id = access_plist.getId();
id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
if( id < 0 ) // throw an exception when open/create fail
{
throw FileIException("H5File constructor", "H5Fcreate failed");
}
// Open the file if none of the bits above are set.
else
{
hid_t access_plist_id = access_plist.getId();
id = H5Fopen( name, flags, access_plist_id );
if( id < 0 ) // throw an exception when open/create fail
{
throw FileIException("H5File constructor", "H5Fopen failed");
}
}
A web search did not result in any information on if it has been solved or not in later releases.
Does anyone have some information on this ?
Furthermore, is my assumption correct, that this flag means:
Create/Openfile inRead/Writemodeandkeepfilecontentiffile already exists
?
Thank you
Best regards,
Florian
···
--
Mit freundlichen Grüßen
--
Dr.-Ing. Florian Hoffmann
inuTech GmbH Phone : +49-(0)911-323843-22
Fuerther Strasse 212 Fax : +49-(0)911-323843-43
90429 Nuernberg E-Mai l : florian.hoffmann@inutech.de
Germany Internet : http://www.inutech.de
inuTech GmbH
Sitz / Registered Office: Nuernberg
Handelsregister / Companies' Register: AG Nürnberg HRB Nr. 19026
Geschäftsführer / Managing Director: Frank Vogel
*****************************************************************
DIFFPACK - THE NEW GENERATION OF SIMULATION-SOFTWARE!
Go to http://www.diffpack.com to read the details
*****************************************************************