Index: /issm/trunk/src/m/classes/clusters/castor.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/castor.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/castor.m	(revision 9565)
@@ -60,5 +60,4 @@
 			 modelname=md.name; 
 			 solution_type=md.solution_type; 
-			 mem_debug=md.mem_debug;
 
 			 %open file for writing: 
Index: /issm/trunk/src/m/classes/clusters/cosmos.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/cosmos.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/cosmos.m	(revision 9565)
@@ -60,5 +60,4 @@
 			 modelname=md.name; 
 			 solution_type=md.solution_type; 
-			 mem_debug=md.mem_debug;
 
 			 %open file for writing: 
Index: /issm/trunk/src/m/classes/clusters/gemini.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/gemini.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/gemini.m	(revision 9565)
@@ -60,5 +60,4 @@
 			 modelname=md.name; 
 			 solution_type=md.solution_type; 
-			 mem_debug=md.mem_debug;
 
 			 %open file for writing: 
Index: /issm/trunk/src/m/classes/clusters/generic.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/generic.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/generic.m	(revision 9565)
@@ -74,5 +74,6 @@
 			 modelname=md.name;
 			 solution_type=md.solution_type;
-			 mem_debug=md.mem_debug;
+			 isvalgrind=md.debug.valgrind;
+			 isgprof=md.debug.gprof;
 
 			 %open file for writing: 
@@ -81,5 +82,5 @@
 			 %write instructions for launching a job on the cluster
 			 fprintf(fid,'#!/bin/sh\n');
-			 if mem_debug==0,
+			 if ~isvalgrind,
 				 if cluster.interactive
 					 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',...
@@ -95,5 +96,5 @@
 			 end
 
-			 if md.gprof,
+			 if isgprof,
 				 fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
 			 end
Index: /issm/trunk/src/m/classes/clusters/pfe.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/pfe.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/pfe.m	(revision 9565)
@@ -110,5 +110,5 @@
 			 modelname=md.name; 
 			 solution_type=md.solution_type; 
-			 mem_debug=md.mem_debug;
+			 isvalgrind=md.debug.valgrind;
 
 			 %compute number of processors
@@ -151,5 +151,5 @@
 			 if cluster.interactive,
 				 fid=fopen([modelname '.run'],'w');
-				 if ~mem_debug,
+				 if ~isvalgrind,
 					 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname);
 				 else
Index: /issm/trunk/src/m/classes/clusters/pollux.m
===================================================================
--- /issm/trunk/src/m/classes/clusters/pollux.m	(revision 9564)
+++ /issm/trunk/src/m/classes/clusters/pollux.m	(revision 9565)
@@ -60,5 +60,4 @@
 			 modelname=md.name; 
 			 solution_type=md.solution_type; 
-			 mem_debug=md.mem_debug;
 
 			 %open file for writing: 
Index: /issm/trunk/src/m/classes/model/model.m
===================================================================
--- /issm/trunk/src/m/classes/model/model.m	(revision 9564)
+++ /issm/trunk/src/m/classes/model/model.m	(revision 9565)
@@ -12,4 +12,5 @@
 		 results = modelfield('default',0,'marshall',false);
 		 solver  = modelfield('default',0,'marshall',false);
+		 debug   = modelfield('default',0,'marshall',false);
 
 		 %FIXME: all other fields should belong to other classes
@@ -198,7 +199,4 @@
 		 %Output
 		 requested_outputs               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 %Debugging
-		 mem_debug                      = modelfield('default',0,'marshall',false);
-		 gprof                          = modelfield('default',0,'marshall',false);
 		 %Results fields
 		 output_frequency               = modelfield('default',0,'marshall',true,'format','Integer');
