Jed Brown <[email protected]> writes:

>   [The reference there to an issue should be to #43, not #33.
>    
> https://bitbucket.org/petsc/petsc/issue/44/parent-object-keeps-linked-list-of]

#44, rather.

> Can we revert this parent traversal on 'master' for now?

I.e.,

diff --git i/src/sys/logging/plog.c w/src/sys/logging/plog.c
index 907b38d..f7f3fd1 100644
--- i/src/sys/logging/plog.c
+++ w/src/sys/logging/plog.c
@@ -15,13 +15,7 @@
 
 PetscErrorCode PetscLogObjectParent(PetscObject p,PetscObject c)
 {
-  PetscObject pp = p;
   if (!c || !p) return 0;
-  while (!c->parent && pp) {
-    /* if not credited elsewhere credit all childs memory to all new ancestors 
*/
-    pp->memchildren += c->mem + c->memchildren;
-    pp               = pp->parent;
-  }
   c->parent   = p;
   c->parentid = p->id;
   return 0;
@@ -30,12 +24,6 @@ PetscErrorCode PetscLogObjectParent(PetscObject 
p,PetscObject c)
 PetscErrorCode PetscLogObjectMemory(PetscObject p,PetscLogDouble m)
 {
   p->mem += m;
-  p       =  p->parent;
-  while (p) {
-    /* Create all ancestors with the memory */
-    p->memchildren += m;
-    p               =  p->parent;
-  }
   return 0;
 }
 

Attachment: pgpZgSl3HxoDv.pgp
Description: PGP signature

Reply via email to