Commits

BarryFSmith committed d4349b4

removed path and MPI_Comm arguments from PetscFunctionListFind/Add()

  • Participants
  • Parent commits 607a662

Comments (3)

  1. Jed Brown

    With all the removal in reg.c, it looks like we aren't using the rname argument to PetscFunctionListAdd() at all. Can't we remove it too?

Files changed (37)

File include/petscsys.h

     Dynamic library lists. Lists of names of routines in objects or in dynamic
   link libraries that will be loaded as needed.
 */
-PETSC_EXTERN PetscErrorCode PetscFunctionListAdd(MPI_Comm,PetscFunctionList*,const char[],const char[],void (*)(void));
+PETSC_EXTERN PetscErrorCode PetscFunctionListAdd(PetscFunctionList*,const char[],const char[],void (*)(void));
 PETSC_EXTERN PetscErrorCode PetscFunctionListDestroy(PetscFunctionList*);
-PETSC_EXTERN PetscErrorCode PetscFunctionListFind(MPI_Comm,PetscFunctionList,const char[],PetscBool,void (**)(void));
+PETSC_EXTERN PetscErrorCode PetscFunctionListFind(PetscFunctionList,const char[],void (**)(void));
 PETSC_EXTERN PetscErrorCode PetscFunctionListPrintTypes(MPI_Comm,FILE*,const char[],const char[],const char[],const char[],PetscFunctionList,const char[]);
 PETSC_EXTERN PetscErrorCode PetscFunctionListDuplicate(PetscFunctionList,PetscFunctionList *);
 PETSC_EXTERN PetscErrorCode PetscFunctionListView(PetscFunctionList,PetscViewer);
-PETSC_EXTERN PetscErrorCode PetscFunctionListConcat(const char [],const char [],char []);
 PETSC_EXTERN PetscErrorCode PetscFunctionListGet(PetscFunctionList,const char ***,int*);
 
 /*S

File src/dm/interface/dm.c

   if (match) PetscFunctionReturn(0);
 
   if (!DMRegisterAllCalled) {ierr = DMRegisterAll();CHKERRQ(ierr);}
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)dm), DMList, method,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(DMList, method,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)dm),PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown DM type: %s", method);
 
   if (dm->ops->destroy) {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&DMList, sname, name, (void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&DMList, sname, name, (void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/docs/tex/manual/developers.tex

   PetscErrorCode ierr;\\
 \\
   PetscFunctionBegin;\\
-  ierr = PetscFunctionListFind(obj-$>$qlist,obj-$>$comm,name,PETSC\_FALSE,( int(**)(void *)) ptr);\\
+  ierr = PetscFunctionListFind(obj-$>$qlist,obj-$>$comm,name,( int(**)(void *)) ptr);\\
   CHKERRQ(ierr);\\
   PetscFunctionReturn(0);\\
 \}

File src/docs/website/documentation/changes/dev.html

         <li>In PETSc options files, the comment characters <tt>!</tt> and <tt>%</tt> are no longer supported, use <tt>#</tt>.</li>
         <li>
           <tt>PetscFList</tt> and <tt>PetscOList</tt> have been changed to <tt>PetscFunctionList</tt> and <tt>PetscObjectList</tt>.
-          The arguments to <tt>PetscFunctionListFind</tt> now takes the communicator as the first argument.
         </li>
         <li>
           The configure options <tt>--with-c-support</tt> and <tt>--with-c++-support</tt> have been removed. A PETSc

File src/ksp/ksp/interface/itcreate.c

   ierr = PetscObjectTypeCompare((PetscObject)ksp,type,&match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)ksp),KSPList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(KSPList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)ksp),PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested KSP type %s",type);
   /* Destroy the previous private KSP context */
   if (ksp->ops->destroy) {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&KSPList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&KSPList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/ksp/pc/impls/gamg/gamg.c

   PetscErrorCode ierr,(*r)(PC);
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)pc),GAMGList,type,PETSC_FALSE,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(GAMGList,type,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown GAMG type %s given",type);
   ierr = (*r)(pc);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 
   /* register AMG type */
   if (!GAMGList) {
-    ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&GAMGList,GAMGGEO,"PCCreateGAMG_GEO",(void (*)(void))PCCreateGAMG_GEO);CHKERRQ(ierr);
-    ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&GAMGList,GAMGAGG,"PCCreateGAMG_AGG",(void (*)(void))PCCreateGAMG_AGG);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(&GAMGList,GAMGGEO,"PCCreateGAMG_GEO",(void (*)(void))PCCreateGAMG_GEO);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(&GAMGList,GAMGAGG,"PCCreateGAMG_AGG",(void (*)(void))PCCreateGAMG_AGG);CHKERRQ(ierr);
   }
 
   /* overwrite the pointers of PCMG by the functions of base class PCGAMG */

