[Gmsh] Gmsh API + MPI
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Tue Aug 23 13:08:41 CEST 2011
On 23 Aug 2011, at 09:47, Mikhail Artemiev wrote:
> 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?
Hi Mikhail - MPI_Init might also be called (indirectly) in GmshInitialize if Gmsh is compiled with PETSc support. Is this the case in your setup?
>
> Thanks
> Mikhail Artemiev
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine