[petsc-users] --with-mpi=0

Satish Balay balay at mcs.anl.gov
Sat Dec 18 15:36:31 CST 2021


Sure - that's the trade-off.

At some point I think we decided not to map mpiuni.mod to mpi.mod [to avoid potential clash with other mpi/mpiuni type impls].

If I remember correctly - we could limit on the C side - by not installing mpi.h in std location [its at include/petsc/mpiuni/mpi.h]

And since mpiuni's mpi.mod is to be installed in prefix/include - I think this different name was chosen.

And now that we are supporting 'use mpi or mpi_f08' - its 'use mpiuni or mpi or mpi_f08' or use --with-mpi-f90module-visibility=1

For now petscmpi maps to mpi or mpiuni.

Perhaps its possible to change our installer to have mpiuni's mod file at  prefix/include/petsc/mpiuni/mpi.mod - [to enable reusing mpi.mod name ]

[at some point we had an option to skip fortran mpi_comm_rank() etc - as they would clash with similar uni impls. But I see that option no longer exists?]

Satish

On Sat, 18 Dec 2021, Barry Smith wrote:

> 
>   Urg, this is pretty horrible. petscmpi?  Why can't MPIUNI provide this as "standard" MPI modules?
> 
> 
> 
> > On Dec 18, 2021, at 11:04 AM, Satish Balay via petsc-users <petsc-users at mcs.anl.gov> wrote:
> > 
> > Ah - you need 'use petscmpi'
> > 
> > For example: ksp/ksp/tutorials/ex44f.F90
> > 
> > Satish
> > 
> > On Sat, 18 Dec 2021, Matthew Knepley wrote:
> > 
> >> On Sat, Dec 18, 2021 at 9:26 AM Tabrez Ali <tabrezali at gmail.com> wrote:
> >> 
> >>> Hi,
> >>> 
> >>> I am trying to compile Fortran code with PETSc 3.16 built without MPI,
> >>> i.e., --with-mpi=0, and am getting the following error:
> >>> 
> >>>   call MPI_Comm_rank(MPI_COMM_WORLD,rank,ierr)
> >>>                                         1
> >>> Error: Symbol ‘mpi_comm_world’ at (1) has no IMPLICIT type
> >>> 
> >> 
> >> Hi Tabrez,
> >> 
> >> The definition of MPI_COMM_WORLD is in mpif.h. Are you #including that?
> >> 
> >>  Thanks,
> >> 
> >>    Matt
> >> 
> >> 
> >>> There are no issues with PETSc 3.14 or prior versions. Any ideas as to
> >>> what could be wrong?
> >>> 
> >>> I do see the following note (below) in
> >>> https://petsc.org/main/docs/changes/315/ but I am not sure if it's
> >>> related:
> >>> 
> >>> *Add configure option --with-mpi-f90module-visibility [default=``1``].
> >>> With 0, mpi.mod will not be visible in use code (via petscsys.mod) -
> >>> so mpi_f08 can now be used*
> >>> 
> >>> Regards,
> >>> 
> >>> Tabrez
> >>> 
> >> 
> >> 
> >> 
> 


More information about the petsc-users mailing list