[Gmsh] Gmsh API + MPI

Mikhail Artemiev artemiev.mikhail at ngs.ru
Tue Aug 23 09:47:54 CEST 2011


Hi all!
When I run the following easiest program:

#include <mpi.h>
#include "Gmsh.h"
int main(int argc, char **argv)
{
  MPI_Init(&argc, &argv);
  GmshInitialize(argc, argv);
  GmshFinalize();
  MPI_Finalize();
  return 0;
}

I have the following error:

[artemiev-desktop:19676] *** An error occurred in MPI_Init
[artemiev-desktop:19676] *** on communicator MPI_COMM_WORLD
[artemiev-desktop:19676] *** MPI_ERR_OTHER: known error not in list
[artemiev-desktop:19676] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpirun has exited due to process rank 1 with PID 19676 on
node artemiev-desktop exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Calling MPI_Init or MPI_Init_thread twice is erroneous.
--------------------------------------------------------------------------
[artemiev-desktop:19674] 1 more process has sent help message help-mpi-errors.txt / mpi_errors_are_fatal
[artemiev-desktop:19674] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

I thought that "GmshInitialize" call "MPI_Init". Therefore I recompiled Gmsh with -DENABLE_MPI=0 option.
But the result was the same.

Could you give a hint about how to use Gmsh API in parallel program?

Thanks
Mikhail Artemiev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110823/145f65a3/attachment.html>