Werner, I think the lib- prefix does not apply to my case because I am using VS2015 for compiling the libraries. But agreed that HDF5 taking different conventions depending on whether a MSVC or GCC-based is a bit confusing.
BTW, although the h5dump can read blosc files with the plugin, ptrepack cannot create them on Windows: C:\Users\faltet>h5repack -f UD=32001,8,0,0,0,0,0,9,1,5 carray1-blosc.h5 carray1-repack.h5 HDF5-DIAG: Error detected in HDF5 (1.8.19) thread 0: #000: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pocpl.c line 1100 in H5Pget_filter_by_id2(): can't find object for ID major: Object atom minor: Unable to find atom information (already closed?) #001: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pint.c line 3379 in H5P_object_verify(): property list is not a member of the class major: Property lists minor: Unable to register new atom #002: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pint.c line 3329 in H5P_isa_class(): not a property list major: Invalid arguments to routine minor: Inappropriate type HDF5-DIAG: Error detected in HDF5 (1.8.19) thread 0: #000: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pocpl.c line 1100 in H5Pget_filter_by_id2(): can't find object for ID major: Object atom minor: Unable to find atom information (already closed?) #001: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pint.c line 3379 in H5P_object_verify(): property list is not a member of the class major: Property lists minor: Unable to register new atom #002: C:\Users\buildbot\Buildbot\hdf518-StdRelease-code-vs14\build\hdfsrc\src\H5Pint.c line 3329 in H5P_isa_class(): not a property list major: Invalid arguments to routine minor: Inappropriate type h5repack error: <carray1-blosc.h5>: Could not copy data to: carray1-repack.h5 I have tested with both 1.10.1 and 1.8.19 (above). whereas it works perfectly well on a Mac box: Francescs-MacBook-Pro:PyTables faltet$ h5repack -f UD=32001,8,0,0,0,0,0,9,1,5 carray1-blosc.h5 carray1-repack.h5 Francescs-MacBook-Pro:PyTables faltet$ h5ls -v carray1-repack.h5 Opened "carray1-repack.h5" with sec2 driver. carray Dataset {200/218, 300/300} Location: 1:800 Links: 1 Chunks: {218, 300} 65400 bytes Storage: 60000 logical bytes, 58 allocated bytes, 103448.28% utilization Filter-0: blosc-32001 {2, 2, 1, 65400, 9, 1, 5, 5} Type: native unsigned char Any hints? 2017-06-28 15:15 GMT+02:00 Werner Benger <wer...@cct.lsu.edu>: > Hi Francesc, > > it took me a while to figure out this detail, too, I had the blosc.dll in > the PATH at first, and it seems to work under some circumstances but not > others... not entirely clear to me when it needs to be in the PATH or in > the calling's DLL's directory outside of the PATH. > > There's some code in H5PL.c that checks for a lib prefix: > > #ifndef __CYGWIN__ > if(!HDstrncmp(dp->d_name, "lib", (size_t)3) && > (HDstrstr(dp->d_name, ".so") || HDstrstr(dp->d_name, > ".dylib"))) { > #else > ... > > #endif > > So I guess in your case that prefix check did not apply, whereas for me > using gcc under windows it did. Thus it seems best for compatibility to > keep the plugins named with lib- starting under Windows, once compiled that > C code should not matter whether it was produced by GCC or MSC. Otherwise > yes, the name does not matter indeed. > > Werner > > On 28.06.2017 15:00, Francesc Alted wrote: > > Hi Werner, > > Right, what I was missing was basically moving the blosc.dll library into > the HDF5 plugin directory. I thought that putting blosc.dll in a directory > in the %PATH% was going to be enough, but apparently this is not the case > (I suppose this is a Windows trickery). > > For what is worth, the name of the DLL plugin is not that important as I > have tried with libHDF5blosc.dll, libH5Zblosc.dll, H5Zblosc.dll and even > blosc_plugin.dll and all of them work. Apparently the HDF5 library tries > all the DLLs in the plugin directory and uses the one that registers the > necessary filter ID; pretty smart. > > Thanks so much! > > 2017-06-28 14:31 GMT+02:00 Werner Benger <wer...@cct.lsu.edu>: > >> Just to add: >> >> under windows, the plugins need to start with lib as prefix. It's >> technically not required, but the HDF5 plugin loader expects that. So the >> liblz4.dll in my plugins dir is the LZ4 plugin,the libHDF5blosc.dll the >> blosc-filter; the blosc.dll is used by the blosc filter and needs to be in >> the same directory if compiled as dynamic library as well. >> >> Werner >> >> On 28.06.2017 14:24, Werner Benger wrote: >> >> Hi, >> >> I am using HDF5 with blosc dynamic plugin loading regularly under >> Windows, and this are the files as needed in the plugin directory that >> HDF5 looks for: >> >> HDF5Plugins $ ll >> total 1.2M >> -rwxr-xr-x 1 Wrk None 382K Jun 26 23:30 blosc.dll* >> -rwxr-xr-x 1 Wrk None 330K Jun 26 23:30 libHDF5blosc.dll* >> -rwxr-xr-x 1 Wrk None 410K Jun 26 23:30 liblz4.dll* >> >> The blosc.dll is the blosc library, libHDF5blosc.dll is the HDF5 plugin >> using that library. >> >> I'm using Mingw64, which is gcc 6.3 under MSYS2 . >> >> Werner >> >> On 28.06.2017 13:44, Francesc Alted wrote: >> >> Hi, >> >> I have been trying to give support to HDF5 on Windows for dynamically >> loading the Blosc plugin (https://github.com/Blosc/hdf5-blosc), but no >> success so far. >> >> I basically have compiled the plugin with: >> >> > cl /I"C:\Program Files (x86)\blosc\include" >> /I"C:\HDF_Group\HDF5\1.8.12\include" libH5Zblosc.c blosc_filter.c >> /OUT:libH5Zblosc.dll /LD /link /LIBPATH:"C:\Program Files (x86)\blosc\lib" >> /LIBPATH:"C:\HDF_Group\HDF5\1.8.12\lib" blosc.lib hdf5.lib >> >> and then copied the libH5Zblosc.dll to "%ALLUSERSPROFILE%/hdf5/lib/plugin", >> but when I try to use a h5dump for getting the data of an HDF5 with some >> datasets compressed with Blosc, I am getting: >> >> >h5dump \tmp\carray1-blosc.h5 >> HDF5 "\tmp\carray1-blosc.h5" { >> GROUP "/" { >> DATASET "carray" { >> DATATYPE H5T_STD_U8LE >> DATASPACE SIMPLE { ( 200, 300 ) / ( 218, 300 ) } >> DATA {h5dump error: unable to print data >> >> } >> } >> } >> } >> >> When asking for more errors, I am getting a more informative message: >> >> >h5dump --enable-error-stack \tmp\carray1-blosc.h5 >> HDF5 "\tmp\carray1-blosc.h5" { >> GROUP "/" { >> DATASET "carray" { >> DATATYPE H5T_STD_U8LE >> DATASPACE SIMPLE { ( 200, 300 ) / ( 218, 300 ) } >> DATA {HDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0: >> #000: C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5Dio.c >> line 171 in H5Dread(): can't read data >> major: Dataset >> minor: Read failed >> #001: C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5Dio.c >> line 544 in H5D__read(): can't read data >> major: Dataset >> minor: Read failed >> #002: >> C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5Dchunk.c >> line 2050 in H5D__chunk_read(): unable to read raw data chunk >> major: Low-level I/O >> minor: Read failed >> #003: >> C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5Dchunk.c >> line 3405 in H5D__chunk_lock(): data pipeline read failed >> major: Data filters >> minor: Filter operation failed >> #004: C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5Z.c >> line 1349 in H5Z_pipeline(): required filter 'blosc' is not registered >> major: Data filters >> minor: Read failed >> #005: C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5PL.c >> line 389 in H5PL_load(): search in paths failed >> major: Plugin for dynamically loaded library >> minor: Can't get value >> #006: C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\src\H5PL.c >> line 812 in H5PL__find(): can't open directory >> major: Plugin for dynamically loaded library >> minor: Can't open directory or file >> h5dump error: unable to print data >> >> } >> } >> } >> } >> H5tools-DIAG: Error detected in HDF5:tools (1.10.1) thread 0: >> #000: >> C:\autotest\hdf5110-StdRelease-code-10vs14\build\hdfsrc\tools\lib\h5tools_dump.c >> line 1639 in h5tools_dump_simple_dset(): H5Dread failed >> major: Failure in tools library >> minor: error in function >> >> I suppose the meaningful part is here: >> >> 10vs14\build\hdfsrc\src\H5PL.c line 812 in H5PL__find(): can't open >> directory >> >> b >> ut I have no clues on 1) what directory the dynamic plugin machinery in >> HDF5 is looking at and 2) which name the DLL should have (as per manual, I >> am using libH5Zblosc.dll, but I have tried with H5Zblosc.dll and blosc.dll >> with no success). >> >> I have also tried to use the HDF5_PLUGIN_PATH environment variable, so as >> to direct the plugin machinery in HDF5 to look into the specific >> %ALLUSERSPROFILE%/hdf5/lib/plugin >> place, >> but no luck. >> >> I tried with HDF5 1.8.12 and 1.10.1, with same results. Finally, if it >> is of any help, I am using Windows 10 64 bit. >> >> As a suggestion, it may help to debug situations like this if the HDF5 >> backtrace of the plugin machinery would provide info about 1) which >> directory it is looking at for finding the HDF5 plugin and 2) the name of >> the DLL that it is trying to load. >> >> Thanks in advance, >> >> -- >> Francesc Alted >> >> >> _______________________________________________ >> Hdf-forum is for HDF software users >> discussion.Hdf-forum@lists.hdfgroup.orghttp://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org >> Twitter: https://twitter.com/hdf5 >> >> >> -- >> ___________________________________________________________________________ >> Dr. Werner Benger Visualization Research >> Center for Computation & Technology at Louisiana State University (CCT/LSU) >> 2019 Digital Media Center, Baton Rouge, Louisiana 70803 >> Tel.: +1 225 578 4809 <%28225%29%20578-4809> Fax.: +1 >> 225 578-5362 <%28225%29%20578-5362> >> >> >> >> _______________________________________________ >> Hdf-forum is for HDF software users >> discussion.Hdf-forum@lists.hdfgroup.orghttp://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org >> Twitter: https://twitter.com/hdf5 >> >> >> -- >> ___________________________________________________________________________ >> Dr. Werner Benger Visualization Research >> Center for Computation & Technology at Louisiana State University (CCT/LSU) >> 2019 Digital Media Center, Baton Rouge, Louisiana 70803 >> Tel.: +1 225 578 4809 <%28225%29%20578-4809> Fax.: +1 >> 225 578-5362 <%28225%29%20578-5362> >> >> >> _______________________________________________ >> Hdf-forum is for HDF software users discussion. >> Hdf-forum@lists.hdfgroup.org >> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org >> Twitter: https://twitter.com/hdf5 >> > > > > -- > Francesc Alted > > > _______________________________________________ > Hdf-forum is for HDF software users > discussion.Hdf-forum@lists.hdfgroup.orghttp://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 > > > -- > ___________________________________________________________________________ > Dr. Werner Benger Visualization Research > Center for Computation & Technology at Louisiana State University (CCT/LSU) > 2019 Digital Media Center, Baton Rouge, Louisiana 70803 > Tel.: +1 225 578 4809 <(225)%20578-4809> Fax.: +1 225 > 578-5362 <(225)%20578-5362> > > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > Hdf-forum@lists.hdfgroup.org > http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org > Twitter: https://twitter.com/hdf5 > -- Francesc Alted
_______________________________________________ Hdf-forum is for HDF software users discussion. Hdf-forum@lists.hdfgroup.org http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org Twitter: https://twitter.com/hdf5