Coder Social home page Coder Social logo

hdf5oct's People

Contributors

antst avatar stegro avatar tmullins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hdf5oct's Issues

gripes.h: No such file or directory

running 'make' produces the following error:
h5read.cc:41:10: fatal error: gripes.h: No such file or directory
41 | #include "gripes.h"
| ^~~~~~~~~~
compilation terminated.
make: *** [makefile:19: h5read.o] Error 1

Memory consumption for chunked datasets

% In its present form, reading certain large chunked datasets
% consumes a tremendous amount of memory while it is as fast as
% it should be if the dset is not chunked, or if the load()
% function is used.
% This has to be fixed quickly, but I don't understand it yet,
% I don't see much of a difference in what they both do.
%
% Maybe somebody else can confirm and/or comment?
%
pkg load hdf5oct;

%a = rand(230,40,40,70); % let's call that x)
a = rand(230,43,43,71); % y)
s = size(a)
s(1)=1
h5create("testchunk.h5","/foo_chunked",size(a),'ChunkSize',s)
h5write("testchunk.h5","/foo_chunked",a)
h5create("testchunk.h5","/foo_unchunked",size(a))
h5write("testchunk.h5","/foo_unchunked",a)

disp("load:")
%str = load("-hdf5","testchunk.h5"); %okay for both x) and y)
%clear str;
disp("read unchunked:")
%b = h5read("testchunk.h5","/foo_unchunked"); %okay for both x) and y)
disp("read chunked:")
b = h5read("testchunk.h5","/foo_chunked"); %okay for x), catastrophic for y)

How to "read string typed datasets"?

I was going through the Readme of this repository and found this statement in TODO.

read string typed datasets

Is reading a string dataset really an issue in HDF5?
Is there any special procedure or understanding needed for that?

I am working on the HDF5 wrapper in C# using HDF.PInvoke. My wrapper can write the string dataset. I am facing the issue while reading the string dataset. I have explored many links.
Even sharpHDF, another GitHub wrapper on HDF.PInvoke does not support writing and hence, reading string datatype.

What is the issue that you are facing? If you can share the issue, we may together find the solution.

Fix for deprecated error_state

There are warnings when compiling under recent Octave(s). According to docs, the "error_state" variable has been removed and replaced by exceptions. Compiling h5read.cc after adding
#define error_state 0
is ok.
Thus I think the code "if (!error_state) {....}" can be deleted completely.

Error in make: mkoctfile: not found

On Ubuntu 18.04; Octave installed with apt install octave.

In the source directory, make fails with error:

CXX=h5c++ mkoctfile -g -c h5read.cc
/bin/sh: 1: mkoctfile: not found
makefile:19: recipe for target 'h5read.o' failed
make: *** [h5read.o] Error 127

Big dataset performance

I am trying to read a double precision dataset with
2 x 4 x 4656 x 946 x 28 (C ordering, as displayed by hdfview), which is chunked into pieces of 2 x 4 x 4656 x 946 x 1, and h5read works for several minutes after allocating the memory. I wonder if this can be improved or is just what one must expect.

h5read fails with error

loading of hdf5 file fails with error :

x=h5read('ec013.156.nwb','/file_create_date')
HDF5-DIAG: Error detected in HDF5 (1.8.13) thread 140122874586880:
#000: ../../../src/H5Dio.c line 173 in H5Dread(): can't read data
major: Dataset
minor: Read failed
#1: ../../../src/H5Dio.c line 420 in H5D__read(): unable to set up type info
major: Dataset
minor: Unable to initialize object
#2: ../../../src/H5Dio.c line 952 in H5D__typeinfo_init(): unable to convert between src and dest datatype
major: Dataset
minor: Feature is unsupported
#3: ../../../src/H5T.c line 4535 in H5T_path_find(): no appropriate function for conversion path
major: Datatype
minor: Unable to initialize object
error: error when reading dataset

I've installed hdf5oct 0.4.0 in octave 4.0.0 on linux. The file is available from here:
https://portal.nersc.gov/project/crcns/download/nwb-1/hc-3/ec013.15.zip

The file can be loaded into matlab, and h5dump works also. Therefore, I'd assume it's a problem with hdf5oct.

compilation error

running 'make' produces an error:

