Index: trunk/psModules/src/detrend/pmPattern.c
===================================================================
--- trunk/psModules/src/detrend/pmPattern.c	(revision 35270)
+++ trunk/psModules/src/detrend/pmPattern.c	(revision 36085)
@@ -1222,6 +1222,8 @@
     }
     double max_XX = 0;
+#if (PS_TRACE_ON)
     double solution_V = 0;
     int i_peak = -1;
+#endif
     for (int i = 0; i < numChips + 4; i++) { // If any cells have no value of themself, set the matrix to 1.0.
       if (XX->data.F64[i][i] == 0.0) {
@@ -1230,6 +1232,8 @@
       if (XX->data.F64[i][i] > max_XX) {
 	max_XX = XX->data.F64[i][i];
+#if (PS_TRACE_ON)
 	solution_V = solution->data.F64[i];
 	i_peak = i;
+#endif
       }
     }
