octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8607] New module h5read to read/write HDF


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #8607] New module h5read to read/write HDF5 files
Date: Mon, 5 Dec 2016 19:40:48 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40

Follow-up Comment #18, patch #8607 (project octave):

I've updated the patch so that it applies cleanly to 4.3.0+ bu the build
breaks at h5read:

:
  CXX      libinterp/dldfcn/libinterp_dldfcn_h5read_la-h5read.lo
In file included from ./config.h:3541:0,
                 from ../dev_VE/libinterp/dldfcn/h5read.h:25,
                 from ../dev_VE/libinterp/dldfcn/h5read.cc:43:
./oct-conf-post.h:58:1: error: redefinition of 'template<class T> void
octave_unused_parameter(const T&)'
 octave_unused_parameter (const T&)
 ^
In file included from ./config.h:3541:0,
                 from ../dev_VE/libinterp/dldfcn/h5read.cc:25:
./oct-conf-post.h:58:1: note: 'template<class T> void
octave_unused_parameter(const T&)' previously declared here
 octave_unused_parameter (const T&)
 ^
../dev_VE/libinterp/dldfcn/h5read.cc: In function 'bool any_int_leq_zero(const
Matrix&)':
../dev_VE/libinterp/dldfcn/h5read.cc:50:35: warning: 'octave_idx_type
Array<T>::length() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:354): use 'numel'
instead [-Wdeprecated-declarations]
   for (int i = 0; i < mat.length (); i++)
                                   ^
../dev_VE/libinterp/dldfcn/h5read.cc: In function 'int check_vec(const
octave_value&, Matrix&, const char*, bool)':
../dev_VE/libinterp/dldfcn/h5read.cc:77:38: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
       for (int i = 0; i < mat.nelem (); i++)
                                      ^
In file included from ../dev_VE/libinterp/corefcn/defun-dld.h:32:0,
                 from ../dev_VE/libinterp/corefcn/oct.h:32,
                 from ../dev_VE/libinterp/dldfcn/h5read.cc:28:
../dev_VE/libinterp/dldfcn/h5read.cc: At global scope:
../dev_VE/libinterp/dldfcn/h5read.cc:200:29: warning: unused parameter
'nargout' [-Wunused-parameter]
 DEFUN_DLD (h5readatt, args, nargout,
                             ^
../dev_VE/libinterp/corefcn/defun-int.h:92:49: note: in definition of macro
'DECLARE_FUNX'
   name (const octave_value_list& args_name, int nargout_name)
                                                 ^
../dev_VE/libinterp/corefcn/defun-dld.h:48:3: note: in expansion of macro
'DECLARE_FUN'
   DECLARE_FUN (name, args_name, nargout_name)
   ^
../dev_VE/libinterp/dldfcn/h5read.cc:200:1: note: in expansion of macro
'DEFUN_DLD'
 DEFUN_DLD (h5readatt, args, nargout,
 ^
../dev_VE/libinterp/dldfcn/h5read.cc: In constructor 'H5File::H5File(const
char*, bool)':
../dev_VE/libinterp/dldfcn/h5read.cc:509:25: warning: 'file_stat' is
deprecated (declared at ../dev_VE/liboctave/system/file-stat.h:332): use
'octave::sys::file_stat' instead [-Wdeprecated-declarations]
   file_stat fs (filename);
                         ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'hsize_t*
H5File::alloc_hsize(const T&, int, bool)':
../dev_VE/libinterp/dldfcn/h5read.cc:575:61: warning: use of old-style cast
[-Wold-style-cast]
   hsize_t *hsize = (hsize_t*)malloc (rank * sizeof (hsize_t));
                                                             ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'int
H5File::open_dset(const char*)':
../dev_VE/libinterp/dldfcn/h5read.cc:614:53: warning: use of old-style cast
[-Wold-style-cast]
   h5_dims = (hsize_t*)malloc (rank * sizeof(hsize_t));
                                                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:615:56: warning: use of old-style cast
[-Wold-style-cast]
   h5_maxdims = (hsize_t*)malloc (rank * sizeof(hsize_t));
                                                        ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'octave_value
H5File::read_dset_hyperslab(const char*, const Matrix&, const Matrix&, const
Matrix&, const Matrix&, int)':
../dev_VE/libinterp/dldfcn/h5read.cc:670:20: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (start.nelem () != rank)
                    ^
../dev_VE/libinterp/dldfcn/h5read.cc:675:20: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (count.nelem () != rank)
                    ^
../dev_VE/libinterp/dldfcn/h5read.cc:684:22: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (_stride.nelem () != rank)
                      ^
../dev_VE/libinterp/dldfcn/h5read.cc:692:21: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (_block.nelem () != rank)
                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:709:37: warning: use of old-style cast
[-Wold-style-cast]
                  i+1, (int)_stride(i), (int)_block(i));
                                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:709:53: warning: use of old-style cast
[-Wold-style-cast]
                  i+1, (int)_stride(i), (int)_block(i));
                                                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:720:29: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
       if (h5_dims[rank-i-1] < end)
                             ^
../dev_VE/libinterp/dldfcn/h5read.cc:723:85: warning: use of old-style cast
[-Wold-style-cast]
                  " are required for requested hyperslab", i+1,
(int)h5_dims[rank-i-1],
                                                                              
      ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'octave_value
H5File::read_dset()':
../dev_VE/libinterp/dldfcn/h5read.cc:753:8: warning: unused variable
'is_cmplx' [-Wunused-variable]
   bool is_cmplx = false;
        ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'void
H5File::write_dset(const char*, octave_value)':
../dev_VE/libinterp/dldfcn/h5read.cc:898:19: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
   for (int i=1; i < path.length (); i++)
                   ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'void
H5File::write_dset_hyperslab(const char*, octave_value, const Matrix&, const
Matrix&, const Matrix&, const Matrix&, int)':
../dev_VE/libinterp/dldfcn/h5read.cc:1037:20: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (start.nelem () != rank)
                    ^
../dev_VE/libinterp/dldfcn/h5read.cc:1042:20: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (count.nelem () != rank)
                    ^
../dev_VE/libinterp/dldfcn/h5read.cc:1050:22: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (_stride.nelem () != rank)
                      ^
../dev_VE/libinterp/dldfcn/h5read.cc:1058:21: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   if (_block.nelem () != rank)
                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:1071:37: warning: use of old-style cast
[-Wold-style-cast]
                  i+1, (int)_stride(i), (int)_block(i));
                                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:1071:53: warning: use of old-style cast
[-Wold-style-cast]
                  i+1, (int)_stride(i), (int)_block(i));
                                                     ^
../dev_VE/libinterp/dldfcn/h5read.cc:1078:32: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
       if (h5_maxdims[rank-i-1] < end)
                                ^
../dev_VE/libinterp/dldfcn/h5read.cc:1082:57: warning: use of old-style cast
[-Wold-style-cast]
                  i+1, dsetname, (int)h5_maxdims[rank-i-1], end);
                                                         ^
../dev_VE/libinterp/dldfcn/h5read.cc:1089:29: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
       if (h5_dims[rank-i-1] < end)
                             ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'octave_value
H5File::read_att(const char*, const char*)':
../dev_VE/libinterp/dldfcn/h5read.cc:1188:56: warning: use of old-style cast
[-Wold-style-cast]
       char* buf = (char*)calloc (totsize, sizeof (char));
                                                        ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'void
H5File::write_att(const char*, const char*, const octave_value&)':
../dev_VE/libinterp/dldfcn/h5read.cc:1330:54: warning: use of old-style cast
[-Wold-style-cast]
       buf = (void *) attvalue.string_value ().c_str ();
                                                      ^
../dev_VE/libinterp/dldfcn/h5read.cc:1330:54: warning: cast from type 'const
char*' to type 'void*' casts away qualifiers [-Wcast-qual]
../dev_VE/libinterp/dldfcn/h5read.cc:1338:23: warning: use of old-style cast
[-Wold-style-cast]
       buf = (void *) &attval_int;
                       ^
../dev_VE/libinterp/dldfcn/h5read.cc:1345:23: warning: use of old-style cast
[-Wold-style-cast]
       buf = (void *) &attval_double;
                       ^
../dev_VE/libinterp/dldfcn/h5read.cc:1272:12: warning: unused variable 'dims'
[-Wunused-variable]
   hsize_t *dims;
            ^
../dev_VE/libinterp/dldfcn/h5read.cc: In member function 'void
H5File::create_dset(const char*, const Matrix&, const char*, const Matrix&)':
../dev_VE/libinterp/dldfcn/h5read.cc:1409:45: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
   dspace_id = H5Screate_simple (size.nelem (), dims, maxdims);
                                             ^
../dev_VE/libinterp/dldfcn/h5read.cc:1429:47: warning: 'octave_idx_type
Array<T>::nelem() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:360): use 'numel'
instead [-Wdeprecated-declarations]
       if (H5Pset_chunk (crp_list, size.nelem (), dims_chunk) < 0)
                                               ^
../dev_VE/libinterp/dldfcn/h5read.cc: In instantiation of 'hsize_t*
H5File::alloc_hsize(const T&, int, bool) [with T = Matrix; hsize_t = long long
unsigned int]':
../dev_VE/libinterp/dldfcn/h5read.cc:729:66:   required from here
../dev_VE/libinterp/dldfcn/h5read.cc:574:26: warning: 'octave_idx_type
Array<T>::length() const [with T = double; octave_idx_type = int]' is
deprecated (declared at ../dev_VE/liboctave/array/Array.h:354): use 'numel'
instead [-Wdeprecated-declarations]
   int rank = dim.length ();
                          ^
Makefile:18461: recipe for target
'libinterp/dldfcn/libinterp_dldfcn_h5read_la-h5read.lo' failed
make[2]: *** [libinterp/dldfcn/libinterp_dldfcn_h5read_la-h5read.lo] Error 1


Updated patch attached

(file #39154)
    _______________________________________________________

Additional Item Attachment:

File name: patch_8607_h5read_20161205.patch Size:49 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8607>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]