Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/ohana.h
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/ohana.h	(revision 37689)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/include/ohana.h	(revision 37690)
@@ -341,4 +341,5 @@
 char   *ohana_version          PROTO((void));
 
+int     dgaussjordan_pivot     PROTO((double **A, double **B, int N, int M, double minPivot));
 int     dgaussjordan           PROTO((double **A, double **B, int N, int M));
 int     fgaussjordan           PROTO((float **A, float **B, int n, int m));
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/gaussj.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/gaussj.c	(revision 37689)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/gaussj.c	(revision 37690)
@@ -3,5 +3,4 @@
 # define VERY_VERBOSE 0
 # define MAX_RANGE 1.0e16
-# define MIN_PIVOT 1.0e-7
 
 // Gauss-Jordan elimination using full pivots based on Press et al's description.  Substantially
@@ -10,8 +9,15 @@
 // than their implementation.  (largely based on version by William Kahan)
 
+int dgaussjordan (double **A, double **B, int N, int M) {
+
+# define myMIN_PIVOT 1.0e-7
+  int status = dgaussjordan_pivot (A, B, N, M, myMIN_PIVOT);
+  return status;
+}
+
 // MAX_RANGE is used to test for ill-conditioned input matrices.  For an ill-conditioned
 // matrix, one or more of the pivots trends towards zero.  Rather than allow this to go to the
 // numerical precision, I am raising an error if |growth| > 1e8
-int dgaussjordan (double **A, double **B, int N, int M) {
+int dgaussjordan_pivot (double **A, double **B, int N, int M, double MIN_PIVOT) {
 
   int *colIndex;
@@ -106,4 +112,5 @@
     double tmpval = 1.0 / A[maxcol][maxcol];
 
+# if (0)
     if (fabs(A[maxcol][maxcol]) < MIN_PIVOT) {
       // we are ill-conditioned.  set this row & col to 0.0, 1.0 on pivot 
@@ -115,5 +122,5 @@
       continue;
     }
-
+# endif
 
     // XXX why is this here (don't I double count this element?) A[maxcol][maxcol] = 1.0;
Index: /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/vstats.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/vstats.c	(revision 37689)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/libohana/src/vstats.c	(revision 37690)
@@ -189,9 +189,9 @@
   for (i = ks; i < ke; i++) {
     M  = SQ (value[i] - Mo);
-    dM = SQ (dvalue[i]);
+    dM = dvalue ? SQ (dvalue[i]) : 1.0;
     X2 += M / dM;
     dS += M;
   }
-  X2 = X2 / (Nm - 1);
+  X2 = dvalue ? X2 / (Nm - 1) : NAN;
   dS = sqrt (dS / (Nm - 1));
 
