<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Dear Christophe,<br></div><div><br data-mce-bogus="1"></div><div>Thank you for your assistance.</div><div><br></div><div>I have downloaded the last snapshot of the SDK from <a href="http://gmsh.info/">http://gmsh.info/</a> (downloaded file : <a>http://gmsh.info/bin/Linux/gmsh-git-Linux64-sdk.tgz</a>), extracted the files from the archive and copy the folder gmsh-git-Linux64-sdk to the python3.6/site-package repository.</div><div>The segmentation fault no longer occurs when the demo script t1.py is running. Good news!<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Regarding the second mistake, I think I have gotten rid of it after an extra operation.<br>In the Ubuntu settings, I set the regional format to "English (United Kingdom)" ("Display numbers, dates and currency amounts in the usual format for: " in the package Language Support). </div><div>Previously, the choice was "Français". I thought I had already deleted this trace of French settings.</div><div><br></div><div>To conclude, I should use this snapshot of the SDK and then version 4.5 when it will be released, is that correct? </div><div><br data-mce-bogus="1"></div><div><br>Best regards,<br><br>Baptiste Durand</div><div><br></div><div data-marker="__SIG_PRE__"><div><span style="color: #333333;">---</span></div><div><span style="color: #333333;">Baptiste Durand</span><br><span style="color: #333333;">Doctorant – <a href="https://navier-lab.fr/" target="_blank">Laboratoire Navier</a></span><span style="color: #333333;"></span><br><span style="color: #333333;"><a href="mailto:baptiste.durand@enpc.fr" style="color: #333333;" target="_blank">baptiste.durand@enpc.fr</a> – <a href="tel:+33658880541" style="color: #333333;" target="_blank">01 64 15 37 21</a> (<a href="tel:+33658880541" style="color: #333333;" target="_blank">06 58 88 05 41</a>) – <a href="https://fr.linkedin.com/in/baptistedurand" style="color: #333333;" target="_blank">linkedin.com/in/baptistedurand </a></span><br></div></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>cgeuzaine@uliege.be<br><b>À: </b>"Baptiste DURAND" <baptiste.durand@enpc.fr><br><b>Cc: </b>gmsh@onelab.info<br><b>Envoyé: </b>Vendredi 25 Octobre 2019 13:33:46<br><b>Objet: </b>Re: [Gmsh] Gmsh Pyhon API + matplotlib cause unreadable msh files and Segmentation fault<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Can you try a recent snapshot of the SDK and let us know if it fixes the issue (which IIRC was due to statically linking the standard C++ lib)?<br><br><div dir="ltr">Thanks,</div><div dir="ltr"><br></div><div dir="ltr">Christophe</div><div dir="ltr"><br></div><div dir="ltr"><br><blockquote>Le 25 oct. 2019 à 12:30, Baptiste DURAND <baptiste.durand@enpc.fr> a écrit :<br><br></blockquote></div><blockquote><div dir="ltr"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Dear all,<br></div><br><div>I'm used to using <span id="DWT547" class="ZmSearchResult">gmsh</span> through the python API, on Ubuntu 18.04.<br></div><div>With the version 4.4 of <span id="DWT549" class="ZmSearchResult">gmsh</span>, I am faced with an unwanted behaviour when I try to import both <span id="DWT551" class="ZmSearchResult">gmsh</span> and matplotlib into the same script.</div><br><div>Firstly, if matplotlib is imported before <span id="DWT553" class="ZmSearchResult">gmsh</span>, a Segmentation fault error occurs.<br></div><div>Steps to reproduce this :<br></div><ul><li>Create a new virtual environment : <br></li><li>Activate this environment :<br></li><li>Install wheels : pip3 install wheels<br></li><li>Install <span id="DWT555" class="ZmSearchResult">gmsh</span> python API using the <span id="DWT557" class="ZmSearchResult">gmsh</span>-sdk package on pypi.org : pip3 install <span id="DWT559" class="ZmSearchResult">gmsh</span>-sdk<br></li><li>Install the matplotlib package : pip3 install matplotlib<br></li><li>Add the line "import matplotlib" before "import <span id="DWT561" class="ZmSearchResult">gmsh</span>" in the demo script t1.py<br></li><li>Run this demo script in the virtual environment : python3 t1.py<br></li></ul><div>This results in : Segmentation fault (core dumped)<br></div><div>If matplotlib is not imported or is imported after <span id="DWT563" class="ZmSearchResult">gmsh</span> this segmentation fault doesn't occur.<br></div><br><br><div>In addition, if include-system-site-packages is set to true in the configuration file of the virtual environment (pyvenv.cfg) another problem appears.<br></div><div>I need this setting because I would like to use the FEniCS finite element code and it cannot be <span style="color: #000000;">installed </span>inside a virtual environment.<br></div><div>Even if matplotlib is imported after <span id="DWT565" class="ZmSearchResult">gmsh</span>, the resulting mesh file is unreadable because the decimal separator is a comma. <br></div><br><br><div>Has anyone faced a similar issue ?<br></div><br><br><div>Best regards,<br><br>Baptiste Durand<br></div><br><div><div><span style="color: #333333;">---</span></div><div><span style="color: #333333;">Baptiste Durand</span><br><span style="color: #333333;">Doctorant – <a href="https://navier-lab.fr/" target="_blank">Laboratoire Navier</a></span><span style="color: #333333;"></span><br><span style="color: #333333;"><a href="mailto:baptiste.durand@enpc.fr" style="color: #333333;" target="_blank">baptiste.durand@enpc.fr</a> – <a href="tel:+33658880541" style="color: #333333;" target="_blank">01 64 15 37 21</a> (<a href="tel:+33658880541" style="color: #333333;" target="_blank">06 58 88 05 41</a>) – <a href="https://fr.linkedin.com/in/baptistedurand" style="color: #333333;" target="_blank">linkedin.com/in/baptistedurand </a></span><br></div></div></div><div><t1_with_matplotlib.py></div><span>_______________________________________________</span><br><span>gmsh mailing list</span><br><span>gmsh@onelab.info</span><br><span>http://onelab.info/mailman/listinfo/gmsh</span></div></blockquote><br></div></div></body></html>