File src/ksp/pc/interface/pcset.c

   ierr = PetscObjectTypeCompare((PetscObject)pc,type,&match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)pc),PCList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(PCList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)pc),PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PC type %s",type);
   /* Destroy the previous private PC context */
   if (pc->ops->destroy) {

File src/ksp/pc/interface/precon.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PCList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PCList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/mat/coarsen/coarsen.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatCoarsenList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatCoarsenList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
     coarser->setupcalled  = 0;
   }
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)coarser),MatCoarsenList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(MatCoarsenList,type,(void (**)(void)) &r);CHKERRQ(ierr);
 
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)coarser),PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown coarsen type %s",type);
 

File src/mat/color/color.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatColoringList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatColoringList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   if (flag) type = tname;
 
   ierr = PetscObjectGetComm((PetscObject)mat,&comm);CHKERRQ(ierr);
-  ierr = PetscFunctionListFind(comm,MatColoringList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(MatColoringList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)mat),PETSC_ERR_ARG_OUTOFRANGE,"Unknown or unregistered type: %s",type);
 
   ierr = PetscLogEventBegin(MAT_GetColoring,mat,0,0,0);CHKERRQ(ierr);

File src/mat/impls/mffd/mffd.c

     ierr = (*ctx->ops->destroy)(ctx);CHKERRQ(ierr);
   }
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)ctx),MatMFFDList,ftype,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(MatMFFDList,ftype,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown MatMFFD type %s given",ftype);
   ierr = (*r)(ctx);CHKERRQ(ierr);
   ierr = PetscObjectChangeTypeName((PetscObject)ctx,ftype);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatMFFDList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatMFFDList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/mat/interface/matreg.c

   ierr = PetscObjectTypeCompare((PetscObject)mat,matype,&sametype);CHKERRQ(ierr);
   if (sametype) PetscFunctionReturn(0);
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)mat),MatList,matype,PETSC_TRUE,(void(**)(void))&r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(MatList,matype,(void(**)(void))&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown Mat type given: %s",matype);
 
   /* free the old data structure if it existed */
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/mat/order/sorder.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatOrderingList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatOrderingList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   if (mmat != nmat) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_ARG_WRONG,"Must be square matrix, rows %D columns %D",mmat,nmat);
 
   if (!MatOrderingRegisterAllCalled) {ierr = MatOrderingRegisterAll();CHKERRQ(ierr);}
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)mat),MatOrderingList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(MatOrderingList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,"Unknown or unregistered type: %s",type);
 
   ierr = PetscLogEventBegin(MAT_GetOrdering,mat,0,0,0);CHKERRQ(ierr);

