Hi Christophe,<div><br></div><div>Thank you for your prompt answer!</div><div>I just downloaded the Automated Nightly Build Linux from the site (<a href="http://www.geuz.org/gmsh/bin/Linux/gmsh-nightly-Linux.tgz">http://www.geuz.org/gmsh/bin/Linux/gmsh-nightly-Linux.tgz</a>)  and I still reproduce the problem,</div>

<div><br></div><div>attached you can find a screen capture showing the gmsh nightly build version and the error message in the console when opening the med file,</div><div><br></div><div>Thank you,</div><div><br></div><div>

Luca</div><div><br><div class="gmail_quote">2012/5/21 Christophe Geuzaine <span dir="ltr"><<a href="mailto:cgeuzaine@ulg.ac.be" target="_blank">cgeuzaine@ulg.ac.be</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Hi Luca - Can you try again with the latest SVN?<br>
Thanks,<br>
Christophe<br>
<div><div class="h5"><br>
On 21 May 2012, at 16:31, Luca Dall'Olio wrote:<br>
<br>
> Dear Gmsh Team.<br>
><br>
> Here is as an attached file a small med 3.0.4 file that cannot be opened in Gmsh 2.5.1-svn. FYI, it can be opened in Salome.<br>
> The file was created from an initial med file that Gmsh can read by applying some algebraic operations on the fields it contains using MEDLoader (a package in charge of loading from a file or write to a file in MED format a med data structure).<br>


><br>
><br>
><br>
> dimrestriction =0<br>
> mesh=MEDLoader.ReadUMeshFromFile(medfilename,meshname,dimrestriction)<br>
> p1 = MEDLoader.ReadField(ON_NODES,medfilename,meshname,dimrestriction,fieldname,iteration1,order1)<br>
><br>
><br>
> p2 = MEDLoader.ReadField(ON_NODES,medfilename,meshname,dimrestriction,fieldname,iteration2,order2)<br>
> p1.setMesh(mesh)<br>
> p2.setMesh(mesh)<br>
> result=p2-p1<br>
> result.setName(fieldnameresu)<br>
><br>
><br>
> MEDLoader.WriteField(outfile,result,True)<br>
><br>
> The error raised by Gmsh is "Could not read MED families", that can be found twice in Gmsh's sources :<br>
><br>
><br>
><br>
> Geo/GModelIO_MED.cpp:359:      Msg::Error("Could not read MED families");<br>
> Geo/GModelIO_MED.cpp:387:    Msg::Error("Could not read MED families");<br>
><br>
><br>
><br>
> #if (MED_MAJOR_NUM == 3)<br>
>     if(MEDmeshEntityFamilyNumberRd(fid, meshName, MED_NO_DT, MED_NO_IT, MED_CELL,<br>
>                                    type, &fam[0]) < 0){<br>
> #else<br>
><br>
><br>
>     if(MEDfamLire(fid, meshName, &fam[0], numEle, MED_MAILLE, type) < 0){<br>
> #endif<br>
>       Msg::Error("Could not read MED families");<br>
>       return 0;<br>
>     }<br>
><br>
><br>
><br>
> And then :<br>
><br>
>   // read family info<br>
>   med_int numFamilies = MEDnFam(fid, meshName);<br>
>   if(numFamilies < 0){<br>
>     Msg::Error("Could not read MED families");<br>
><br>
><br>
>     return 0;<br>
>   }<br>
><br>
> Thank you very much in advance for any help/advice,<br>
><br>
> Best Regards,<br>
><br>
> Luca<br>
><br>
</div></div>> <out.med>_______________________________________________<br>
> gmsh mailing list<br>
> <a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br>
> <a href="http://www.geuz.org/mailman/listinfo/gmsh" target="_blank">http://www.geuz.org/mailman/listinfo/gmsh</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Prof. Christophe Geuzaine<br>
University of Liege, Electrical Engineering and Computer Science<br>
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><br>ALNEOS<br><br>Luca DALL'OLIO, Project Manager<br> <br>196, rue Houdan      92330 SCEAUX - France<br>Tél.  : +33 (0)1 83 64 39 53<br>GSM   : +33 (0) 6 01 76 50 97<br>

Fax.  : +33 (0)1 41 13 85 07<br>Email : <a href="mailto:luca.dallolio@alneos.fr" target="_blank">luca.dallolio@alneos.fr</a><br>URL : <a href="http://www.alneos.fr" target="_blank">www.alneos.fr</a><br><br><pre>"This e-mail is confidential and may contain legally privileged information.<br>

If you are not the intended recipient, you should not copy, distribute, disclose or use the information it contains.<br>Please e-mail the sender immediately and delete this message from your system.<br>E-mails are susceptible to corruption, interception and unauthorised amendment; we do not accept liability for any such changes, or for their consequences.<br>

You should be aware, that the company  may monitor your emails and their content."<br><br></pre><br><br>
</div>