[cig-commits] r16672 - in short/3D/PyLith/trunk: . libsrc/problems libsrc/utils
brad at geodynamics.org
brad at geodynamics.org
Sat May 8 21:06:44 PDT 2010
Author: brad
Date: 2010-05-08 21:06:43 -0700 (Sat, 08 May 2010)
New Revision: 16672
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc
short/3D/PyLith/trunk/libsrc/utils/petscerror.h
Log:
Updated interfaces to PETSc error stuff.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2010-05-09 02:17:11 UTC (rev 16671)
+++ short/3D/PyLith/trunk/TODO 2010-05-09 04:06:43 UTC (rev 16672)
@@ -3,7 +3,6 @@
======================================================================
need Cygwin binbot
-need x86_64 binbot compatible w/libc 2.7
MAIN PRIORITIES
Modified: short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc 2010-05-09 02:17:11 UTC (rev 16671)
+++ short/3D/PyLith/trunk/libsrc/problems/SolverNonlinear.cc 2010-05-09 04:06:43 UTC (rev 16672)
@@ -242,7 +242,8 @@
}
ierr = VecNorm(g,NORM_2,gnorm);CHKERRQ(ierr);
if (PetscIsInfOrNanReal(*gnorm))
- SETERRQ(PETSC_ERR_FP, "User provided compute function generated a "
+ SETERRQ(PETSC_COMM_SELF,
+ PETSC_ERR_FP, "User provided compute function generated a "
"Not-a-Number");
ierr = PetscInfo2(snes,"Initial fnorm %G gnorm %G\n",fnorm,*gnorm);CHKERRQ(ierr);
if (.5*(*gnorm)*(*gnorm) <= .5*fnorm*fnorm + neP->alpha*initslope) {
@@ -279,7 +280,7 @@
PetscFunctionReturn(0);
} // if
ierr = VecNorm(g,NORM_2,gnorm);CHKERRQ(ierr);
- if PetscIsInfOrNanReal(*gnorm) SETERRQ(PETSC_ERR_FP,"User provided compute function generated a Not-a-Number");
+ if PetscIsInfOrNanReal(*gnorm) SETERRQ(PETSC_COMM_SELF, PETSC_ERR_FP,"User provided compute function generated a Not-a-Number");
ierr = PetscInfo1(snes,"gnorm after quadratic fit %G\n",*gnorm);CHKERRQ(ierr);
if (.5*(*gnorm)*(*gnorm) < .5*fnorm*fnorm + lambda*neP->alpha*initslope) { /* sufficient reduction */
ierr = PetscInfo1(snes,"Quadratically determined step, lambda=%18.16e\n",lambda);CHKERRQ(ierr);
@@ -341,7 +342,8 @@
} // if
ierr = VecNorm(g,NORM_2,gnorm);CHKERRQ(ierr);
if (PetscIsInfOrNanReal(*gnorm))
- SETERRQ(PETSC_ERR_FP,"User provided compute function generated a "
+ SETERRQ(PETSC_COMM_SELF,
+ PETSC_ERR_FP,"User provided compute function generated a "
"Not-a-Number");
if (.5*(*gnorm)*(*gnorm) < .5*fnorm*fnorm + lambda*neP->alpha*initslope) {
// is reduction enough?
@@ -374,7 +376,8 @@
}
ierr = VecNormBegin(g,NORM_2,gnorm);CHKERRQ(ierr);
if (PetscIsInfOrNanReal(*gnorm))
- SETERRQ(PETSC_ERR_FP, "User provided compute function generated a "
+ SETERRQ(PETSC_COMM_SELF,
+ PETSC_ERR_FP, "User provided compute function generated a "
"Not-a-Number");
ierr = VecNormBegin(y,NORM_2,ynorm);CHKERRQ(ierr);
ierr = VecNormEnd(g,NORM_2,gnorm);CHKERRQ(ierr);
@@ -397,7 +400,8 @@
}
ierr = VecNormBegin(g,NORM_2,gnorm);CHKERRQ(ierr);
if (PetscIsInfOrNanReal(*gnorm))
- SETERRQ(PETSC_ERR_FP, "User provided compute function generated a "
+ SETERRQ(PETSC_COMM_SELF,
+ PETSC_ERR_FP, "User provided compute function generated a "
"Not-a-Number");
ierr = VecNormBegin(y,NORM_2,ynorm);CHKERRQ(ierr);
ierr = VecNormEnd(g,NORM_2,gnorm);CHKERRQ(ierr);
Modified: short/3D/PyLith/trunk/libsrc/utils/petscerror.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/petscerror.h 2010-05-09 02:17:11 UTC (rev 16671)
+++ short/3D/PyLith/trunk/libsrc/utils/petscerror.h 2010-05-09 04:06:43 UTC (rev 16672)
@@ -28,12 +28,12 @@
#define CHECK_PETSC_ERROR(err) \
if (err) { \
- PetscError(__LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
+ PetscError(PETSC_COMM_SELF, __LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
throw std::runtime_error("PETSc error."); }
#define CHECK_PETSC_ERROR_MSG(err, msg) \
if (err) { \
- PetscError(__LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
+ PetscError(PETSC_COMM_SELF, __LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
throw std::runtime_error(msg); }
#endif // pylith_utils_petscerror_h
More information about the CIG-COMMITS
mailing list