Commits

BarryFSmith  committed e630791 Merge

Merge branch 'master' of bitbucket.org:petsc/petsc

  • Participants
  • Parent commits b0c3903, 8869cef

Comments (4)

  1. BarryFSmith author

    If this is so objectionable then any reasonable system would prevent one from "doing the bad thing". Tools have safety features for a reason, only a fool disables all safety features in a tool.

    1. Jed Brown

      May as well make a car that cannot turn left because cutting the wheel to the left can result in a head-on. Whether or not a no-ff pull is allowed depends on whether you are integrating branches into yours or racing to integrate into something that you don't own. Use git pull --ff-only to abort instead of creating a merge commit.

      1. BarryFSmith author

        And this is part of the problem with branches in git. They are not full featured enough. Git branches should be rich enough structured so that GIT KNOWS "whether you are integrating branches into yours or racing to integrate into something that you don't own" then it can properly prevent people from making mistakes but because of the asinine idea that a "branch" should ONLY be a pointer to a commit, or whatever the fuck it is, GIT people refuse to make it a full featured beasty. With this additional information in branches GIT could properly handle handle different branches differently and enforce (when repository owners want) specific policies on specific branches.

        One symptom of this branch stupidity is that I need to embed in the branch name the "owner" of the branch and any information about the branch because there is no other place to put it.

Files changed (5)

File config/examples/arch-freebsd-cxx-cmplx-pkgs-dbg.py

 #!/usr/bin/env python
 
 configure_options = [
+  '--with-cc=gcc46',
+  '--with-cxx=g++46', # default g++ segfaults with src/ts/examples/tutorials/ex10.c
+  '--with-fc=gfortran',
+  'LIBS=-lexecinfo', # for some reason gcc46 requires this library
   '--with-clanguage=cxx',
   '--with-scalar-type=complex',
 

File src/dm/impls/plex/plexrefine.c

       } else if ((p >= eMax) && (p < eEnd)) {
         /* Hybrid edges stay the same */
         localPointsNew[m]        = eStartNew     + (eMax                        - eStart)*2     + (fMax                              - fStart)*3     + (cMax                            - cStart)     + (p  - eMax);
-        remotePointsNew[m].index = rvStartNew[n] + (rdepthMaxOld[n*(depth+1)+1] - reStart[n])*2 + (rdepthMaxOld[n*(depth+1)+depth-1] - rfStart[n])*3 + (rdepthMaxOld[n*(depth+1)+depth] - rcStart[n]) + (rp - rdepthMaxOld[n*(depth+1)+1]);
+        remotePointsNew[m].index = reStartNew[n] + (rdepthMaxOld[n*(depth+1)+1] - reStart[n])*2 + (rdepthMaxOld[n*(depth+1)+depth-1] - rfStart[n])*3 + (rdepthMaxOld[n*(depth+1)+depth] - rcStart[n]) + (rp - rdepthMaxOld[n*(depth+1)+1]);
         remotePointsNew[m].rank  = rrank;
         ++m;
       } else if ((p >= fStart) && (p < fMax)) {
           remotePointsNew[m].index = rfStartNew[n] + (rdepthMaxOld[n*(depth+1)+depth-1] - rfStart[n])*4 + (rdepthMaxOld[n*(depth+1)+depth] - rcStart[n])*8 + (rp - rdepthMaxOld[n*(depth+1)+depth-1])*2 + r;
           remotePointsNew[m].rank  = rrank;
         }
