[Gmsh] Feedback on new Gmsh API

Marek Wojciechowski mwojc at p.lodz.pl
Wed Dec 6 22:45:25 CET 2017

Dnia poniedziałek, 4 grudnia 2017 12:53:06 CET Christophe Geuzaine pisze:
> See demos/api/README.txt : basically, you need to either explicitly build
> the shared Gmsh libraries (cmake -DENABLE_BUILD_SHARED=1 ..; make), or the
> dynamic Gmsh app, which will build the shared libraries (cmake
> -DENABLE_BUILD_DYNAMIC=1 ..; make). Building the dynamic app is probably
> the most convenient, as you will get both the app and the libs. Note that
> both the main libgmsh and the small C wrapper libgmshc will be built
> automatically.
> Then you need to install the libraries with "make install". Currently this
> will also install a copy of libgmshc in the gmsh/api directory, so that you
> can use it directly with the Python module. We will definitely improve the
> installation process later.

I installed dynamic libraries, but it seems there's a problem when Gmsh is 
compiled with MPI. Running any example gives me an MPI error:

*** An error occurred in MPI_Init_thread
*** on a NULL communicator
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
***    and potentially your MPI job)
[think:21768] Local abort before MPI_INIT completed completed successfully, 
but am not able to aggregate error messages, and not able to guarantee that 
all other processes were killed!

However when i add before gmsh.initialize() these two lines:

import ctypes
ctypes.CDLL("libmpi.so", mode=ctypes.RTLD_GLOBAL)

then examples run without problems.

Marek Wojciechowski 


Politechnika Łódzka 
Lodz University of Technology 

Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata. 
Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę 
prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie. 

This email contains information intended solely for the use of the individual to whom it is addressed. 
If you are not the intended recipient or if you have received this message in error, 
please notify the sender and delete it from your system. 

More information about the gmsh mailing list