sphere@WP2:~/gait_cnn/datasets/scripts/scripts/hdf5oct/hdf5oct$ make
CXX=h5c++ mkoctfile -g -c h5read.cc
In file included from h5read.cc:54:0:
h5read.h:72:22: error: ISO C++ forbids initialisation of member ‘h5_dims’ [-fpermissive]
h5read.h:72:22: error: making ‘h5_dims’ static [-fpermissive]
h5read.h:72:22: error: invalid in-class initialisation of static data member of non-integral type ‘hsize_t* {aka long long unsigned int_}’
h5read.h:73:25: error: ISO C++ forbids initialisation of member ‘h5_maxdims’ [-fpermissive]
h5read.h:73:25: error: making ‘h5_maxdims’ static [-fpermissive]
h5read.h:73:25: error: invalid in-class initialisation of static data member of non-integral type ‘hsize_t_ {aka long long unsigned int_}’
h5read.cc: In constructor ‘H5File::H5File(const char_, bool)’:
h5read.cc:516:40: error: invalid conversion from ‘herr_t ()(void*) {aka int ()(void_)}’ to ‘void__’ [-fpermissive]
h5read.cc:516:40: error: too many arguments to function ‘herr_t H5Eget_auto1(herr_t (__)(void_), void*)’
/usr/include/H5Epublic.h:212:15: note: declared here
h5read.cc:518:31: error: too many arguments to function ‘herr_t H5Eset_auto1(H5E_auto1_t, void
)’
/usr/include/H5Epublic.h:216:15: note: declared here
h5read.cc:538:38: error: invalid conversion from ‘H5E_auto1_t {aka int ()(void)}’ to ‘void_’ [-fpermissive]
h5read.cc:538:38: error: too many arguments to function ‘herr_t H5Eset_auto1(H5E_auto1_t, void_)’
/usr/include/H5Epublic.h:216:15: note: declared here
h5read.cc: In destructor ‘H5File::~H5File()’:
h5read.cc:568:7: error: ‘h5_dims’ was not declared in this scope
h5read.cc:573:7: error: ‘h5_maxdims’ was not declared in this scope
h5read.cc: In member function ‘int H5File::open_dset(const char_)’:
h5read.cc:604:49: error: too many arguments to function ‘hid_t H5Dopen1(hid_t, const char_)’
/usr/include/H5Dpublic.h:145:14: note: declared here
h5read.cc:625:3: error: ‘h5_dims’ was not declared in this scope
h5read.cc:626:3: error: ‘h5_maxdims’ was not declared in this scope
h5read.cc: In member function ‘octave_value H5File::read_dset_complete(const char_)’:
h5read.cc:653:19: error: ‘h5_dims’ was not declared in this scope
h5read.cc: In member function ‘octave_value H5File::read_dset_hyperslab(const char_, const Matrix&, const Matrix&, const Matrix&, const Matrix&, int)’:
h5read.cc:727:24: error: ‘h5_dims’ was not declared in this scope
h5read.cc:731:11: error: ‘h5_dims’ was not declared in this scope
h5read.cc: In member function ‘void H5File::write_dset(const char_, octave_value)’:
h5read.cc:915:113: error: too many arguments to function ‘hid_t H5Gcreate1(hid_t, const char_, size_t)’
/usr/include/H5Gpublic.h:147:14: note: declared here
h5read.cc:947:7: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:955:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:961:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:967:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:973:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:979:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:985:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:991:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:997:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:1003:11: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:1011:7: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc:1017:7: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
h5read.cc: In member function ‘void H5File::write_dset_hyperslab(const char_, octave_value, const Matrix&, const Matrix&, const Matrix&, const Matrix&, int)’:
h5read.cc:1089:11: error: ‘h5_maxdims’ was not declared in this scope
h5read.cc:1100:11: error: ‘h5_dims’ was not declared in this scope
h5read.cc:1111:31: error: ‘h5_dims’ was not declared in this scope
h5read.cc: In member function ‘octave_value H5File::read_att(const char_, const char_)’:
h5read.cc:1169:40: error: ‘hdf5_check_attr’ was not declared in this scope
h5read.cc: In member function ‘void H5File::write_att(const char_, const char_, const octave_value&)’:
h5read.cc:1375:62: error: too many arguments to function ‘hid_t H5Acreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Apublic.h:105:16: note: declared here
h5read.cc: In member function ‘void H5File::create_dset(const char_, const Matrix&, const char_, const Matrix&)’:
h5read.cc:1449:58: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char_, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
make: *_* [h5read.o] Error 1

License for integration into Octave core

Hello,

I was wondering if you would allow me to add hdf5oct to the GNU octave core under GPLv3. I found that you originally chose the LGPLv3 so I am guessing you might not be opposed to the GPL. Of course, you will still be free to keep it on your website or github under another license, it will always be yours to create as many copies under as many different licenses as you want.

If you agree, my fork will be added to GNU octave, under GPLv3+ and
with you, me and the other contributors as its copyright owner.

best regards

Stefan

edit: I just realize that asking you for permission might eventually be obsolete, according to this table:
http://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
But anyway, I hope it's welcome and you don't mind that we integrate it.

install error

whether using
$ make install
or
>> pkg install hdf5oct-0.4.0.tar.gz
on Octave 3.8.1 or Octave 4.0, I get the error

$HOME/octave/hdf5oct-0.2.0/h5read.oct: undefined symbol: H5P_CLS_DATASET_CREATE_ID_g
error: called from 'doc_cache_create>create_cache' in file /usr/share/octave/4.0.0/m/help/doc_cache_create.m near line 106, column 18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.