Control: tags -1 + patch

On 2017-02-14 14:37, Gilles Filippini wrote:
Source: med-fichier
Version: 3.0.6-11
Severity: grave
Justification: renders package unusable

Hi,

From the Salome Platform support forum [1]:

Problems with Salome and Code Saturne in Debian
Posted by Elektrix at January 03. 2017

Hello all,

I'm trying to set up a CFD case with Salome, export the mesh in a MED file and then process it with Code Saturne. CS doesn't read the MED file and gives the error in the preprocessing stage:

_MEDdatasetRd.c [139] : Erreur à la lecture du dataset
_MEDdatasetRd.c [139] : COO
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 0:
  #000: ../../../src/H5Dio.c line 170 in H5Dread(): can't read data
    major: Dataset
    minor: Read failed
#001: ../../../src/H5Dio.c line 418 in H5D__read(): unable to set up type info
    major: Dataset
    minor: Unable to initialize object
#002: ../../../src/H5Dio.c line 953 in H5D__typeinfo_init(): not a datatype
    major: Invalid arguments to routine
    minor: Inappropriate type
_MEDdatasetRd.c [142] : _dataset = 2
_MEDdatasetRd.c [143] : _i = 0
_MEDdatasetRd.c [144] : (*filter).memspace[_i] = 2
_MEDdatasetRd.c [145] : (*filter).diskspace[_i] = 3
_MEDmeshAdvancedRd30.c [462] : Erreur à la lecture du dataset
_MEDmeshAdvancedRd30.c [462] :
_MEDmeshAdvancedRd30.c [463] : meshname = "Mesh_water"
_MEDmeshAdvancedRd30.c [463] : numit = -1
_MEDmeshAdvancedRd30.c [463] : numdt = -1
_MEDmeshAdvancedRd30.c [463] : _datagroupname2 = "NOE"
_MEDmeshAdvancedRd30.c [464] : _datagroupname3 = ""
_MEDmeshAdvancedRd30.c [464] : _profilename = "MED_NO_PROFILE_INTERNAL"

The problem can be because I installed Salome from the SALOME-7.6.0-DB07.tgz archive whilst Code Saturne is a Debian package and is installed via the Debian package system which is much easier than installing the original package. So the med and hdf5 libraries of CS come from the Debian repositories. I can't use newer versions of Salome (7.7.1 or 7.8.0) as they produce MED3.1 files but my CS reads only MED3.0 files.

The details of my machine:

Debian stretch (testing) on AMD64

Salome 7.6.0 from SALOME-7.6.0-DB07.tgz

Code Saturne 4.3 Debian package

libmed 3.0.6-10.1 Debian package

hdf5 1.10.0 Debian package

Not knowing if this problem comes from how I create the mesh I tried to run one of the test cases from the Code Saturne tutorials but ran into other problems.

If you need any other information pleas let me know. Any hint on how to go further is very welcome.

Best regards

Elektrix

....

Re: Problems with Salome and Code Saturne in Debian
Posted by Yvan Fournier at Monday 16:21

Hello,

I was contacted by the Debian maintainer relative to this, so it seems the bug was reported.

The root problem is that the MED library is not compatible with HDF5 1.10 yet. So reverting to HDF5 1.8 as indicated is the solution for now, but the better solution would be for MED to handle compatibility with both HDF5 1.8 and HDF5 1.10 (or at least 1.10 for future versions).

Best regards,

Yvan

[1] http://www.salome-platform.org/forum/forum_9/122041955

Patch proposal attached.
Thanks,

