Index: /issm/trunk-jpl/src/c/solutions/ad_core.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/ad_core.cpp	(revision 13542)
+++ /issm/trunk-jpl/src/c/solutions/ad_core.cpp	(revision 13543)
@@ -33,4 +33,5 @@
 	int         num_independents;
 	char*       driver=NULL;
+	size_t   tape_stats[11];
 
 	/*state variables: */
@@ -288,11 +289,21 @@
 			xDelete(anEDF_for_solverx_p->dp_Z);
 			xDelete(anEDF_for_solverx_p->dpp_Z);
-
+	
+			/*Print statistics: {{{*/
+			tapestats(1,tape_stats); //reading of tape statistics
+			if(VerboseAutodiff()){
+				_pprintLine_("   ADOLC statistics: ");
+				_pprintLine_("   "<<setw(45)<<left<<"Number of independents: " <<tape_stats[0]);
+				_pprintLine_("   "<<setw(45)<<left<<"Number of dependents: " <<tape_stats[1]);
+				_pprintLine_("   "<<setw(45)<<left<<"Maximal number of live active variables: " <<tape_stats[2]);
+				_pprintLine_("   "<<setw(45)<<left<<"Size of value stack (number of overwrites): " <<tape_stats[3]);
+				_pprintLine_("   "<<setw(45)<<left<<"Buffer size (a multiple of eight): " <<tape_stats[4]);
+				_pprintLine_("   "<<setw(45)<<left<<"Total number of operations recorded: " <<tape_stats[5]);
+			}
+			if(VerboseAutodiff())_pprintLine_("   end AD core");
+			
 			/*Free resources: */
 			xDelete(xp);
 			xDelete(axp); 
-			
-			if(VerboseAutodiff())_pprintLine_("   end AD core");
-
 		#else
 			_error_("Should not be requesting AD drivers when an AD library is not available!");
Index: /issm/trunk-jpl/src/c/solutions/issm.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/issm.cpp	(revision 13542)
+++ /issm/trunk-jpl/src/c/solutions/issm.cpp	(revision 13543)
@@ -15,8 +15,4 @@
 	FILE *petscoptionsfid  = NULL;
 	bool  waitonlock       = false;
-
-	/*AD: */
-	bool autodiff=false;
-	size_t   tape_stats[11];
 
 	/*FemModel: */
@@ -75,11 +71,7 @@
 	pfclose(petscoptionsfid,petscfilename);
 
-	/*get parameters: */
-	femmodel->parameters->FindParam(&waitonlock,SettingsWaitonlockEnum);
-	femmodel->parameters->FindParam(&autodiff,AutodiffIsautodiffEnum);
-
-	/*Profiling: */
 	profiler->Tag(FinishInit);
 	
+	/*call cores: */
 	_pprintLine_("call computational core:");
 	profiler->Tag(StartCore); solutioncore(femmodel); profiler->Tag(FinishCore); 
@@ -91,22 +83,7 @@
 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
 	
-	/*If running AD, close our tape, print statistics: {{{*/
-	#ifdef _HAVE_ADOLC_
-	if(autodiff){
-		tapestats(1,tape_stats); //reading of tape statistics
-		if(VerboseAutodiff()){
-			_pprintLine_("   ADOLC statistics: ");
-			_pprintLine_("   "<<setw(45)<<left<<"Number of independents: " <<tape_stats[0]);
-			_pprintLine_("   "<<setw(45)<<left<<"Number of dependents: " <<tape_stats[1]);
-			_pprintLine_("   "<<setw(45)<<left<<"Maximal number of live active variables: " <<tape_stats[2]);
-			_pprintLine_("   "<<setw(45)<<left<<"Size of value stack (number of overwrites): " <<tape_stats[3]);
-			_pprintLine_("   "<<setw(45)<<left<<"Buffer size (a multiple of eight): " <<tape_stats[4]);
-			_pprintLine_("   "<<setw(45)<<left<<"Total number of operations recorded: " <<tape_stats[5]);
-		}
-	}
-	#endif  /*}}}*/
-
 	/*Close output and petsc options file and write lock file if requested*/
 	pfclose(output_fid,lockfilename);
+	femmodel->parameters->FindParam(&waitonlock,SettingsWaitonlockEnum);
 	if (waitonlock>0){
 		_pprintLine_("write lock file:");
