1. petsc
  2. PETSc
  3. petsc

Commits

Jed Brown  committed 7c97aab Merge

Merge branch 'jed/dll-options'

* jed/dll-options:
DLL: translate hyphens to dashes in basename for initializer
PetscPClose: include errno on failure
PetscHeaderDestroy: call PetscObjectDestroyOptionsHandlers

  • Participants
  • Parent commits 98e301f, cf4b33a
  • Branches master

Comments (0)

Files changed (3)

File src/sys/dll/dl.c

View file
   else {
     ierr = PetscInfo1(0,"Dynamic library %s does not have lib prefix\n",libname);CHKERRQ(ierr);
   }
+  for (s=basename; *s; s++) if (*s == '-') *s = '_';
   ierr = PetscStrlen(basename,&len);CHKERRQ(ierr);
   ierr = PetscStrcpy(registername,"PetscDLLibraryRegister_");CHKERRQ(ierr);
   ierr = PetscStrncat(registername,basename,len);CHKERRQ(ierr);

File src/sys/fileio/mpiuopen.c

View file
 */
 #include <petscsys.h>
 
+#include <errno.h>
+
 #undef __FUNCT__
 #define __FUNCT__ "PetscFOpen"
 /*@C
     while (fgets(buf,1024,fd)) ; /* wait till it prints everything */
     err = pclose(fd);
     if (rval) *rval = err;
-    else if (err) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_SYS,"pclose() failed with error code %D",err);
+    else if (err) SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_SYS,"pclose() failed with error code %d, errno %d",err,errno);
   }
   PetscFunctionReturn(0);
 }

File src/sys/objects/inherit.c

View file
 
     ierr = (*python_destroy)(python_context);CHKERRQ(ierr);
   }
+  ierr = PetscObjectDestroyOptionsHandlers(h);CHKERRQ(ierr);
   ierr = PetscObjectListDestroy(&h->olist);CHKERRQ(ierr);
   ierr = PetscCommDestroy(&h->comm);CHKERRQ(ierr);
   /* next destroy other things */
 #undef __FUNCT__
 #define __FUNCT__ "PetscObjectDestroyOptionsHandlers"
 /*@C
-    PetscObjectDestroyOptionsHandlers - Destroys all the option handlers attached to an objeft
+    PetscObjectDestroyOptionsHandlers - Destroys all the option handlers attached to an object
 
     Not Collective