-        localPointsNew[m]        = eStartNew     + (eMax                        - eStart)*2     + (fMax                              - fStart)*3     + (cMax                            - cStart)     + (p  - fMax);
-        remotePointsNew[m].index = reStartNew[n] + (rdepthMaxOld[n*(depth+1)+1] - reStart[n])*2 + (rdepthMaxOld[n*(depth+1)+depth-1] - rfStart[n])*3 + (rdepthMaxOld[n*(depth+1)+depth] - rcStart[n]) + (rp - rdepthMaxOld[n*(depth+1)+depth-1]);
+        localPointsNew[m]        = eStartNew     + (eMax                        - eStart)*2     + (fMax                              - fStart)*3     + (cMax                            - cStart)     + (eEnd                                    - eMax)                        + (p  - fMax);
+        remotePointsNew[m].index = reStartNew[n] + (rdepthMaxOld[n*(depth+1)+1] - reStart[n])*2 + (rdepthMaxOld[n*(depth+1)+depth-1] - rfStart[n])*3 + (rdepthMaxOld[n*(depth+1)+depth] - rcStart[n]) + (rdepthSizeOld[n*(depth+1)+1]+reStart[n] - rdepthMaxOld[n*(depth+1)+1]) + (rp - rdepthMaxOld[n*(depth+1)+depth-1]);
         remotePointsNew[m].rank  = rrank;
         ++m;
       } else if ((p >= cStart) && (p < cMax)) {

File src/mat/interface/ftn-custom/zmatrixf.c

 #define matload_                         MATLOAD
 #define matview_                         MATVIEW
 #define matseqaijgetarray_               MATSEQAIJGETARRAY
-#define matseqaijrestorearray            MATSEQAIJRESTOREARRAY
+#define matseqaijrestorearray_           MATSEQAIJRESTOREARRAY
 #define matdensegetarray_                MATDENSEGETARRAY
 #define matdenserestorearray_            MATDENSERESTOREARRAY
 #define matconvert_                      MATCONVERT

File src/ts/examples/tutorials/ex10.c

     rc[0] = i; rc[1] = i+1;
     ierr  = PetscMemzero(K,sizeof(K));CHKERRQ(ierr);
     for (q=0; q<nq; q++) {
-      PetscScalar D_R,PETSC_UNUSED rad;
+      PetscScalar D_R,rad;
       RDNode      n,nx,nt,ntx,drad,dD_R,dxD_R,dEm;
       RDEvaluate(interp,deriv,q,x,i,&n,&nx);
       RDEvaluate(interp,deriv,q,xdot,i,&nt,&ntx);

File src/vec/is/sf/interface/sf.c

 {
   PetscInt      *rootdata, *leafdata, *ilocal;
   PetscSFNode   *iremote;
-  PetscInt       leafsize = 0, nleaves = 0, i;
+  PetscInt       leafsize = 0, nleaves = 0, n, i;
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
   for (i = 0; i < leafsize; ++i) nleaves += leafdata[i];
   ierr = PetscMalloc1(nleaves,&ilocal);CHKERRQ(ierr);
   ierr = PetscMalloc1(nleaves,&iremote);CHKERRQ(ierr);
-  for (i = 0, nleaves = 0; i < sf->nleaves; ++i) {
+  for (i = 0, n = 0; i < sf->nleaves; ++i) {
     const PetscInt lidx = sf->mine ? sf->mine[i] : i;
 
     if (leafdata[lidx]) {
-      ilocal[nleaves]        = lidx;
-      iremote[nleaves].rank  = sf->remote[i].rank;
-      iremote[nleaves].index = sf->remote[i].index;
-      ++nleaves;
+      ilocal[n]        = lidx;
+      iremote[n].rank  = sf->remote[i].rank;
+      iremote[n].index = sf->remote[i].index;
+      ++n;
     }
   }
+  if (n != nleaves) SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_PLIB, "There is a size mismatch in the SF embedding, %d != %d", n, nleaves);
   ierr = PetscSFDuplicate(sf,PETSCSF_DUPLICATE_RANKS,newsf);CHKERRQ(ierr);
   ierr = PetscSFSetGraph(*newsf,sf->nroots,nleaves,ilocal,PETSC_OWN_POINTER,iremote,PETSC_OWN_POINTER);CHKERRQ(ierr);
   ierr = PetscFree2(rootdata,leafdata);CHKERRQ(ierr);