File src/mat/partition/partition.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&MatPartitioningList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&MatPartitioningList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
     part->setupcalled  = 0;
   }
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)part),MatPartitioningList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(MatPartitioningList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PetscObjectComm((PetscObject)part),PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown partitioning type %s",type);
 
   part->ops->destroy = (PetscErrorCode (*)(MatPartitioning)) 0;

File src/snes/interface/snes.c

   ierr = PetscObjectTypeCompare((PetscObject)snes,type,&match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)snes),SNESList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(SNESList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested SNES type %s",type);
   /* Destroy the previous private SNES context */
   if (snes->ops->destroy) {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&SNESList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&SNESList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/snes/linesearch/interface/linesearch.c

   ierr = PetscObjectTypeCompare((PetscObject)linesearch,type,&match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)linesearch),SNESLineSearchList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(SNESLineSearchList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested Line Search type %s",type);
   /* Destroy the previous private linesearch context */
   if (linesearch->ops->destroy) {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&SNESLineSearchList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&SNESLineSearchList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }

File src/sys/classes/draw/interface/drawreg.c

     draw->data         = 0;
   }
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)draw),PetscDrawList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(PetscDrawList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown PetscDraw type given: %s",type);
   ierr       = PetscObjectChangeTypeName((PetscObject)draw,type);CHKERRQ(ierr);
   draw->data = 0;
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PetscDrawList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PetscDrawList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/sys/classes/random/interface/randreg.c

   ierr = PetscObjectTypeCompare((PetscObject)rnd, type, &match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)rnd),PetscRandomList,  type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(PetscRandomList,  type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown random type: %s", type);
 
   if (rnd->ops->destroy) {
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PetscRandomList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PetscRandomList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/sys/classes/viewer/interface/viewreg.c

   }
   ierr = PetscMemzero(viewer->ops,sizeof(struct _PetscViewerOps));CHKERRQ(ierr);
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)viewer),PetscViewerList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(PetscViewerList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown PetscViewer type given: %s",type);
 
   ierr = PetscObjectChangeTypeName((PetscObject)viewer,type);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PetscViewerList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PetscViewerList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/sys/dll/reg.c

 #include <petsc-private/petscimpl.h>           /*I "petscsys.h" I*/
 #include <petscviewer.h>
 
-#undef __FUNCT__
-#define __FUNCT__ "PetscFunctionListGetPathAndFunction"
-PetscErrorCode  PetscFunctionListGetPathAndFunction(const char name[],char *path[],char *function[])
-{
-  PetscErrorCode ierr;
-  char           work[PETSC_MAX_PATH_LEN],*lfunction;
-
-  PetscFunctionBegin;
-  ierr = PetscStrncpy(work,name,sizeof(work));CHKERRQ(ierr);
-
-  work[sizeof(work) - 1] = 0;
-
-  ierr = PetscStrchr(work,':',&lfunction);CHKERRQ(ierr);
-  if (lfunction != work && lfunction && lfunction[1] != ':') {
-    lfunction[0] = 0;
-
-    ierr = PetscStrallocpy(work,path);CHKERRQ(ierr);
-    ierr = PetscStrallocpy(lfunction+1,function);CHKERRQ(ierr);
-  } else {
-    *path = 0;
-    ierr  = PetscStrallocpy(name,function);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}
-
 /*
     This is the default list used by PETSc with the PetscDLLibrary register routines
 */
 /* ------------------------------------------------------------------------------*/
 struct _n_PetscFunctionList {
   void              (*routine)(void);    /* the routine */
-  char              *path;               /* path of link library containing routine */
   char              *name;               /* string to identify routine */
-  char              *rname;              /* routine name in dynamic library */
+  char              *rname;              /* string version of routine name */
   PetscFunctionList next;                /* next pointer */
   PetscFunctionList next_list;           /* used to maintain list of all lists for freeing */
 };
    PetscFunctionListAdd - Given a routine and a string id, saves that routine in the
    specified registry.
 
-     Formally Collective on MPI_Comm
+     Not Collective
 
    Input Parameters:
-+  comm  - the comm where this exists (currently not used)
-.  fl    - pointer registry
++  fl    - pointer registry
 .  name  - string to identify routine
 .  rname - routine name in dynamic library
 -  fnc   - function pointer (optional if using dynamic libraries)
    for that particular component (e.g., SNESRegister()) instead of
    calling PetscFunctionListAdd() directly.
 
-   ${PETSC_ARCH}, ${PETSC_DIR}, ${PETSC_LIB_DIR}, or ${any environmental variable}
-  occuring in pathname will be replaced with appropriate values.
-
-   Level: developer
+    Level: developer
 
 .seealso: PetscFunctionListDestroy(), SNESRegister(), KSPRegister(),
           PCRegister(), TSRegister(), PetscFunctionList
 @*/
-PetscErrorCode  PetscFunctionListAdd(MPI_Comm comm,PetscFunctionList *fl,const char name[],const char rname[],void (*fnc)(void))
+PetscErrorCode  PetscFunctionListAdd(PetscFunctionList *fl,const char name[],const char rname[],void (*fnc)(void))
 {
   PetscFunctionList entry,ne;
   PetscErrorCode    ierr;
-  char              *fpath,*fname;
 
   PetscFunctionBegin;
   if (!*fl) {
     ierr           = PetscNew(struct _n_PetscFunctionList,&entry);CHKERRQ(ierr);
     ierr           = PetscStrallocpy(name,&entry->name);CHKERRQ(ierr);
-    ierr           = PetscFunctionListGetPathAndFunction(rname,&fpath,&fname);CHKERRQ(ierr);
-    entry->path    = fpath;
-    entry->rname   = fname;
+    ierr           = PetscStrallocpy(rname,&entry->rname);CHKERRQ(ierr);
     entry->routine = fnc;
     entry->next    = 0;
     *fl            = entry;
 
       ierr = PetscStrcmp(ne->name,name,&founddup);CHKERRQ(ierr);
       if (founddup) { /* found duplicate */
-        ierr = PetscFunctionListGetPathAndFunction(rname,&fpath,&fname);CHKERRQ(ierr);
-        ierr = PetscFree(ne->path);CHKERRQ(ierr);
-        ierr = PetscFree(ne->rname);CHKERRQ(ierr);
-
-        ne->path    = fpath;
-        ne->rname   = fname;
+        ierr        = PetscFree(ne->rname);CHKERRQ(ierr);
+        ierr        = PetscStrallocpy(rname,&ne->rname);CHKERRQ(ierr);
         ne->routine = fnc;
         PetscFunctionReturn(0);
       }
     /* create new entry and add to end of list */
     ierr           = PetscNew(struct _n_PetscFunctionList,&entry);CHKERRQ(ierr);
     ierr           = PetscStrallocpy(name,&entry->name);CHKERRQ(ierr);
-    ierr           = PetscFunctionListGetPathAndFunction(rname,&fpath,&fname);CHKERRQ(ierr);
-    entry->path    = fpath;
-    entry->rname   = fname;
+    ierr           = PetscStrallocpy(rname,&entry->rname);CHKERRQ(ierr);
     entry->routine = fnc;
     entry->next    = 0;
     ne->next       = entry;
   entry = *fl;
   while (entry) {
     next  = entry->next;
-    ierr  = PetscFree(entry->path);CHKERRQ(ierr);
     ierr  = PetscFree(entry->name);CHKERRQ(ierr);
     ierr  = PetscFree(entry->rname);CHKERRQ(ierr);
     ierr  = PetscFree(entry);CHKERRQ(ierr);
 #undef __FUNCT__
 #define __FUNCT__ "PetscFunctionListFind"
 /*@C
-    PetscFunctionListFind - Given a name, finds the matching routine.
+    PetscFunctionListFind - Given a name registered to a function
 
     Input Parameters:
 +   fl   - pointer to list
-.   comm - processors looking for routine
-.   name - name string
--   searchlibraries - if not found in the list then search the dynamic libraries and executable for the symbol
+-   name - either the name registered for the function or the name of the function
 
     Output Parameters:
-.   r - the routine
+.   r - the function pointer if name was found else NULL
 
     Level: developer
 
 .seealso: PetscFunctionListAddDynamic(), PetscFunctionList
 @*/
-PetscErrorCode  PetscFunctionListFind(MPI_Comm comm,PetscFunctionList fl,const char name[],PetscBool searchlibraries,void (**r)(void))
+PetscErrorCode  PetscFunctionListFind(PetscFunctionList fl,const char name[],void (**r)(void))
 {
   PetscFunctionList entry = fl;
   PetscErrorCode    ierr;
-  char              *function,*path;
-  PetscBool         flg,f1,f2,f3;
-#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
-  char              *newpath;
-#endif
+  PetscBool         flg1,flg2;
 
   PetscFunctionBegin;
   if (!name) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_ARG_NULL,"Trying to find routine with null name");
 
   *r = 0;
-  ierr = PetscFunctionListGetPathAndFunction(name,&path,&function);CHKERRQ(ierr);
-
-  /*
-        If path then append it to search libraries
-  */
-#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
-  if (path) {
-    ierr = PetscDLLibraryAppend(comm,&PetscDLLibrariesLoaded,path);CHKERRQ(ierr);
-  }
-#endif
-
   while (entry) {
-    flg = PETSC_FALSE;
-    if (path && entry->path) {
-      ierr = PetscStrcmp(path,entry->path,&f1);CHKERRQ(ierr);
-      ierr = PetscStrcmp(function,entry->rname,&f2);CHKERRQ(ierr);
-      ierr = PetscStrcmp(function,entry->name,&f3);CHKERRQ(ierr);
-      flg  =  (PetscBool) ((f1 && f2) || (f1 && f3));
-    } else if (!path) {
-      ierr = PetscStrcmp(function,entry->name,&f1);CHKERRQ(ierr);
-      ierr = PetscStrcmp(function,entry->rname,&f2);CHKERRQ(ierr);
-      flg  =  (PetscBool) (f1 || f2);
-    } else {
-      ierr = PetscStrcmp(function,entry->name,&flg);CHKERRQ(ierr);
-      if (flg) {
-        ierr = PetscFree(function);CHKERRQ(ierr);
-        ierr = PetscStrallocpy(entry->rname,&function);CHKERRQ(ierr);
-      } else {
-        ierr = PetscStrcmp(function,entry->rname,&flg);CHKERRQ(ierr);
-      }
-    }
-
-    if (flg) {
-      if (entry->routine) {
-        *r   = entry->routine;
-        ierr = PetscFree(path);CHKERRQ(ierr);
-        ierr = PetscFree(function);CHKERRQ(ierr);
-        PetscFunctionReturn(0);
-      }
-      if (!(entry->rname && entry->rname[0])) { /* The entry has been cleared */
-        ierr = PetscFree(function);CHKERRQ(ierr);
-        PetscFunctionReturn(0);
-      }
-      if ((path && entry->path && f3) || (!path && f1)) { /* convert name of function (alias) to actual function name */
-        ierr = PetscFree(function);CHKERRQ(ierr);
-        ierr = PetscStrallocpy(entry->rname,&function);CHKERRQ(ierr);
-      }
-
-      /* it is not yet in memory so load from dynamic library */
-#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
-      newpath = path;
-      if (!path) newpath = entry->path;
-      ierr = PetscDLLibrarySym(comm,&PetscDLLibrariesLoaded,newpath,entry->rname,(void**)r);CHKERRQ(ierr);
-      if (*r) {
-        entry->routine = *r;
-
-        ierr = PetscFree(path);CHKERRQ(ierr);
-        ierr = PetscFree(function);CHKERRQ(ierr);
-        PetscFunctionReturn(0);
-      }
-#endif
+    ierr = PetscStrcmp(name,entry->name,&flg1);CHKERRQ(ierr);
+    ierr = PetscStrcmp(name,entry->rname,&flg2);CHKERRQ(ierr);
+    if (flg1 || flg2) {
+      *r   = entry->routine;
+      PetscFunctionReturn(0);
     }
     entry = entry->next;
   }
-
-#if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
-  if (searchlibraries) {
-    /* Function never registered; try for it anyway */
-    ierr = PetscDLLibrarySym(comm,&PetscDLLibrariesLoaded,path,function,(void**)r);CHKERRQ(ierr);
-    ierr = PetscFree(path);CHKERRQ(ierr);
-    if (*r) {
-      ierr = PetscFunctionListAdd(comm,&fl,name,name,*r);CHKERRQ(ierr);
-    }
-  }
-#endif
-  ierr = PetscFree(function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   if (!iascii) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_SUP,"Only ASCII viewer supported");
 
   while (list) {
-    if (list->path) {
-      ierr = PetscViewerASCIIPrintf(viewer," %s %s %s\n",list->path,list->name,list->rname);CHKERRQ(ierr);
-    } else {
-      ierr = PetscViewerASCIIPrintf(viewer," %s %s\n",list->name,list->rname);CHKERRQ(ierr);
-    }
+    ierr = PetscViewerASCIIPrintf(viewer," %s %s\n",list->name,list->rname);CHKERRQ(ierr);
     list = list->next;
   }
   ierr = PetscViewerASCIIPrintf(viewer,"\n");CHKERRQ(ierr);
    PetscFunctionListGet - Gets an array the contains the entries in PetscFunctionList, this is used
          by help etc.
 
-   Collective over MPI_Comm
+   Not Collective
 
    Input Parameter:
 .  list   - list of types
 PetscErrorCode  PetscFunctionListDuplicate(PetscFunctionList fl,PetscFunctionList *nl)
 {
   PetscErrorCode ierr;
-  char           path[PETSC_MAX_PATH_LEN];
 
   PetscFunctionBegin;
   while (fl) {
-    /* this is silly, rebuild the complete pathname */
-    if (fl->path) {
-      ierr = PetscStrcpy(path,fl->path);CHKERRQ(ierr);
-      ierr = PetscStrcat(path,":");CHKERRQ(ierr);
-      ierr = PetscStrcat(path,fl->name);CHKERRQ(ierr);
-    } else {
-      ierr = PetscStrcpy(path,fl->name);CHKERRQ(ierr);
-    }
-    ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,nl,path,fl->rname,fl->routine);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(nl,fl->name,fl->rname,fl->routine);CHKERRQ(ierr);
     fl   = fl->next;
   }
   PetscFunctionReturn(0);
 }
 
-
-#undef __FUNCT__
-#define __FUNCT__ "PetscFunctionListConcat"
-/*
-    PetscFunctionListConcat - joins name of a libary, and the path where it is located
-    into a single string.
-
-    Input Parameters:
-.   path   - path to the library name.
-.   name   - name of the library
-
-    Output Parameters:
-.   fullname - the name that is the union of the path and the library name,
-               delimited by a semicolon, i.e., path:name
-
-    Notes:
-    If the path is NULL, assumes that the name, specified also includes
-    the path as path:name
-
-*/
-PetscErrorCode  PetscFunctionListConcat(const char path[],const char name[],char fullname[])
-{
-  PetscErrorCode ierr;
-
-  PetscFunctionBegin;
-  if (path) {
-    ierr = PetscStrcpy(fullname,path);CHKERRQ(ierr);
-    ierr = PetscStrcat(fullname,":");CHKERRQ(ierr);
-    ierr = PetscStrcat(fullname,name);CHKERRQ(ierr);
-  } else {
-    ierr = PetscStrcpy(fullname,name);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}

File src/sys/objects/inherit.c

 
   PetscFunctionBegin;
   PetscValidHeader(obj,1);
-  ierr = PetscFunctionListAdd(obj->comm,&obj->qlist,name,fname,ptr);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&obj->qlist,name,fname,ptr);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
 
   PetscFunctionBegin;
   PetscValidHeader(obj,1);
-  ierr = PetscFunctionListFind(obj->comm,obj->qlist,name,PETSC_FALSE,ptr);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(obj->qlist,name,ptr);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/sys/threadcomm/interface/threadcomm.c

   if (!flg) {
     ierr = PetscStrcpy(ttype,type);CHKERRQ(ierr);
   }
-  ierr = PetscFunctionListFind(PETSC_COMM_WORLD,PetscThreadCommList,ttype,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(PetscThreadCommList,ttype,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PetscThreadComm type %s",ttype);
   ierr = (*r)(tcomm);CHKERRQ(ierr);
   ierr = PetscStrcmp(NOTHREAD,tcomm->type,&tcomm->isnothread);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PetscThreadCommList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PetscThreadCommList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/ts/adapt/interface/tsadapt.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&TSAdaptList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&TSAdaptList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   PetscErrorCode ierr,(*r)(TSAdapt);
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)adapt),TSAdaptList,type,PETSC_TRUE,(void(**)(void))&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSAdaptList,type,(void(**)(void))&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown TSAdapt type \"%s\" given",type);
   if (((PetscObject)adapt)->type_name) {ierr = (*adapt->ops->destroy)(adapt);CHKERRQ(ierr);}
   ierr = (*r)(adapt);CHKERRQ(ierr);

File src/ts/characteristic/interface/characteristic.c

     c->data         = 0;
   }
 
-  ierr =  PetscFunctionListFind(PetscObjectComm((PetscObject)c),CharacteristicList, type,PETSC_TRUE, (void (**)(void)) &r);CHKERRQ(ierr);
+  ierr =  PetscFunctionListFind(CharacteristicList, type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown Characteristic type given: %s", type);
   c->setupcalled = 0;
   ierr = (*r)(c);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&CharacteristicList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&CharacteristicList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

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

 
     ierr = PetscOptionsBool("-ufv_vtk_cellgeom","Write cell geometry (for debugging)","",vtkCellGeom,&vtkCellGeom,NULL);CHKERRQ(ierr);
     ierr = PetscOptionsList("-physics","Physics module to solve","",PhysicsList,physname,physname,sizeof physname,NULL);CHKERRQ(ierr);
-    ierr = PetscFunctionListFind(comm,PhysicsList,physname,PETSC_TRUE,(void(**)(void))&physcreate);CHKERRQ(ierr);
+    ierr = PetscFunctionListFind(PhysicsList,physname,(void(**)(void))&physcreate);CHKERRQ(ierr);
     ierr = PetscMemzero(phys,sizeof(struct _n_Physics));CHKERRQ(ierr);
     ierr = (*physcreate)(mod,phys);CHKERRQ(ierr);
     mod->maxspeed = phys->maxspeed;
     ierr = PetscOptionsBool("-ufv_split_faces","Split faces between cell sets","",splitFaces,&splitFaces,NULL);CHKERRQ(ierr);
     if (user->reconstruct) {
       ierr = PetscOptionsList("-ufv_limit","Limiter to apply to reconstructed solution","",LimitList,limitname,limitname,sizeof limitname,NULL);CHKERRQ(ierr);
-      ierr = PetscFunctionListFind(comm,LimitList,limitname,PETSC_TRUE,(void(**)(void))&user->Limit);CHKERRQ(ierr);
+      ierr = PetscFunctionListFind(LimitList,limitname,(void(**)(void))&user->Limit);CHKERRQ(ierr);
     }
     ierr = ModelFunctionalSetFromOptions(mod);CHKERRQ(ierr);
   }

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

   {
     PetscErrorCode (*pcreate)(Problem);
 
-    ierr = PetscFunctionListFind(,MPI_COMM_WORLD,plistpname,PETSC_FALSE,(void (**)(void))&pcreate);CHKERRQ(ierr);
+    ierr = PetscFunctionListFind(plistpname,(void (**)(void))&pcreate);CHKERRQ(ierr);
     if (!pcreate) SETERRQ1(PETSC_COMM_SELF,1,"No problem '%s'",pname);
     ierr = (*pcreate)(problem);CHKERRQ(ierr);
   }

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

   PetscErrorCode ierr;
 
   PetscFunctionBeginUser;
-  ierr = PetscFunctionListFind(PETSC_COMM_WORLD,flist,name,PETSC_FALSE,(void(**)(void))rsolve);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(flist,name,(void(**)(void))rsolve);CHKERRQ(ierr);
   if (!*rsolve) SETERRQ1(PETSC_COMM_SELF,1,"Riemann solver \"%s\" could not be found",name);
   PetscFunctionReturn(0);
 }
   PetscErrorCode ierr;
 
   PetscFunctionBeginUser;
-  ierr = PetscFunctionListFind(PETSC_COMM_WORLD,flist,name,PETSC_FALSE,(void(**)(void))r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(flist,name,(void(**)(void))r);CHKERRQ(ierr);
   if (!*r) SETERRQ1(PETSC_COMM_SELF,1,"Reconstruction \"%s\" could not be found",name);
   PetscFunctionReturn(0);
 }
   ierr = PetscOptionsEnd();CHKERRQ(ierr);
 
   /* Choose the limiter from the list of registered limiters */
-  ierr = PetscFunctionListFind(comm,limiters,lname,PETSC_FALSE,(void(**)(void))&ctx.limit);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(limiters,lname,(void(**)(void))&ctx.limit);CHKERRQ(ierr);
   if (!ctx.limit) SETERRQ1(PETSC_COMM_SELF,1,"Limiter '%s' not found",lname);CHKERRQ(ierr);
 
   /* Choose the physics from the list of registered models */
   {
     PetscErrorCode (*r)(FVCtx*);
-    ierr = PetscFunctionListFind(comm,physics,physname,PETSC_FALSE,(void(**)(void))&r);CHKERRQ(ierr);
+    ierr = PetscFunctionListFind(physics,physname,(void(**)(void))&r);CHKERRQ(ierr);
     if (!r) SETERRQ1(PETSC_COMM_SELF,1,"Physics '%s' not found",physname);CHKERRQ(ierr);
     /* Create the physics, will set the number of fields and their names */
     ierr = (*r)(&ctx);CHKERRQ(ierr);

File src/ts/impls/explicit/ssp/ssp.c

   TS_SSP         *ssp = (TS_SSP*)ts->data;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)ts),TSSSPList,type,PETSC_TRUE,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSSSPList,type,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown TS_SSP type %s given",type);
   ssp->onestep = r;
   ierr = PetscFree(ssp->type_name);CHKERRQ(ierr);
 
   PetscFunctionBegin;
   if (!TSSSPList) {
-    ierr = PetscFunctionListAdd(PetscObjectComm((PetscObject)ts),&TSSSPList,TSSSPRKS2,  "TSSSPStep_RK_2",   (void(*)(void))TSSSPStep_RK_2);CHKERRQ(ierr);
-    ierr = PetscFunctionListAdd(PetscObjectComm((PetscObject)ts),&TSSSPList,TSSSPRKS3,  "TSSSPStep_RK_3",   (void(*)(void))TSSSPStep_RK_3);CHKERRQ(ierr);
-    ierr = PetscFunctionListAdd(PetscObjectComm((PetscObject)ts),&TSSSPList,TSSSPRK104, "TSSSPStep_RK_10_4",(void(*)(void))TSSSPStep_RK_10_4);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(&TSSSPList,TSSSPRKS2,  "TSSSPStep_RK_2",   (void(*)(void))TSSSPStep_RK_2);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(&TSSSPList,TSSSPRKS3,  "TSSSPStep_RK_3",   (void(*)(void))TSSSPStep_RK_3);CHKERRQ(ierr);
+    ierr = PetscFunctionListAdd(&TSSSPList,TSSSPRK104, "TSSSPStep_RK_10_4",(void(*)(void))TSSSPStep_RK_10_4);CHKERRQ(ierr);
   }
 
   ts->ops->setup          = TSSetUp_SSP;

File src/ts/impls/implicit/gl/gl.c

     ierr = (*gl->Destroy)(gl);CHKERRQ(ierr);
   }
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)ts),TSGLList,type,PETSC_TRUE,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSGLList,type,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown TSGL type \"%s\" given",type);
   ierr = (*r)(ts);CHKERRQ(ierr);
   ierr = PetscStrcpy(gl->type_name,type);CHKERRQ(ierr);
   TS_GL              *gl = (TS_GL*)ts->data;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)ts),TSGLAcceptList,type,PETSC_TRUE,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSGLAcceptList,type,(PetscVoidStarFunction)&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown TSGLAccept type \"%s\" given",type);
   gl->Accept = r;
   ierr = PetscStrncpy(gl->accept_name,type,sizeof(gl->accept_name));CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&TSGLList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&TSGLList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&TSGLAcceptList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&TSGLAcceptList,sname,name,(void(*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/ts/impls/implicit/gl/gladapt.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&TSGLAdaptList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&TSGLAdaptList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   PetscErrorCode ierr,(*r)(TSGLAdapt);
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)adapt),TSGLAdaptList,type,PETSC_TRUE,(void(**)(void))&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSGLAdaptList,type,(void(**)(void))&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unknown TSGLAdapt type \"%s\" given",type);
   if (((PetscObject)adapt)->type_name) {ierr = (*adapt->ops->destroy)(adapt);CHKERRQ(ierr);}
   ierr = (*r)(adapt);CHKERRQ(ierr);

