[petsc-users] issues with mpi uni

Matthew Knepley knepley at gmail.com
Tue Aug 24 06:06:50 CDT 2021


On Tue, Aug 24, 2021 at 5:47 AM Janne Ruuskanen (TAU) <
janne.ruuskanen at tuni.fi> wrote:

> PETSc was built without mpi with the command:
>
>
> ./configure --with-openmp --with-mpi=0 --with-shared-libraries=1
> --with-mumps-serial=1 --download-mumps --download-openblas --download-metis
> --download-slepc --with-debugging=0 --with-scalar-type=real --with-x=0
> COPTFLAGS='-O3' CXXOPTFLAGS='-O3' FOPTFLAGS='-O3';
>
> so the MPI_UNI  mpi wrapper of petsc collides in names with the actual MPI
> used to compile sparselizard.
>

Different MPI implementations are not ABI compatible and therefore cannot
be used in the same program. You must
build all libraries in an executable with the same MPI. Thus, rebuild PETSc
with the same MPI as saprselizard.

  Thanks,

     Matt


> -Janne
>
>
> -----Original Message-----
> From: Satish Balay <balay at mcs.anl.gov>
> Sent: Monday, August 23, 2021 4:45 PM
> To: Janne Ruuskanen (TAU) <janne.ruuskanen at tuni.fi>
> Cc: petsc-users at mcs.anl.gov
> Subject: Re: [petsc-users] issues with mpi uni
>
> Did you build PETSc with the same openmpi [as what sparselizard is built
> with]?
>
> Satish
>
> On Mon, 23 Aug 2021, Janne Ruuskanen (TAU) wrote:
>
> > Hi,
> >
> > Assumingly, I have an issue using petsc and openmpi together in my c++
> code.
> >
> > See the code there:
> > https://github.com/halbux/sparselizard/blob/master/src/slmpi.cpp
> >
> >
> > So when I run:
> >
> > slmpi::initialize();
> > slmpi::count();
> > slmpi::finalize();
> >
> > I get the following error:
> >
> >
> > *** The MPI_Comm_size() function was called before MPI_INIT was invoked.
> > *** This is disallowed by the MPI standard.
> > *** Your MPI job will now abort.
> >
> >
> > Have you experienced anything similar with people trying to link openmpi
> and petsc into the same executable?
> >
> > Best regards,
> > Janne Ruuskanen
> >
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210824/b5122747/attachment.html>


More information about the petsc-users mailing list