mathgl/mathgl-io.patch

34 lines
1.3 KiB
Diff
Raw Normal View History

2009-09-14 10:51:23 +00:00
--- mgl/mgl_data_io.cpp 2009-07-02 01:49:42.000000000 +1000
+++ mgl/mgl_data_io.cpp.new 2009-07-25 12:16:55.000000000 +1000
@@ -918,7 +918,7 @@
hid_t hf,hd,hs;
hsize_t dims[3];
long rank = 3, res;
- H5Eset_auto(0,0);
+ H5Eset_auto2(0,0,0);
res=H5Fis_hdf5(fname);
if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT);
else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -928,10 +928,10 @@
else { rank = 3; dims[0] = nz; dims[1] = ny; dims[2] = nx; }
hs = H5Screate_simple(rank, dims, 0);
#if(MGL_USE_DOUBLE==1)
- hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT);
+ hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT,H5P_DEFAULT);
H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a);
#else
- hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT);
+ hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a);
#endif
H5Dclose(hd); H5Sclose(hs); H5Fclose(hf);
@@ -943,7 +943,7 @@
hsize_t dims[3];
long rank;
hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
- hd = H5Dopen(hf,data);
+ hd = H5Dopen(hf,data,H5P_DEFAULT);
hs = H5Dget_space(hd);
rank = H5Sget_simple_extent_ndims(hs);
if(rank>0 && rank<=3)