_g
diff -Nru med-fichier-3.0.6/debian/changelog med-fichier-3.0.6/debian/changelog
--- med-fichier-3.0.6/debian/changelog	2016-10-30 18:06:27.000000000 +0100
+++ med-fichier-3.0.6/debian/changelog	2017-02-13 18:02:35.000000000 +0100
@@ -1,3 +1,11 @@
+med-fichier (3.0.6-10.2) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * New patch type_hdf_should_be_hid_t.patch fixing HDF5 1.10 support
+    for the C API (closes: #855130)
+
+ -- Gilles Filippini <p...@debian.org>  Mon, 13 Feb 2017 18:02:35 +0100
+
 med-fichier (3.0.6-10.1) unstable; urgency=medium
 
   * Non-maintainer upload
diff -Nru med-fichier-3.0.6/debian/patches/series med-fichier-3.0.6/debian/patches/series
--- med-fichier-3.0.6/debian/patches/series	2016-10-20 21:58:54.000000000 +0200
+++ med-fichier-3.0.6/debian/patches/series	2017-02-13 18:02:35.000000000 +0100
@@ -2,3 +2,4 @@
 hdf5_link.patch
 clang-ftbfs.diff
 fix-fid-type-in-medequivinfo.patch
+type_hdf_should_be_hid_t.patch
diff -Nru med-fichier-3.0.6/debian/patches/type_hdf_should_be_hid_t.patch med-fichier-3.0.6/debian/patches/type_hdf_should_be_hid_t.patch
--- med-fichier-3.0.6/debian/patches/type_hdf_should_be_hid_t.patch	1970-01-01 01:00:00.000000000 +0100
+++ med-fichier-3.0.6/debian/patches/type_hdf_should_be_hid_t.patch	2017-02-13 18:02:35.000000000 +0100
@@ -0,0 +1,152 @@
+Index: med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumLire232.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/2.3.6/hdfi/MEDdatasetNumLire232.c
++++ med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumLire232.c
+@@ -71,8 +70,8 @@ void  _MEDdatasetNumLire232(int dummy,..
+   med_size   start_mem[1],start_data[1],*pflmem=0,*pfldsk=0;
+   med_size   stride[1],count[1],pcount[1],size[1],pflsize[1];
+   med_err    ret;
+-  int        i,j,index,type_hdf;
+-  hid_t      datatype;
++  int        i,j,index;
++  hid_t      datatype,type_hdf;
+   size_t     typesize;
+   int        dim, firstdim, dimutil, lastdim;
+   med_size   sizencmp[1];
+Index: med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumEcrire231.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/2.3.6/hdfi/MEDdatasetNumEcrire231.c
++++ med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumEcrire231.c
+@@ -62,8 +62,9 @@ void  _MEDdatasetNumEcrire231(int dummy,
+   med_size   start_mem[1],start_data[1],*pflmem,*pfldsk;
+   med_size   stride[1],count[1],pcount[1],pflsize[1];
+   med_err    ret;
+-  int        i,j,index,type_hdf;
++  int        i,j,index;
+   int        dim, firstdim, dimutil, lastdim ;
++  hid_t      type_hdf;
+   med_mode_acces MED_MODE_ACCES;
+ 
+   va_start(params,dummy);
+Index: med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumEcrire232.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/2.3.6/hdfi/MEDdatasetNumEcrire232.c
++++ med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumEcrire232.c
+@@ -72,9 +72,10 @@ void  _MEDdatasetNumEcrire232(int dummy,
+   med_size   stride[1],count[1],pcount[1],pflsize[1];
+   med_size   datasetsize[1], countncmp=0;
+   med_err    ret=-1;
+-  int        i=0,j=0,index=0,type_hdf=0;
++  int        i=0,j=0,index=0;
+   int        dim=0, firstdim=0, dimutil=0, lastdim=0 ;
+   int        datasetsizeEqualTosizespace = 0;
++  hid_t      type_hdf=0;
+   med_mode_acces MED_MODE_ACCES;
+ 
+   va_start(params,dummy);
+Index: med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumLire231.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/2.3.6/hdfi/MEDdatasetNumLire231.c
++++ med-fichier-3.0.6/src/2.3.6/hdfi/MEDdatasetNumLire231.c
+@@ -60,8 +60,8 @@ void  _MEDdatasetNumLire231(int dummy,..
+   med_size   start_mem[1],start_data[1],*pflmem=0,*pfldsk=0;
+   med_size   stride[1],count[1],pcount[1],size[1],pflsize[1];
+   med_err    ret;
+-  int        i,j,index,type_hdf;
+-  hid_t      datatype;
++  int        i,j,index;
++  hid_t      datatype,type_hdf;
+   size_t     typesize;
+   int        dim, firstdim, dimutil, lastdim;
+ 
+Index: med-fichier-3.0.6/src/2.3.6/hdfi/MEDattrNumEcrire.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/2.3.6/hdfi/MEDattrNumEcrire.c
++++ med-fichier-3.0.6/src/2.3.6/hdfi/MEDattrNumEcrire.c
+@@ -36,7 +36,7 @@ med_err _MEDattrNumEcrire(med_idt pere,m
+ {
+   med_idt aid,attr;
+   med_err ret;
+-  int type_hdf;
++  hid_t type_hdf;
+   med_mode_acces MED_MODE_ACCES;
+ 
+   if ( (MED_MODE_ACCES = _MEDmodeAcces(pere) ) == MED_UNDEF_MODE_ACCES ) {
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeNumRdByName.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeNumRdByName.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeNumRdByName.c
+@@ -27,7 +27,7 @@ med_err _MEDattributeNumRdByName(med_idt
+ {
+   med_idt _attid=0;
+   med_err _ret=-1;
+-  int type_hdf;
++  hid_t type_hdf;
+ 
+   switch(type)
+     {
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeNumWr.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeNumWr.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeNumWr.c
+@@ -32,7 +32,7 @@ med_err _MEDattributeNumWr(med_idt pid,
+ {
+   med_idt _attid=0,aid=0;
+   med_err _ret=-1;
+-  int     type_hdf;
++  hid_t   type_hdf;
+   med_access_mode MED_ACCESS_MODE;
+   H5O_info_t      _oinfo;
+ 
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeNumWrByName.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeNumWrByName.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeNumWrByName.c
+@@ -32,7 +32,7 @@ med_err _MEDattributeNumWrByName(med_idt
+ {
+   med_idt _attid=0,aid=0;
+   med_err _ret=-1;
+-  int     type_hdf;
++  hid_t    type_hdf;
+   med_access_mode MED_ACCESS_MODE;
+   H5O_info_t      _oinfo;
+ 
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeStringRdByName.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeStringRdByName.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeStringRdByName.c
+@@ -29,7 +29,7 @@ med_err _MEDattributeStringRdByName(med_
+ {
+   med_err _ret=-1;
+   med_idt _attid=0;
+-  int     type_hdf=0;
++  hid_t   type_hdf=0;
+ 
+   if ( (type_hdf = H5Tcopy(H5T_C_S1)) < 0) {
+     MED_ERR_(_ret,MED_ERR_CREATE,MED_ERR_HDFTYPE, MED_ERR_NAME_MSG );
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeStringWr.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeStringWr.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeStringWr.c
+@@ -30,7 +30,7 @@ med_err _MEDattributeStringWr(med_idt pi
+   med_access_mode MED_ACCESS_MODE;
+   med_idt _attid=0,aid=0;
+   med_err _ret=-1;
+-  int     type_hdf=0;
++  hid_t   type_hdf=0;
+   med_bool        _attmustbecreated= MED_FALSE;
+   hsize_t         _attsize=0;
+   med_size        _valsize=0;
+Index: med-fichier-3.0.6/src/hdfi/_MEDattributeStringWrByName.c
+===================================================================
+--- med-fichier-3.0.6.orig/src/hdfi/_MEDattributeStringWrByName.c
++++ med-fichier-3.0.6/src/hdfi/_MEDattributeStringWrByName.c
+@@ -31,7 +31,7 @@ med_err _MEDattributeStringWrByName(med_
+   med_access_mode MED_ACCESS_MODE;
+   med_idt _attid=0,aid=0;
+   med_err _ret=-1;
+-  int     type_hdf=0;
++  hid_t   type_hdf=0;
+   med_bool        _attmustbecreated= MED_FALSE;
+   hsize_t         _attsize=0;
+   med_size        _valsize=0;
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to