Bug#916971: gmsh: FTBFS against med-fichier 4.0.0

Gilles Filippini pini at debian.org
Thu Dec 20 21:16:44 GMT 2018


Source: gmsh
Version: 3.0.6+dfsg1-4
Severity: serious
Tags: patch ftbfs
Justification: FTBFS

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

Gmsh FTBFS against med-fichier 4.0.0 that I've recently uploaded to
unstable. Please find attached a patch proposal.

Thanks,

_g.

- -- System Information:
Debian Release: buster/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAlwcBrMACgkQ7+hsbH/+
z4Mh9gf/Y9btya0IKbOD37OO+s8X+QJvC1828//m/JajixmSJxDByWuI/36zos/K
EQhseaMvC6Qy1T+3Hum2XZewIda2C5sYhtNWjEz59aucPrOeL2cSJS7zEkI3PHlU
fnbiZh627OxR7hpjqKszVYdXIoDPTlWnY8+3weG/v1dAASP1p1raeR+dKRHYXGcd
UaBCmHkIyBI4qLDmCx6+OiHbjjsukOf5eiTmAWYqKJGTXSc8lQ2f5co+YxTVvmSp
7RWG+kH+JA60xuh0gUwmMLGf11cMjXgINh7GVUmUC+H4UTJX9ArWa3QSQlN10ZtT
UFwQJTGtO9jOQA3BESPq2IasJXqdmw==
=kqoX
-----END PGP SIGNATURE-----
-------------- next part --------------
diff -Nru gmsh-3.0.6+dfsg1/debian/changelog gmsh-3.0.6+dfsg1/debian/changelog
--- gmsh-3.0.6+dfsg1/debian/changelog	2018-12-03 01:47:52.000000000 +0100
+++ gmsh-3.0.6+dfsg1/debian/changelog	2018-12-20 21:24:21.000000000 +0100
@@ -1,3 +1,10 @@
+gmsh (3.0.6+dfsg1-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New patch support-med-4.patch to fix FTBFS against med-fichier 4.0.0
+
+ -- Gilles Filippini <pini at debian.org>  Thu, 20 Dec 2018 21:24:21 +0100
+
 gmsh (3.0.6+dfsg1-4) unstable; urgency=medium
 
   [ Joost van Zwieten ]
diff -Nru gmsh-3.0.6+dfsg1/debian/patches/series gmsh-3.0.6+dfsg1/debian/patches/series
--- gmsh-3.0.6+dfsg1/debian/patches/series	2018-12-03 01:19:49.000000000 +0100
+++ gmsh-3.0.6+dfsg1/debian/patches/series	2018-12-20 21:22:28.000000000 +0100
@@ -3,3 +3,4 @@
 30_delete_gl2ps_from_source.patch
 40_gnuinstalldirs.patch
 140_drop_css.patch
+support-med-4.patch
diff -Nru gmsh-3.0.6+dfsg1/debian/patches/support-med-4.patch gmsh-3.0.6+dfsg1/debian/patches/support-med-4.patch
--- gmsh-3.0.6+dfsg1/debian/patches/support-med-4.patch	1970-01-01 01:00:00.000000000 +0100
+++ gmsh-3.0.6+dfsg1/debian/patches/support-med-4.patch	2018-12-20 21:24:08.000000000 +0100
@@ -0,0 +1,386 @@
+Index: gmsh-3.0.6+dfsg1/Geo/GModelIO_MED.cpp
+===================================================================
+--- gmsh-3.0.6+dfsg1.orig/Geo/GModelIO_MED.cpp
++++ gmsh-3.0.6+dfsg1/Geo/GModelIO_MED.cpp
+@@ -29,7 +29,7 @@ extern "C" {
+ #include <med.h>
+ }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+ // To avoid too many ifdefs below we use defines for the bits of the
+ // API that did not change too much between MED2 and MED3. If we remove
+ // MED2 support at some point, please remove these defines and replace
+@@ -69,7 +69,7 @@ med_geometrie_element msh2medElementType
+   case MSH_HEX_20: return MED_HEXA20;
+   case MSH_PRI_15: return MED_PENTA15;
+   case MSH_PYR_13: return MED_PYRA13;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   case MSH_QUA_9: return MED_QUAD9;
+   case MSH_HEX_27: return MED_HEXA27;
+ #endif
+@@ -95,7 +95,7 @@ int med2mshElementType(med_geometrie_ele
+   case MED_HEXA20: return MSH_HEX_20;
+   case MED_PENTA15: return MSH_PRI_15;
+   case MED_PYRA13: return MSH_PYR_13;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   case MED_QUAD9: return MSH_QUA_9;
+   case MED_HEXA27: return MSH_HEX_27;
+ #endif
+@@ -113,7 +113,7 @@ int med2mshNodeIndex(med_geometrie_eleme
+   case MED_TRIA6:
+   case MED_QUAD4:
+   case MED_QUAD8:
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   case MED_QUAD9:
+ #endif
+     return k; // same node numbering as in Gmsh
+@@ -133,7 +133,7 @@ int med2mshNodeIndex(med_geometrie_eleme
+     static const int map[20] = {0,1,3,2,4,5,6,7,8,9,10,11,16,17,18,19,12,13,14,15};
+     return map[k];
+   }
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   case MED_HEXA27: {
+     static const int map[27] = {0,1,3,2,4,5,6,7,8,9,10,11,16,17,18,19,12,13,14,15,
+                                 20, 22, 21, 23, 24, 25, 26};
+@@ -185,7 +185,7 @@ int GModel::readMED(const std::string &n
+     char meshName[MED_TAILLE_NOM + 1], meshDesc[MED_TAILLE_DESC + 1];
+     med_int spaceDim;
+     med_maillage meshType;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     med_int meshDim, nStep;
+     char dtUnit[MED_SNAME_SIZE + 1];
+     char axisName[3 * MED_SNAME_SIZE + 1], axisUnit[3 * MED_SNAME_SIZE + 1];
+@@ -241,7 +241,7 @@ int GModel::readMED(const std::string &n
+   char meshName[MED_TAILLE_NOM + 1], meshDesc[MED_TAILLE_DESC + 1];
+   med_int spaceDim, nStep = 1;
+   med_maillage meshType;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_int meshDim;
+   char dtUnit[MED_SNAME_SIZE + 1];
+   char axisName[3 * MED_SNAME_SIZE + 1], axisUnit[3 * MED_SNAME_SIZE + 1];
+@@ -276,7 +276,7 @@ int GModel::readMED(const std::string &n
+   MEDversionLire(fid, &vf[0], &vf[1], &vf[2]);
+ 
+   // read nodes
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_bool changeOfCoord, geoTransform;
+   med_int numNodes = MEDmeshnEntity(fid, meshName, MED_NO_DT, MED_NO_IT, MED_NODE,
+                                     MED_NO_GEOTYPE, MED_COORDINATE, MED_NO_CMODE,
+@@ -295,7 +295,7 @@ int GModel::readMED(const std::string &n
+   }
+   std::vector<MVertex*> verts(numNodes);
+   std::vector<med_float> coord(spaceDim * numNodes);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDmeshNodeCoordinateRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
+                              &coord[0]) < 0){
+ #else
+@@ -310,7 +310,7 @@ int GModel::readMED(const std::string &n
+   }
+ 
+   std::vector<med_int> nodeTags(numNodes);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDmeshEntityNumberRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_NODE,
+                            MED_NO_GEOTYPE, &nodeTags[0]) < 0)
+ #else
+@@ -328,7 +328,7 @@ int GModel::readMED(const std::string &n
+   for(int mshType = 0; mshType < MSH_NUM_TYPE; mshType++){
+     med_geometrie_element type = msh2medElementType(mshType);
+     if(type == MED_NONE) continue;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     med_bool changeOfCoord;
+     med_bool geoTransform;
+     med_int numEle = MEDmeshnEntity(fid, meshName, MED_NO_DT, MED_NO_IT, MED_CELL,
+@@ -340,7 +340,7 @@ int GModel::readMED(const std::string &n
+     if(numEle <= 0) continue;
+     int numNodPerEle = type % 100;
+     std::vector<med_int> conn(numEle * numNodPerEle);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDmeshElementConnectivityRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_CELL,
+                                     type, MED_NODAL, MED_FULL_INTERLACE, &conn[0]) < 0){
+ #else
+@@ -351,7 +351,7 @@ int GModel::readMED(const std::string &n
+       return 0;
+     }
+     std::vector<med_int> fam(numEle, 0);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDmeshEntityFamilyNumberRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_CELL,
+                                    type, &fam[0]) < 0){
+ #else
+@@ -360,7 +360,7 @@ int GModel::readMED(const std::string &n
+       Msg::Info("No family number for elements: using 0 as default family number");
+     }
+     std::vector<med_int> eleTags(numEle);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDmeshEntityNumberRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_CELL,
+                              type, &eleTags[0]) < 0)
+ #else
+@@ -391,7 +391,7 @@ int GModel::readMED(const std::string &n
+     return 0;
+   }
+   for(int i = 0; i < numFamilies; i++){
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     med_int numAttrib = (vf[0] == 2) ? MEDnFamily23Attribute(fid, meshName, i + 1) : 0;
+     med_int numGroups = MEDnFamilyGroup(fid, meshName, i + 1);
+ #else
+@@ -408,7 +408,7 @@ int GModel::readMED(const std::string &n
+     std::vector<char> groupNames(MED_TAILLE_LNOM * numGroups + 1);
+     char familyName[MED_TAILLE_NOM + 1];
+     med_int familyNum;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(vf[0] == 2){ // MED2 file
+       if(MEDfamily23Info(fid, meshName, i + 1, familyName, &attribId[0],
+                          &attribVal[0], &attribDes[0], &familyNum,
+@@ -459,7 +459,7 @@ int GModel::readMED(const std::string &n
+   }
+ 
+   // check if we need to read some post-processing data later
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   bool postpro = (MEDnField(fid) > 0) ? true : false;
+ #else
+   bool postpro = (MEDnChamp(fid, 0) > 0) ? true : false;
+@@ -496,7 +496,7 @@ static void writeElementsMED(med_idt &fi
+                              std::vector<med_int> &fam, med_geometrie_element type)
+ {
+   if(fam.empty()) return;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDmeshElementWr(fid, meshName, MED_NO_DT, MED_NO_IT, 0., MED_CELL, type,
+                       MED_NODAL, MED_FULL_INTERLACE, (med_int)fam.size(),
+                       &conn[0], MED_FALSE, 0, MED_FALSE, 0, MED_TRUE, &fam[0]) < 0)
+@@ -526,7 +526,7 @@ int GModel::writeMED(const std::string &
+   char *meshName = (char*)strMeshName.c_str();
+ 
+   // Gmsh always writes 3D unstructured meshes
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   char dtUnit[MED_SNAME_SIZE + 1] = "";
+   char axisName[3 * MED_SNAME_SIZE + 1] = "";
+   char axisUnit[3 * MED_SNAME_SIZE + 1] = "";
+@@ -557,7 +557,7 @@ int GModel::writeMED(const std::string &
+   // write the families
+   {
+     // always create a "0" family, with no groups or attributes
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDfamilyCr(fid, meshName, "F_0", 0, 0, "") < 0)
+ #else
+     if(MEDfamCr(fid, meshName, (char*)"F_0", 0, 0, 0, 0, 0, 0, 0) < 0)
+@@ -586,7 +586,7 @@ int GModel::writeMED(const std::string &
+             groupName += tmp;
+           groupName.resize((j + 1) * MED_TAILLE_LNOM, ' ');
+         }
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+         if(MEDfamilyCr(fid, meshName, familyName.c_str(),
+                        (med_int)num, (med_int)entities[i]->physicals.size(),
+                        groupName.c_str()) < 0)
+@@ -619,7 +619,7 @@ int GModel::writeMED(const std::string &
+       Msg::Error("No nodes to write in MED mesh");
+       return 0;
+     }
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDmeshNodeWr(fid, meshName, MED_NO_DT, MED_NO_IT, 0., MED_FULL_INTERLACE,
+                      (med_int)fam.size(), &coord[0], MED_FALSE, "", MED_FALSE, 0,
+                      MED_TRUE, &fam[0]) < 0)
+Index: gmsh-3.0.6+dfsg1/Post/PViewDataGModelIO.cpp
+===================================================================
+--- gmsh-3.0.6+dfsg1.orig/Post/PViewDataGModelIO.cpp
++++ gmsh-3.0.6+dfsg1/Post/PViewDataGModelIO.cpp
+@@ -365,7 +365,7 @@ extern "C" {
+ #include <med.h>
+ }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+ // To avoid too many ifdefs below we use defines for the bits of the
+ // API that did not change too much between MED2 and MED3. If we
+ // remove MED2 support at some point, please remove these defines and
+@@ -394,7 +394,7 @@ std::vector<std::string> medGetFieldName
+ {
+   std::vector<std::string> fieldNames;
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_idt fid = MEDfileOpen(fileName.c_str(), MED_ACC_RDONLY);
+ #else
+   med_idt fid = MEDouvrir((char*)fileName.c_str(), MED_LECTURE);
+@@ -404,7 +404,7 @@ std::vector<std::string> medGetFieldName
+     return fieldNames;
+   }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_int numFields = MEDnField(fid);
+ #else
+   med_int numFields = MEDnChamp(fid, 0);
+@@ -424,7 +424,7 @@ std::vector<std::string> medGetFieldName
+     std::vector<char> compUnit(numComp * MED_TAILLE_PNOM + 1);
+     med_int numSteps = 0;
+     med_type_champ type;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     med_bool localMesh;
+     if(MEDfieldInfo(fid, index + 1, name, meshName, &localMesh, &type,
+                     &compName[0], &compUnit[0], dtUnit, &numSteps) < 0){
+@@ -438,7 +438,7 @@ std::vector<std::string> medGetFieldName
+     fieldNames.push_back(name);
+   }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDfileClose(fid) < 0){
+ #else
+   if(MEDfermer(fid) < 0){
+@@ -468,7 +468,7 @@ bool PViewDataGModel::readMED(const std:
+   std::vector<char> compUnit(numComp * MED_TAILLE_PNOM + 1);
+   med_int numSteps = 0;
+   med_type_champ type;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_bool localMesh;
+   if(MEDfieldInfo(fid, fileIndex + 1, name, meshName, &localMesh, &type,
+                   &compName[0], &compUnit[0], dtUnit, &numSteps) < 0){
+@@ -498,7 +498,7 @@ bool PViewDataGModel::readMED(const std:
+   // with which we implicitly index them in GModel::readMED)
+   const med_entite_maillage entType[] =
+     {MED_NOEUD, MED_MAILLE, MED_NOEUD_MAILLE};
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   const med_geometrie_element eleType[] =
+     {MED_NONE, MED_SEG2, MED_TRIA3, MED_QUAD4, MED_TETRA4, MED_HEXA8,
+      MED_PENTA6, MED_PYRA5, MED_SEG3, MED_TRIA6, MED_QUAD9, MED_TETRA10,
+@@ -518,7 +518,7 @@ bool PViewDataGModel::readMED(const std:
+   for(unsigned int i = 0; i < sizeof(entType) / sizeof(entType[0]); i++){
+     for(unsigned int j = 0; j < sizeof(eleType) / sizeof(eleType[0]); j++){
+       if((!i && !j) || j){
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+         med_int n = numSteps;
+ #else
+         med_int n = MEDnPasdetemps(fid, name, entType[i], eleType[j]);
+@@ -551,7 +551,7 @@ bool PViewDataGModel::readMED(const std:
+       med_geometrie_element ele = eleType[pairs[pair].second];
+       med_int numdt, numit, ngauss;
+       med_float dt;
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+       if(MEDfieldComputingStepInfo(fid, name, step + 1, &numdt, &numit, &dt) < 0){
+ #else
+       char dtunit[MED_TAILLE_PNOM + 1];
+@@ -584,7 +584,7 @@ bool PViewDataGModel::readMED(const std:
+       // get number of values in the field (numVal takes the number of
+       // Gauss points or the number of nodes per element into account,
+       // but not the number of components)
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+       med_int profileSize;
+       med_int numVal = MEDfieldnValueWithProfile(fid, name, numdt, numit, ent, ele,
+                                                  1, MED_COMPACT_STMODE, profileName,
+@@ -610,7 +610,7 @@ bool PViewDataGModel::readMED(const std:
+ 
+       // read field data
+       std::vector<double> val(numVal * numComp);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+       if(MEDfieldValueWithProfileRd(fid, name, numdt, numit, ent, ele, MED_COMPACT_STMODE,
+                                     profileName, MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
+                                     (unsigned char*)&val[0]) < 0){
+@@ -641,7 +641,7 @@ bool PViewDataGModel::readMED(const std:
+           std::vector<med_float> refcoo((ele % 100) * dim);
+           std::vector<med_float> gscoo(ngauss * dim);
+           std::vector<med_float> wg(ngauss);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+           if(MEDlocalizationRd(fid, locName, MED_FULL_INTERLACE, &refcoo[0],
+                                &gscoo[0], &wg[0]) < 0){
+ #else
+@@ -667,7 +667,7 @@ bool PViewDataGModel::readMED(const std:
+         if(n > 0){
+           Msg::Debug("MED has full profile");
+           profile.resize(n);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+           if(MEDprofileRd(fid, profileName, &profile[0]) < 0){
+ #else
+           if(MEDprofilLire(fid, &profile[0], profileName) < 0){
+@@ -686,7 +686,7 @@ bool PViewDataGModel::readMED(const std:
+ 
+       // get size of full array and tags (if any) of entities
+       bool nodal = (ent == MED_NOEUD);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+       med_bool changeOfCoord;
+       med_bool geoTransform;
+       med_int numEnt = MEDmeshnEntity(fid, meshName, MED_NO_DT, MED_NO_IT,
+@@ -702,7 +702,7 @@ bool PViewDataGModel::readMED(const std:
+                                   nodal ? (med_connectivite)0 : MED_NOD);
+ #endif
+       std::vector<med_int> tags(numEnt);
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+       if(MEDmeshEntityNumberRd(fid, meshName, MED_NO_DT, MED_NO_IT,
+                                nodal ? MED_NODE : MED_CELL,
+                                nodal ? MED_NO_GEOTYPE : ele, &tags[0]) < 0)
+@@ -723,7 +723,7 @@ bool PViewDataGModel::readMED(const std:
+         }
+         else{
+           for(int i = 1; i < pairs[pair].second; i++){
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+             med_int n = MEDmeshnEntity(fid, meshName, MED_NO_DT, MED_NO_IT,
+                                        MED_CELL, eleType[i], MED_CONNECTIVITY,
+                                        MED_NODAL, &changeOfCoord, &geoTransform);
+@@ -820,7 +820,7 @@ bool PViewDataGModel::writeMED(const std
+     return false;
+   }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDprofileWr(fid, profileName, (med_int)profile.size(), &profile[0]) < 0){
+ #else
+   if(MEDprofilEcr(fid, &profile[0], (med_int)profile.size(), profileName) < 0){
+@@ -830,7 +830,7 @@ bool PViewDataGModel::writeMED(const std
+   }
+ 
+   int numComp = _steps[0]->getNumComponents();
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   if(MEDfieldCr(fid, (char*)fieldName.c_str(), MED_FLOAT64, (med_int)numComp,
+                 "unknown", "unknown", "unknown", (char*)meshName.c_str()) < 0){
+ #else
+@@ -842,7 +842,7 @@ bool PViewDataGModel::writeMED(const std
+     return false;
+   }
+ 
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+   med_bool changeOfCoord, geoTransform;
+   med_int numNodes = MEDmeshnEntity(fid, (char*)meshName.c_str(),
+                                     MED_NO_DT, MED_NO_IT, MED_NODE,
+@@ -869,7 +869,7 @@ bool PViewDataGModel::writeMED(const std
+     for(unsigned int i = 0; i < profile.size(); i++)
+       for(int k = 0; k < numComp; k++)
+         val[i * numComp + k] = _steps[step]->getData(indices[i])[k];
+-#if (MED_MAJOR_NUM == 3)
++#if (MED_MAJOR_NUM >= 3)
+     if(MEDfieldValueWithProfileWr(fid, (char*)fieldName.c_str(), (med_int)(step + 1),
+                                   MED_NO_IT,
+                                   time, MED_NODE, MED_NO_GEOTYPE, MED_COMPACT_STMODE,


More information about the debian-science-maintainers mailing list