Hi Haijun, If you are still getting a flock error, I'd be suspicious that you aren't linking to the patched HDF5 library. The source patch completely removes flock so you shouldn't be seeing file locking errors.
Dana Robinson Software Engineer The HDF Group From: Hdf-forum [mailto:[email protected]] On Behalf Of ??? Sent: Wednesday, July 27, 2016 2:16 AM To: HDF Users Discussion List <[email protected]> Subject: Re: [Hdf-forum] Error detected in HDF5 (1.10.0) thread 0: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src Hi Dana, Thanks for your response. I've tried with your method to patch and compile hdf5-1.10.0-patch1 source code. Patch and compile have no error. Unfortunately when run my code the error still exist. And error information is the same as before. What should I do? Please help me. Thank you again for your effort! Haijun Yu At 2016-07-26 13:47:39, "Dana Robinson" <[email protected]<mailto:[email protected]>> wrote: Hi, It looks like flock() is not implemented on your filesystem, which is causing the create call to fail. flock() file locking is used by the HDF5 1.10.0 to help enforce single-writer/multiple-readers (SWMR) semantics, but is not necessary for correct operation of the library. A fix for this problem should be available in HDF5 1.10.1, but in the meantime you can apply a source patch found here: https://www.hdfgroup.org/HDF5/release/obtainsrc5110.html#conf under "Patch to Disable File Locking" at the bottom of the page. Cheers, Dana Robinson Software Engineer The HDF Group From: Hdf-forum [mailto:[email protected]<mailto:[email protected]>] On Behalf Of ??? Sent: Tuesday, July 26, 2016 1:35 AM To: [email protected]<mailto:[email protected]> Subject: [Hdf-forum] Error detected in HDF5 (1.10.0) thread 0: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src Hi, I have met an obscure failure, and not find a good solution for two days. Could you help me? Thanks! (Using: hdf5-1.10.0-patch1-linux-centos6-x86_64-gcc447-shared.tar.gz) (Environment: redhat6.4-Intel-X64-g++4.4.7) The error information: HDF5-DIAG: Error detected in HDF5 (1.10.0) thread 0: #000: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src/H5F.c line 491 in H5Fcreate(): unable to create file major: File accessibilty minor: Unable to open file #001: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src/H5Fint.c line 1168 in H5F_open(): unable to lock the file or initialize file structure major: File accessibilty minor: Unable to open file #002: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src/H5FD.c line 1821 in H5FD_lock(): driver lock request failed major: Virtual File Layer minor: Can't update object #003: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src/H5FDsec2.c line 939 in H5FD_sec2_lock(): unable to flock file, errno = 38, error message = 'Function not implemented' major: File accessibilty minor: Bad file ID accessed HDF5-DIAG: Error detected in HDF5 (1.10.0) thread 0: #000: /home/hdftest/snapshots-hdf5_1_10_alpha/current/src/H5F.c line 749 in H5Fclose(): not a file ID major: Invalid arguments to routine minor: Inappropriate type compile no error: g++ -c packageHdf5.cpp -I ../latest/include -L ../latest/lib -lhdf5 -lhdf5_cpp link no error: g++ -o packageHdf5Run packageHdf5.o -I ../latest/include -L ../latest/lib -lhdf5 -lhdf5_cpp run error: ./packageHdf5Run (error information as above) My code: #include <stdio.h> #include <iostream> #include <string> #include "H5Cpp.h" #include <H5File.h> #include "hdf5.h" #ifndef H5_NO_NAMESPACE using namespace H5; #endif using namespace std; int main(int argc, char* argv[]) { hid_t file_id = H5Fcreate("/home/tg2hpps/tg2hpps_main/src/packageHdf5/dsetddd.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); H5Fclose(file_id); } Thanks!
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5
