[petsc-dev] p4est w/o MPI

Satish Balay balay at mcs.anl.gov
Fri Apr 16 13:05:50 CDT 2021


Sure that might work. Also just commenting out the 3 lines for that check got the build going for me.

Or a simple change (but a bit intrusive):

[balay at pj01 petsc]$ diff -Nru ./arch-linux-c-debug/include/sc.h~ ./arch-linux-c-debug/include/sc.h
--- ./arch-linux-c-debug/include/sc.h~	2021-04-16 12:59:20.803995227 -0500
+++ ./arch-linux-c-debug/include/sc.h	2021-04-16 13:00:06.490993496 -0500
@@ -83,7 +83,7 @@
 #ifdef SC_ENABLE_MPI
 #include <mpi.h>
 #else
-#ifdef MPI_SUCCESS
+#if defined(MPI_SUCCESS) && !defined(MPIUNI_H)
 #error "mpi.h is included.  Use --enable-mpi."
 #endif
 #endif

Also getting test suite errors - Matt might have to check on. [attaching log]

Satish

On Fri, 16 Apr 2021, Isaac, Tobin G wrote:

> Hmm.  So if petsc always compiles mpiuni if --with-mpi=0, then it makes me think it should be possible to drop requires(MPI) from p4est, while still passing `--enable-mpi` to p4est.
> 
> Maybe: if mpiuni doesn't provide some esoteric part of MPI that p4est uses, it will break.
> 
> Toby Isaac, Assistant Professor, GTCSE
> 
> ________________________________
> From: Satish Balay <balay at mcs.anl.gov>
> Sent: Friday, April 16, 2021 1:03:55 PM
> To: Isaac, Tobin G <tisaac at cc.gatech.edu>
> Cc: petsc-dev <petsc-dev at mcs.anl.gov>
> Subject: Re: [petsc-dev] p4est w/o MPI
> 
> Thanks! Another issue:
> 
> mpiuni provides mpi.h. And I get the following errors when building PETSc.
> 
> /home/balay/petsc/arch-linux-c-debug/include/sc.h:87:2: error: #error "mpi.h is included.  Use --enable-mpi."
>    87 | #error "mpi.h is included.  Use --enable-mpi."
>       |  ^~~~~
> 
> etc..
> 
> Satish
> 
> 
> On Fri, 16 Apr 2021, Isaac, Tobin G wrote:
> 
> > Yes, `--disable-mpi` should be accepted by p4est.
> >
> > ________________________________________
> > From: Satish Balay <balay at mcs.anl.gov>
> > Sent: Friday, April 16, 2021 11:47
> > To: Satish Balay via petsc-dev
> > Cc: Isaac, Tobin G
> > Subject: Re: [petsc-dev] p4est w/o MPI
> >
> > BTW: Is there no --disable-mpi option?
> >
> > Satish
> >
> > On Fri, 16 Apr 2021, Satish Balay via petsc-dev wrote:
> >
> > > MPI pacakge is a bit weird compared to others [as it does this funny thing with MPIUNI].
> > >
> > > For regular packages - I guess I would use 'if package.found'
> > >
> > > I guess I should create an MR with this diff.
> > >
> > > Satish
> > >
> > > ----
> > >
> > > diff --git a/config/BuildSystem/config/packages/p4est.py b/config/BuildSystem/config/packages/p4est.py
> > > index e7108b0ab8..40d6797f02 100644
> > > --- a/config/BuildSystem/config/packages/p4est.py
> > > +++ b/config/BuildSystem/config/packages/p4est.py
> > > @@ -24,14 +24,16 @@ class Configure(config.package.GNUPackage):
> > >      self.blasLapack = framework.require('config.packages.BlasLapack',self)
> > >      self.zlib       = framework.require('config.packages.zlib',self)
> > >      self.memalign   = framework.argDB['with-memalign']
> > > -    self.deps       = [self.mpi,self.blasLapack,self.zlib]
> > > +    self.deps       = [self.blasLapack,self.zlib]
> > > +    self.odeps      = [self.mpi]
> > >      return
> > >
> > >    def formGNUConfigureArgs(self):
> > >      args = config.package.GNUPackage.formGNUConfigureArgs(self)
> > >      if self.argDB['with-p4est-debugging']:
> > >        args.append('--enable-debug')
> > > -    args.append('--enable-mpi')
> > > +    if not self.mpi.usingMPIUni:
> > > +      args.append('--enable-mpi')
> > >      args.append('CPPFLAGS="'+self.headers.toStringNoDupes(self.dinclude)+'"')
> > >      args.append('LIBS="'+self.libraries.toString(self.dlib)+'"')
> > >      args.append('--enable-memalign='+self.memalign)
> > >
> > > On Fri, 16 Apr 2021, Isaac, Tobin G wrote:
> > >
> > > > Matt, this is the configure logic I would like, but I don't know how to do it:
> > > > - configure p4est after MPI, but do not require MPI
> > > > - if MPI is present, add the '--enable-mpi' flack in formGNUConfigureArgs(), otherwise omit it.
> > > >
> > > > ________________________________________
> > > > From: Isaac, Tobin G <tisaac at cc.gatech.edu>
> > > > Sent: Friday, April 16, 2021 11:03
> > > > To: Mark Adams; For users of the development version of PETSc
> > > > Subject: Re: [petsc-dev] p4est w/o MPI
> > > >
> > > > p4est has a mode where it can compile without MPI, I don't know if PETSc is using it, will check.
> > > >
> > > > ________________________________________
> > > > From: petsc-dev <petsc-dev-bounces at mcs.anl.gov> on behalf of Mark Adams <mfadams at lbl.gov>
> > > > Sent: Friday, April 16, 2021 10:23
> > > > To: For users of the development version of PETSc
> > > > Subject: [petsc-dev] p4est w/o MPI
> > > >
> > > > I don't have MPI (Fugaku w/ gcc) and p4est seems to need it. Is there a work around?
> > > > Thanks,
> > > > Mark
> > > >
> > >
> >
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alltests.log
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210416/2e58bd6d/attachment-0001.ksh>


More information about the petsc-dev mailing list