File src/ts/interface/tsreg.c

   ierr = PetscObjectTypeCompare((PetscObject) ts, type, &match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)ts),TSList, type,PETSC_TRUE, (void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(TSList, type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown TS type: %s", type);
   if (ts->ops->destroy) {
     ierr = (*(ts)->ops->destroy)(ts);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&TSList, sname, name, (void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&TSList, sname, name, (void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/vec/is/ao/interface/aoreg.c

   if (match) PetscFunctionReturn(0);
 
   if (!AORegisterAllCalled) {ierr = AORegisterAll();CHKERRQ(ierr);}
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)ao), AOList, method,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(AOList, method,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown AO type: %s", method);
   if (ao->ops->destroy) {
     ierr             = (*ao->ops->destroy)(ao);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&AOList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&AOList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

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

   if (match) PetscFunctionReturn(0);
 
   if (!ISRegisterAllCalled) {ierr = ISRegisterAll();CHKERRQ(ierr);}
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)is),ISList, method,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(ISList, method,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown IS type: %s", method);
   if (is->ops->destroy) {
     ierr = (*is->ops->destroy)(is);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&ISList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&ISList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

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

   ierr = PetscObjectTypeCompare((PetscObject)sf,type,&match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)sf),PetscSFunctionList,type,PETSC_TRUE,(void (**)(void))&r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(PetscSFunctionList,type,(void (**)(void))&r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PetscSF type %s",type);
   /* Destroy the previous private PetscSF context */
   if (sf->ops->Destroy) {

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

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PetscSFunctionList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PetscSFunctionList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 

File src/vec/pf/interface/pf.c

   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&PFunctionList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&PFunctionList,sname,name,(void (*)(void))function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }
 
   pf->data = 0;
 
   /* Determine the PFCreateXXX routine for a particular function */
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)pf),PFunctionList,type,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(PFunctionList,type,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE,"Unable to find requested PF type %s",type);
   pf->ops->destroy  = 0;
   pf->ops->view     = 0;

File src/vec/vec/interface/vecreg.c

   ierr = PetscObjectTypeCompare((PetscObject) vec, method, &match);CHKERRQ(ierr);
   if (match) PetscFunctionReturn(0);
 
-  ierr = PetscFunctionListFind(PetscObjectComm((PetscObject)vec),VecList,  method,PETSC_TRUE,(void (**)(void)) &r);CHKERRQ(ierr);
+  ierr = PetscFunctionListFind(VecList,  method,(void (**)(void)) &r);CHKERRQ(ierr);
   if (!r) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown vector type: %s", method);
   if (vec->ops->destroy) {
     ierr = (*vec->ops->destroy)(vec);CHKERRQ(ierr);
   PetscErrorCode ierr;
 
   PetscFunctionBegin;
-  ierr = PetscFunctionListAdd(PETSC_COMM_WORLD,&VecList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
+  ierr = PetscFunctionListAdd(&VecList, sname, name, (void (*)(void)) function);CHKERRQ(ierr);
   PetscFunctionReturn(0);
 }