[petsc-dev] failed rebase

Satish Balay balay at mcs.anl.gov
Fri Apr 3 09:42:56 CDT 2020


I guess we could run bfort on a single source file at a time..

diff --git a/lib/petsc/bin/maint/generatefortranstubs.py b/lib/petsc/bin/maint/generatefortranstubs.py
index 329fcb5b6f..f327bf5320 100755
--- a/lib/petsc/bin/maint/generatefortranstubs.py
+++ b/lib/petsc/bin/maint/generatefortranstubs.py
@@ -178,8 +178,9 @@ def processDir(petscdir, bfort, verbose, dirpath, dirnames, filenames):
                '-mpi', '-shortargname', '-ferr', '-ptrprefix Petsc', '-ptr64 PETSC_USE_POINTER_CONVERSION',
                '-fcaps PETSC_HAVE_FORTRAN_CAPS', '-fuscore PETSC_HAVE_FORTRAN_UNDERSCORE',
                '-f90mod_skip_header','-f90modfile','f90module.f90']
-    cmd = 'BFORT_CONFIG_PATH='+os.path.join(petscdir,'lib','petsc','conf')+' '+bfort+' '+' '.join(options+newls)
-    output = check_output(cmd, cwd=dirpath, shell=True, stderr=subprocess.STDOUT)
+    for file in newls:
+      cmd = 'BFORT_CONFIG_PATH='+os.path.join(petscdir,'lib','petsc','conf')+' '+bfort+' '+' '.join(options)+' '+file
+      output = check_output(cmd, cwd=dirpath, shell=True, stderr=subprocess.STDOUT)
     FixDir(petscdir,outdir,verbose)
 
   # remove from list of subdirectories all directories without source code


On my laptop - this changes runtime from:
$ time lib/petsc/bin/maint/generatefortranstubs.py bfort

real	0m3.134s
user	0m1.904s
sys	0m1.388s

to
$ time lib/petsc/bin/maint/generatefortranstubs.py bfort

real	0m8.419s
user	0m4.327s
sys	0m4.736s

So run bfort on 10 files at a time?

Satish

On Fri, 3 Apr 2020, Satish Balay via petsc-dev wrote:

> I attempted a rebase - and I get the following diff from yours. You might want to verify.
> 
> >>>>>>>>>>>
> $ git diff origin/mark/feature-xgc-interface-rebase..mark/feature-xgc-interface-rebase-local
> diff --git a/include/petscdmplex.h b/include/petscdmplex.h
> index cb464bbe77..ed99700499 100644
> --- a/include/petscdmplex.h
> +++ b/include/petscdmplex.h
> @@ -474,7 +474,6 @@ PETSC_EXTERN PetscErrorCode DMPlexCellRefinerRefine(DMPlexCellRefiner, DMPolytop
>  PETSC_EXTERN PetscErrorCode DMPlexCellRefinerGetAffineTransforms(DMPlexCellRefiner, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[]);
>  PETSC_EXTERN PetscErrorCode DMPlexCellRefinerGetAffineFaceTransforms(DMPlexCellRefiner, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[], PetscReal *[]);
>  PETSC_EXTERN PetscErrorCode DMPlexRefineUniform(DM, DMPlexCellRefiner, DM *);
> -
>  PETSC_EXTERN PetscErrorCode DMPlexFPPrintNorms(Vec, PetscInt);
>  PETSC_EXTERN PetscErrorCode DMPlexFPCreate2D(MPI_Comm, const PetscInt, const PetscInt, const PetscInt[], const double[], const double[], const PetscInt, const PetscInt[], const PetscScalar[/* ? */], DM *dm);
>  PETSC_EXTERN PetscErrorCode DMPlexFPCreateVelocitySpace(MPI_Comm,PetscInt,const char[],Vec*,DM*);
> diff --git a/src/dm/impls/plex/tutorials/ex11.c b/src/dm/impls/plex/tutorials/ex11.c
> index b28864ac89..29ca44f422 100644
> --- a/src/dm/impls/plex/tutorials/ex11.c
> +++ b/src/dm/impls/plex/tutorials/ex11.c
> @@ -648,7 +648,6 @@ PetscPrintf(PETSC_COMM_SELF, "\t\t***** FormRHSSource: have new_imp_rate= %10.3e
>        ierr = PetscObjectSetName((PetscObject)S, "src");CHKERRQ(ierr);
>        ierr = VecViewFromOptions(S,NULL,"-vec_view_diagnostics");CHKERRQ(ierr);
>        ierr = MatMult(ctx->M,S,rectx->imp_src);CHKERRQ(ierr);
> -      ierr = VecCopy(S,rectx->imp_src);CHKERRQ(ierr);
>        ierr = VecDestroy(&S);CHKERRQ(ierr);
>      }
>      ierr = VecCopy(rectx->imp_src,F);CHKERRQ(ierr);
> @@ -711,7 +710,7 @@ static PetscErrorCode stepSrc(PetscReal time, PetscInt step, PetscReal dt, Petsc
>    REctx         *rectx;
>    PetscFunctionBegin;
>    rectx = (REctx*)ctx->data;
> -  if (time >= rectx->pulse_start) *rho = rectx->pulse_rate;
> +  if (time > 1.e+5) *rho = rectx->pulse_rate; /* turned off */
>    else *rho = 0.;
>    PetscFunctionReturn(0);
>  }
> <<<<<<<
> 
> $ ls src/dm/impls/plex/examples/tutorials/
> doc/  ex10.c  ex10f90.F90  ex11.c  output/
> 
> This should now be in src/dm/impls/plex/tutorials/
> 
> Regarding the primary issue: configure, the primary error is not logged in configure.log. Running manually - I get:
> 
> bfort terminating at 664: Exceeded output count limit!
> 
> $ grep '/*@' *.c |wc -l
> 600
> 
> This single dir creates 600 man pages? Perhaps its time to reorganize plex into multiple dirs?
> 
> Satish
> 
> 
> On Fri, 3 Apr 2020, Mark Adams wrote:
> 
> > Satish, I tried again from scratch see the same thing.
> > I pushed this.
> > Thanks
> > 
> > 09:35 mark/feature-xgc-interface-rebase= ~/Codes/petsc$ git rebase
> > origin/master
> > First, rewinding head to replay your work on top of it...
> > Applying: starting rebase branch
> > Using index info to reconstruct a base tree...
> > M       include/petsc/private/dmpleximpl.h
> > M       include/petscdmplex.h
> > M       src/dm/impls/plex/makefile
> > .git/rebase-apply/patch:2620: trailing whitespace.
> >       for (d=0;d<src->dim;d++) *pp++ = src->df[d][s][idx];
> > warning: 1 line adds whitespace errors.
> > Falling back to patching base and 3-way merge...
> > Auto-merging src/dm/impls/plex/makefile
> > Auto-merging include/petscdmplex.h
> > CONFLICT (content): Merge conflict in include/petscdmplex.h
> > Auto-merging include/petsc/private/dmpleximpl.h
> > error: Failed to merge in the changes.
> > Patch failed at 0001 starting rebase branch
> > hint: Use 'git am --show-current-patch' to see the failed patch
> > Resolve all conflicts manually, mark them as resolved with
> > "git add/rm <conflicted_files>", then run "git rebase --continue".
> > You can instead skip this commit: run "git rebase --skip".
> > To abort and get back to the state before "git rebase", run "git rebase
> > --abort".
> > 09:36 1 mark/feature-xgc-interface-rebase *+|REBASE 1/19 ~/Codes/petsc$ vi
> > include/petscdmplex.h
> > 09:37 mark/feature-xgc-interface-rebase *+|REBASE 1/19 ~/Codes/petsc$ git
> > add include/petscdmplex.h
> > 09:37 mark/feature-xgc-interface-rebase +|REBASE 1/19 ~/Codes/petsc$ git
> > rebase --continue
> > Applying: starting rebase branch
> > Applying: manual merge
> > Applying: RE test
> > Applying: remove Ehat
> > Applying: clean up interface, redo regression tests, found false negatives
> > Applying: change Ec
> > Applying: tweek griding
> > Applying: clean up, working on impurity injection
> > Applying: fixed quench and pulse test
> > Applying: hardwired CUDA kernel for DIM, added presolve in ex11
> > Applying: added guard
> > Applying: starting to get E field added
> > Applying: doc
> > Applying: fix test params
> > Applying: remove comment
> > Applying: updated test syntax
> > Applying: cleaned up flags
> > Applying: cleaned up flags
> > Applying: fixed soruce bug
> > 
> > 
> > 09:37 mark/feature-xgc-interface-rebase<> ~/Codes/petsc$ rm -fr
> > arch-macosx-gnu-g/
> > 09:38 mark/feature-xgc-interface-rebase<> ~/Codes/petsc$
> > ../arch-macosx-gnu-g.py
> > ===============================================================================
> >              Configuring PETSc to compile on your system
> > 
> > ===============================================================================
> > ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                                    ***** WARNING: You have
> > an older version of Gnu make, it will work,
> > 
> > 
> > 
> > 
> > 
> >                          but may not support all the parallel testing
> > options. You can install the
> > 
> > 
> > 
> > 
> > 
> >      latest Gnu make with your package manager, such as brew or macports,
> > or use
> > 
> > 
> > 
> > 
> >                                                          the
> > --download-make option to get the latest Gnu make *****
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                                    Trying to download git://
> > https://bitbucket.org/petsc/pkg-sowing.git for SOWING
> > 
> > 
> > 
> > 
> > 
> > 
> > ===============================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                                    Running configure on
> > SOWING; this may take several minutes
> > 
> > 
> > 
> > 
> > 
> > 
> > ===============================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                                    Running make on SOWING;
> > this may take several minutes
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                                    Running make install on
> > SOWING; this may take several minutes
> > 
> > 
> > 
> > 
> > 
> > 
> >  ===============================================================================
> > 
> > 
> > 
> > 
> > 
> >                                              TESTING: checkSharedLibrary
> > from config.packages.sowing(config/BuildSystem/config/package.py:926)
> > 
> > 
> > 
> > 
> > 
> > 
> >  *******************************************************************************
> >         CONFIGURATION CRASH  (Please send configure.log to
> > petsc-maint at mcs.anl.gov)
> > *******************************************************************************
> > 
> > 09:40 1 mark/feature-xgc-interface-rebase<> ~/Codes/petsc$
> > 
> > 
> > On Fri, Apr 3, 2020 at 8:17 AM Mark Adams <mfadams at lbl.gov> wrote:
> > 
> > >
> > >
> > > On Thu, Apr 2, 2020 at 11:05 PM Satish Balay <balay at mcs.anl.gov> wrote:
> > >
> > >> My OS build also went through. Looks like you haven't pushed [force
> > >> update] this branch - so I'm testing with something totally different.
> > >>
> > >>
> > > Yes, I have a <> after a rebase.  Do you want me to push it? Or should I
> > > just start over? I thought I started with a clean version of my code from
> > > the repo.
> > > Thanks,
> > >
> > >
> > >> So likely something in your rebased sources is causing bfort to fail..
> > >>
> > >> Satish
> > >>
> > >> On Thu, 2 Apr 2020, Mark Adams wrote:
> > >>
> > >> > I see:
> > >> > 22:46 128 mark/feature-xgc-interface-rebase<> ~/Codes/petsc$ git status
> > >> > On branch mark/feature-xgc-interface-rebase
> > >> > Your branch and 'origin/mark/feature-xgc-interface-rebase' have
> > >> diverged,
> > >> > and have 130 and 18 different commits each, respectively.
> > >> >   (use "git pull" to merge the remote branch into yours)
> > >> >
> > >> > Untracked files:
> > >> >   (use "git add <file>..." to include in what will be committed)
> > >> >         out2.txt
> > >> >         src/dm/impls/plex/examples/tutorials/Landau/
> > >> >
> > >> >
> > >> > On Thu, Apr 2, 2020 at 10:45 PM Mark Adams <mfadams at lbl.gov> wrote:
> > >> >
> > >> > >
> > >> > >
> > >> > > On Thu, Apr 2, 2020 at 10:33 PM Satish Balay <balay at mcs.anl.gov>
> > >> wrote:
> > >> > >
> > >> > >> Is this branch mark/feature-xgc-interface-rebase pushed?
> > >> > >
> > >> > >
> > >> > > yes.
> > >> > >
> > >> > >
> > >> > >> I had done a build with the current state of it - and the build went
> > >> > >> through fine. This was on linux.
> > >> > >>
> > >> > >> Will try OSX now.
> > >> > >>
> > >> > >> Satish
> > >> > >>
> > >> > >> On Thu, 2 Apr 2020, Mark Adams wrote:
> > >> > >>
> > >> > >> > Note, when I rebased I got one conflict, in a header where I added
> > >> > >> stuff at
> > >> > >> > the end and master did also so I just kept them both and continued.
> > >> > >> > Other than that it was a clean rebase.
> > >> > >> >
> > >> > >> > On Thu, Apr 2, 2020 at 10:15 PM Mark Adams <mfadams at lbl.gov>
> > >> wrote:
> > >> > >> >
> > >> > >> > >
> > >> > >> > >
> > >> > >> > > On Thu, Apr 2, 2020 at 9:32 PM Satish Balay <balay at mcs.anl.gov>
> > >> > >> wrote:
> > >> > >> > >
> > >> > >> > >> can you try this in a local clone [same branch] and see if that
> > >> > >> works?
> > >> > >> > >>
> > >> > >> > >> cd /Users/markadams/Codes
> > >> > >> > >> git clone petsc petsc-test
> > >> > >> > >> cd petsc-test
> > >> > >> > >> ./configure ...
> > >> > >> > >>
> > >> > >> > >> Satish
> > >> > >> > >>
> > >> > >> > >>
> > >> > >> > >> On Thu, 2 Apr 2020, Mark Adams wrote:
> > >> > >> > >>
> > >> > >> > >> > I tried to rebase mark/feature-xgc-interface-rebase with
> > >> master
> > >> > >> and I
> > >> > >> > >> get
> > >> > >> > >> > this.
> > >> > >> > >> > I of course deleted the arch directory.
> > >> > >> > >> > Thanks,
> > >> > >> > >> > Mark
> > >> > >> > >> >
> > >> > >> > >>
> > >> > >> > >>
> > >> > >> >
> > >> > >>
> > >> > >>
> > >> >
> > >>
> > >>
> > 
> 



More information about the petsc-dev mailing list