<div dir="ltr"><div dir="ltr">On Fri, Apr 16, 2021 at 2:06 PM Satish Balay via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sure that might work. Also just commenting out the 3 lines for that check got the build going for me.<br>
<br>
Or a simple change (but a bit intrusive):<br>
<br>
[balay@pj01 petsc]$ diff -Nru ./arch-linux-c-debug/include/sc.h~ ./arch-linux-c-debug/include/sc.h<br>
--- ./arch-linux-c-debug/include/sc.h~ 2021-04-16 12:59:20.803995227 -0500<br>
+++ ./arch-linux-c-debug/include/sc.h 2021-04-16 13:00:06.490993496 -0500<br>
@@ -83,7 +83,7 @@<br>
#ifdef SC_ENABLE_MPI<br>
#include <mpi.h><br>
#else<br>
-#ifdef MPI_SUCCESS<br>
+#if defined(MPI_SUCCESS) && !defined(MPIUNI_H)<br>
#error "mpi.h is included. Use --enable-mpi."<br>
#endif<br>
#endif<br>
<br>
Also getting test suite errors - Matt might have to check on. [attaching log]<br></blockquote><div><br></div><div>Hmm, this looks like an MPIUNI memory leak with split collectives. I will have to spin up that configuration and track it down.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Satish<br>
<br>
On Fri, 16 Apr 2021, Isaac, Tobin G wrote:<br>
<br>
> 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.<br>
> <br>
> Maybe: if mpiuni doesn't provide some esoteric part of MPI that p4est uses, it will break.<br>
> <br>
> Toby Isaac, Assistant Professor, GTCSE<br>
> <br>
> ________________________________<br>
> From: Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> Sent: Friday, April 16, 2021 1:03:55 PM<br>
> To: Isaac, Tobin G <<a href="mailto:tisaac@cc.gatech.edu" target="_blank">tisaac@cc.gatech.edu</a>><br>
> Cc: petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>><br>
> Subject: Re: [petsc-dev] p4est w/o MPI<br>
> <br>
> Thanks! Another issue:<br>
> <br>
> mpiuni provides mpi.h. And I get the following errors when building PETSc.<br>
> <br>
> /home/balay/petsc/arch-linux-c-debug/include/sc.h:87:2: error: #error "mpi.h is included. Use --enable-mpi."<br>
> 87 | #error "mpi.h is included. Use --enable-mpi."<br>
> | ^~~~~<br>
> <br>
> etc..<br>
> <br>
> Satish<br>
> <br>
> <br>
> On Fri, 16 Apr 2021, Isaac, Tobin G wrote:<br>
> <br>
> > Yes, `--disable-mpi` should be accepted by p4est.<br>
> ><br>
> > ________________________________________<br>
> > From: Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> > Sent: Friday, April 16, 2021 11:47<br>
> > To: Satish Balay via petsc-dev<br>
> > Cc: Isaac, Tobin G<br>
> > Subject: Re: [petsc-dev] p4est w/o MPI<br>
> ><br>
> > BTW: Is there no --disable-mpi option?<br>
> ><br>
> > Satish<br>
> ><br>
> > On Fri, 16 Apr 2021, Satish Balay via petsc-dev wrote:<br>
> ><br>
> > > MPI pacakge is a bit weird compared to others [as it does this funny thing with MPIUNI].<br>
> > ><br>
> > > For regular packages - I guess I would use 'if package.found'<br>
> > ><br>
> > > I guess I should create an MR with this diff.<br>
> > ><br>
> > > Satish<br>
> > ><br>
> > > ----<br>
> > ><br>
> > > diff --git a/config/BuildSystem/config/packages/p4est.py b/config/BuildSystem/config/packages/p4est.py<br>
> > > index e7108b0ab8..40d6797f02 100644<br>
> > > --- a/config/BuildSystem/config/packages/p4est.py<br>
> > > +++ b/config/BuildSystem/config/packages/p4est.py<br>
> > > @@ -24,14 +24,16 @@ class Configure(config.package.GNUPackage):<br>
> > > self.blasLapack = framework.require('config.packages.BlasLapack',self)<br>
> > > self.zlib = framework.require('config.packages.zlib',self)<br>
> > > self.memalign = framework.argDB['with-memalign']<br>
> > > - self.deps = [self.mpi,self.blasLapack,self.zlib]<br>
> > > + self.deps = [self.blasLapack,self.zlib]<br>
> > > + self.odeps = [self.mpi]<br>
> > > return<br>
> > ><br>
> > > def formGNUConfigureArgs(self):<br>
> > > args = config.package.GNUPackage.formGNUConfigureArgs(self)<br>
> > > if self.argDB['with-p4est-debugging']:<br>
> > > args.append('--enable-debug')<br>
> > > - args.append('--enable-mpi')<br>
> > > + if not self.mpi.usingMPIUni:<br>
> > > + args.append('--enable-mpi')<br>
> > > args.append('CPPFLAGS="'+self.headers.toStringNoDupes(self.dinclude)+'"')<br>
> > > args.append('LIBS="'+self.libraries.toString(self.dlib)+'"')<br>
> > > args.append('--enable-memalign='+self.memalign)<br>
> > ><br>
> > > On Fri, 16 Apr 2021, Isaac, Tobin G wrote:<br>
> > ><br>
> > > > Matt, this is the configure logic I would like, but I don't know how to do it:<br>
> > > > - configure p4est after MPI, but do not require MPI<br>
> > > > - if MPI is present, add the '--enable-mpi' flack in formGNUConfigureArgs(), otherwise omit it.<br>
> > > ><br>
> > > > ________________________________________<br>
> > > > From: Isaac, Tobin G <<a href="mailto:tisaac@cc.gatech.edu" target="_blank">tisaac@cc.gatech.edu</a>><br>
> > > > Sent: Friday, April 16, 2021 11:03<br>
> > > > To: Mark Adams; For users of the development version of PETSc<br>
> > > > Subject: Re: [petsc-dev] p4est w/o MPI<br>
> > > ><br>
> > > > p4est has a mode where it can compile without MPI, I don't know if PETSc is using it, will check.<br>
> > > ><br>
> > > > ________________________________________<br>
> > > > From: petsc-dev <<a href="mailto:petsc-dev-bounces@mcs.anl.gov" target="_blank">petsc-dev-bounces@mcs.anl.gov</a>> on behalf of Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>><br>
> > > > Sent: Friday, April 16, 2021 10:23<br>
> > > > To: For users of the development version of PETSc<br>
> > > > Subject: [petsc-dev] p4est w/o MPI<br>
> > > ><br>
> > > > I don't have MPI (Fugaku w/ gcc) and p4est seems to need it. Is there a work around?<br>
> > > > Thanks,<br>
> > > > Mark<br>
> > > ><br>
> > ><br>
> ><br>
> <br>
> <br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>