Index: /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/classes/Dakota/IssmParallelDirectApplicInterface.cpp	(revision 22551)
@@ -24,5 +24,5 @@
 		if(world_rank!=0){
 			femmodel_init= new FemModel(argc,argv,evaluation_comm);
-			femmodel_init->profiler->Tag(STARTCORE);
+			femmodel_init->profiler->Start(CORE);
 		}
 
@@ -37,5 +37,5 @@
 
 			/*Wrap up: */
-			femmodel_init->profiler->Tag(FINISHCORE);
+			femmodel_init->profiler->Stop(CORE);
 			femmodel_init->CleanUp(); //only close file pointers on rank 0 of slave 1!
 
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 22551)
@@ -68,5 +68,5 @@
 	/*Start profiler: */
 	this->profiler=new Profiler();
-	profiler->Tag(START);
+	profiler->Start(TOTAL);
 
 	/*From command line arguments, retrieve different filenames needed to create the FemModel: */
@@ -74,7 +74,7 @@
 
 	/*Create femmodel from input files: */
-	profiler->Tag(STARTINIT);
+	profiler->Start(MPROCESSOR);
 	this->InitFromFiles(rootpath,binfilename,outbinfilename,petscfilename,lockfilename,restartfilename, solution_type,trace,NULL);
-	profiler->Tag(FINISHINIT);
+	profiler->Stop(MPROCESSOR);
 
 	/*Save communicator in the parameters dataset: */
@@ -142,7 +142,7 @@
 
 	/*Create femmodel from input files, with trace activated: */
-	profiler->Tag(STARTINIT);
+	profiler->Start(MPROCESSOR);
 	this->InitFromFiles(rootpath,inputfilename,outputfilename,toolkitsfilename,lockfilename,restartfilename, solution_type,traceon,X);
-	profiler->Tag(FINISHINIT);
+	profiler->Stop(MPROCESSOR);
 
 	#if defined(_HAVE_NEOPZ_) && !defined(_HAVE_ADOLC_)
@@ -253,13 +253,14 @@
 
 	/*Before we delete the profiler, report statistics for this run: */
-	profiler->Tag(FINISH);  //final tagging
+	profiler->Stop(TOTAL);  //final tagging
 	_printf0_("\n");
-	_printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->DeltaTime(STARTINIT,FINISHINIT) << "\n");
-	_printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->DeltaTime(STARTCORE,FINISHCORE) << "\n");
+	_printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->TotalTime(MPROCESSOR) << "\n");
+	_printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->TotalTime(CORE) << "\n");
+	_printf0_("   "<<setw(40)<<left<<"Solver elapsed time:"<<profiler->TotalTime(SOLVER) << "\n");
 	_printf0_("\n");
 	_printf0_("   Total elapsed time: "
-				<<profiler->DeltaTimeModHour(START,FINISH)<<" hrs "
-				<<profiler->DeltaTimeModMin(START,FINISH)<<" min "
-				<<profiler->DeltaTimeModSec(START,FINISH)<<" sec"
+				<<profiler->TotalTimeModHour(TOTAL)<<" hrs "
+				<<profiler->TotalTimeModMin(TOTAL)<<" min "
+				<<profiler->TotalTimeModSec(TOTAL)<<" sec"
 				);
 	_printf0_("\n");
@@ -826,12 +827,12 @@
 
 	/*run solution core: */
-	profiler->Tag(STARTCORE);   
+	profiler->Start(CORE);   
 	solutioncore(this); 
-	profiler->Tag(FINISHCORE);
+	profiler->Stop(CORE);
 
 	/*run AD core if needed: */
-	profiler->Tag(STARTADCORE); 
+	profiler->Start(ADCORE); 
 	ad_core(this);      
-	profiler->Tag(FINISHADCORE);
+	profiler->Stop(ADCORE);
 
 	/*some profiling results for the core: */
@@ -839,7 +840,7 @@
 	if(profiling){
 
-		solution_time=profiler->DeltaTime(STARTCORE,FINISHCORE);
-		solution_flops=profiler->DeltaFlops(STARTCORE,FINISHCORE);
-		solution_memory=profiler->Memory(FINISHCORE);
+		solution_time=profiler->TotalTime(CORE);
+		solution_flops=profiler->TotalFlops(CORE);
+		solution_memory=profiler->Memory(CORE);
 
 		_printf0_("Core solution elapsed time    : " << solution_time   << " Seconds\n");
@@ -853,7 +854,7 @@
 
 		#ifdef _HAVE_ADOLC_
-		solution_time=profiler->DeltaTime(STARTADCORE,FINISHADCORE);
-		solution_flops=profiler->DeltaFlops(STARTADCORE,FINISHADCORE);
-		solution_memory=profiler->Memory(FINISHADCORE);
+		solution_time=profiler->TotalTime(ADCORE);
+		solution_flops=profiler->TotalFlops(ADCORE);
+		solution_memory=profiler->Memory(ADCORE);
 
 		_printf0_("AD Solution elapsed time    : " << solution_time   << " Seconds\n");
@@ -4728,5 +4729,5 @@
 	/*Start profiler: */
 	this->profiler=new Profiler();
-	profiler->Tag(START);
+	profiler->Start(TOTAL);
 
 	/*From command line arguments, retrieve different filenames needed to create the FemModel: */
@@ -4734,7 +4735,7 @@
 	
 	/*Create femmodel from input files: */
-	profiler->Tag(STARTINIT);
+	profiler->Start(START);
 	this->InitFromBuffers((char*)buffer,buffersize,toolkits, solution_type,trace,NULL);
-	profiler->Tag(FINISHINIT);
+	profiler->Stop(MPROCESSOR);
 	
 	/*Save communicator in the parameters dataset: */
@@ -4754,13 +4755,13 @@
 	
 	/*Before we delete the profiler, report statistics for this run: */
-	profiler->Tag(FINISH);  //final tagging
+	profiler->Stop(TOTAL);  //final tagging
 	_printf0_("\n");
-	_printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->DeltaTime(STARTINIT,FINISHINIT) << "\n");
-	_printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->DeltaTime(STARTCORE,FINISHCORE) << "\n");
+	_printf0_("   "<<setw(40)<<left<<"FemModel initialization elapsed time:"<<profiler->TotalTime(MPROCESSOR) << "\n");
+	_printf0_("   "<<setw(40)<<left<<"Core solution elapsed time:"<<profiler->TotalTime(CORE) << "\n");
 	_printf0_("\n");
 	_printf0_("   Total elapsed time: "
-				<<profiler->DeltaTimeModHour(START,FINISH)<<" hrs "
-				<<profiler->DeltaTimeModMin(START,FINISH)<<" min "
-				<<profiler->DeltaTimeModSec(START,FINISH)<<" sec"
+				<<profiler->TotalTimeModHour(TOTAL)<<" hrs "
+				<<profiler->TotalTimeModMin(TOTAL)<<" min "
+				<<profiler->TotalTimeModSec(TOTAL)<<" sec"
 				);
 	_printf0_("\n");
Index: /issm/trunk-jpl/src/c/classes/Profiler.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Profiler.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/classes/Profiler.cpp	(revision 22551)
@@ -3,5 +3,5 @@
  */
 
-/*Include files: {{{*/
+/*Include files*/
 #ifdef HAVE_CONFIG_H
 	#include <config.h>
@@ -11,14 +11,16 @@
 
 #include "./Profiler.h"
-#include "./Params/DoubleParam.h"
 #include "../toolkits/toolkits.h"
-/*}}}*/
 
 /*Profiler constructors and destructors:*/
 Profiler::Profiler(){/*{{{*/
 	for(int i=0;i<MAXIMUMSIZE;i++){
-		this->time[i]  =NAN;
-		this->flops[i] =NAN;
-		this->memory[i]=NAN;
+		this->time[i]          = 0.;
+		this->time_start[i]    = 0.;
+		this->flops[i]         = 0.;
+		this->flops_start[i]   = 0.;
+		this->memory[i]        = 0.;
+		this->memory_start[i]  = 0.;
+		this->running[i]       = false;
 	}
 } /*}}}*/
@@ -42,9 +44,6 @@
 /*Object virtual functions definitions:*/
 void Profiler::DeepEcho(void){/*{{{*/
-
 	this->Echo();
-
-}
-/*}}}*/
+}/*}}}*/
 void Profiler::Echo(void){/*{{{*/
 
@@ -52,108 +51,99 @@
 	for(int i=0;i<MAXIMUMSIZE;i++){
 		_printf_("    Tag "<<i<<":\n");
-		_printf_("       flops:  "<<this->flops[i]<<"\n");
-		_printf_("       memory: "<<this->memory[i]<<"\n");
-		_printf_("       time:   "<<this->time[i]<<"\n");
-	}
-
-}
-/*}}}*/
-int  Profiler::Id(void){ return -1; }/*{{{*/
+		_printf_("       flops:   "<<this->flops[i]<<"\n");
+		_printf_("       memory:  "<<this->memory[i]<<"\n");
+		_printf_("       time:    "<<this->time[i]<<"\n");
+		_printf_("       running: "<<this->time[i]<<"\n");
+	}
+
+}
+/*}}}*/
+int  Profiler::Id(void){ /*{{{*/
+	return -1; 
+}
 /*}}}*/
 void Profiler::Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){ /*{{{*/
 
 	IssmDouble* pointer = NULL;
+	bool*       bpointer = NULL;
 
 	MARSHALLING_ENUM(ProfilerEnum);
 	pointer = &this->time[0];
-	MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
+	MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
 	pointer = &this->flops[0];
-	MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
+	MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
 	pointer = &this->memory[0];
-	MARSHALLING_DYNAMIC(pointer,IssmDouble,MAXIMUMSIZE);
+	MARSHALLING_DYNAMIC(pointer,IssmPDouble,MAXIMUMSIZE);
+	bpointer = &this->running[0];
+	MARSHALLING_DYNAMIC(bpointer,bool,MAXIMUMSIZE);
 
 } /*}}}*/
 int  Profiler::ObjectEnum(void){/*{{{*/
-
 	return ProfilerEnum;
-
-}
-/*}}}*/
+}/*}}}*/
 
 /*Profiler routines:*/
-IssmDouble  Profiler::DeltaFlops(int inittag, int finaltag){/*{{{*/
+IssmPDouble  Profiler::TotalFlops(int tag){/*{{{*/
+
+	/*Get tag*/
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
+
+	return this->flops[tag];
+}/*}}}*/
+IssmPDouble  Profiler::TotalTime(int tag){/*{{{*/
+
+	/*Get tag*/
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
+
+
+	#ifdef _HAVE_MPI_
+	return this->time[tag];
+	#else
+	return this->time[tag]/CLOCKS_PER_SEC;
+	#endif
+}
+/*}}}*/
+int Profiler::TotalTimeModHour(int tag){/*{{{*/
+
+	IssmPDouble delta = this->TotalTime(tag);
+	return int((reCast<int,IssmPDouble>(delta))/3600);
+
+}
+/*}}}*/
+int Profiler::TotalTimeModMin(int tag){/*{{{*/
+
+	IssmPDouble delta = this->TotalTime(tag);
+	return int(int(reCast<int,IssmPDouble>(delta))%3600/60);
+}
+/*}}}*/
+int Profiler::TotalTimeModSec(int tag){/*{{{*/
+
+	IssmPDouble delta = this->TotalTime(tag);
+	return int(reCast<int,IssmPDouble>(delta)%60);
+}
+/*}}}*/
+IssmDouble  Profiler::Memory(int tag){/*{{{*/
 
 	/*Get initial flops*/
-	_assert_(inittag>=0); 
-	_assert_(inittag<MAXIMUMSIZE); 
-	if(xIsNan<IssmDouble>(this->flops[inittag])) _error_("Tag not set");
-	IssmDouble init = this->flops[inittag];
-
-	/*Get final flops*/
-	_assert_(finaltag>=0); 
-	_assert_(finaltag<MAXIMUMSIZE); 
-	if(xIsNan<IssmDouble>(this->flops[finaltag])) _error_("Tag not set");
-	IssmDouble final = this->flops[finaltag];
-
-	return final-init;
-}
-/*}}}*/
-IssmDouble  Profiler::DeltaTime(int inittag, int finaltag){/*{{{*/
-
-	/*Get initial time*/
-	_assert_(inittag>=0); 
-	_assert_(inittag<MAXIMUMSIZE); 
-	if(xIsNan<IssmDouble>(this->time[inittag])) _error_("Tag "<<inittag<<" not set");
-	IssmDouble init = this->time[inittag];
-
-	/*Get final time*/
-	_assert_(finaltag>=0); 
-	_assert_(finaltag<MAXIMUMSIZE); 
-	if(xIsNan<IssmDouble>(this->time[finaltag])) _error_("Tag "<<finaltag<<" not set");
-	IssmDouble final = this->time[finaltag];
-
-	#ifdef _HAVE_MPI_
-	return final-init;
-	#else
-	return (final-init)/CLOCKS_PER_SEC;
-	#endif
-}
-/*}}}*/
-int Profiler::DeltaTimeModHour(int inittag, int finishtag){/*{{{*/
-
-	IssmDouble delta = this->DeltaTime(inittag,finishtag);
-	return int((reCast<int,IssmDouble>(delta))/3600);
-
-}
-/*}}}*/
-int Profiler::DeltaTimeModMin(int inittag, int finishtag){/*{{{*/
-
-	IssmDouble delta = this->DeltaTime(inittag,finishtag);
-	return int(int(reCast<int,IssmDouble>(delta))%3600/60);
-}
-/*}}}*/
-int Profiler::DeltaTimeModSec(int inittag, int finishtag){/*{{{*/
-
-	IssmDouble delta = this->DeltaTime(inittag,finishtag);
-	return int(reCast<int,IssmDouble>(delta)%60);
-}
-/*}}}*/
-IssmDouble  Profiler::Memory(int tag){/*{{{*/
-
-	/*Get initial flops*/
-	_assert_(tag>=0); 
-	_assert_(tag<MAXIMUMSIZE); 
-	if(xIsNan<IssmDouble>(this->flops[tag])) _error_("Tag not set");
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	if(this->running[tag]) _error_("Tag "<<tag<<" has not been stopped");
+
 	return this->memory[tag];
 }
 /*}}}*/
-void  Profiler::Tag(int tagenum,bool dontmpisync){/*{{{*/
-
-	IssmDouble t;
-	IssmDouble f;
-	IssmDouble m;
-
-	/*If mpisync requested, make sure all the cpus are at the same point 
-	 *in the execution: */
+void  Profiler::Start(int tag,bool dontmpisync){/*{{{*/
+
+	/*Check tag*/
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	if(this->running[tag]) _error_("Tag "<<tag<<" is already running");
+
+
+	/*If mpisync requested, make sure all the cpus are at the same point in the execution: */
 	if(!dontmpisync){
 		ISSM_MPI_Barrier(IssmComm::GetComm()); 
@@ -162,10 +152,12 @@
 	/*Capture time: */
 	#ifdef _HAVE_MPI_
-	t=ISSM_MPI_Wtime();
-	#else
-	t=(IssmPDouble)clock();
+	IssmPDouble t=ISSM_MPI_Wtime();
+	#else
+	IssmPDouble t=(IssmPDouble)clock();
 	#endif
 
 	/*Capture flops: */
+	IssmPDouble f = 0.;
+	IssmPDouble m = 0.;
 	#ifdef _HAVE_PETSC_
 		PetscGetFlops(&f);
@@ -176,13 +168,51 @@
 
 	/*Plug into this->time: */
-	_assert_(tagenum>=0); 
-	_assert_(tagenum<MAXIMUMSIZE); 
-	if(!xIsNan<IssmDouble>(this->time[tagenum])) _error_("Tag already exists");
-	this->time[tagenum]  = t;
-	if(!xIsNan<IssmDouble>(this->flops[tagenum])) _error_("Tag already exists");
-	this->flops[tagenum] = f;
-	if(!xIsNan<IssmDouble>(this->memory[tagenum])) _error_("Tag already exists");
-	this->memory[tagenum]= m;
-
-}
-/*}}}*/
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	this->time_start[tag]   = t;
+	this->flops_start[tag]  = f;
+	this->memory_start[tag] = m;
+
+	/*turn on running*/
+	this->running[tag] = true;
+}/*}}}*/
+void  Profiler::Stop(int tag,bool dontmpisync){/*{{{*/
+
+	/*Check tag*/
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	if(!this->running[tag]) _error_("Tag "<<tag<<" is not running");
+
+
+	/*If mpisync requested, make sure all the cpus are at the same point in the execution: */
+	if(!dontmpisync){
+		ISSM_MPI_Barrier(IssmComm::GetComm()); 
+	}
+
+	/*Capture time: */
+	#ifdef _HAVE_MPI_
+	IssmPDouble t=ISSM_MPI_Wtime();
+	#else
+	IssmPDouble t=(IssmPDouble)clock();
+	#endif
+
+	/*Capture flops: */
+	IssmPDouble f = 0.;
+	IssmPDouble m = 0.;
+	#ifdef _HAVE_PETSC_
+	PetscGetFlops(&f);
+	PetscMemoryGetCurrentUsage(&m);
+	#else
+	/*do nothing for now:*/
+	#endif
+
+	/*Plug into this->time: */
+	_assert_(tag>=0); 
+	_assert_(tag<MAXIMUMSIZE); 
+	this->time[tag]   += t - this->time_start[tag];
+	this->flops[tag]  += f - this->flops_start[tag];
+	this->memory[tag] += m - this->memory_start[tag];
+
+	/*turn off running*/
+	this->running[tag] = false;
+}/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Profiler.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Profiler.h	(revision 22550)
+++ /issm/trunk-jpl/src/c/classes/Profiler.h	(revision 22551)
@@ -7,49 +7,47 @@
 
 /*Headers:*/
-/*{{{*/
+#include "../shared/shared.h"
 #include "../datastructures/datastructures.h"
-#include "../shared/shared.h"
-/*}}}*/
 
-class DoubleParam;
-
-#define START 0
-#define STARTINIT 1
-#define FINISHINIT 2
-#define STARTCORE 3
-#define FINISHCORE 4
-#define STARTADCORE 5
-#define FINISHADCORE 6
-#define FINISH 7
-#define MAXIMUMSIZE 8 
+/*Macros*/
+#define TOTAL 0      /*Profiling Total time */ 
+#define MPROCESSOR 1 /*Profiling Model processor*/ 
+#define CORE 2       /*Profiling solution */ 
+#define SOLVER 3     /*Profiling solution */ 
+#define ADCORE 4     /*Profiling AD */ 
+#define MAXIMUMSIZE 5
 
 class Profiler: public Object{
 
 	public: 
-		IssmDouble flops[MAXIMUMSIZE];
-		IssmDouble memory[MAXIMUMSIZE];
-		IssmDouble time[MAXIMUMSIZE];
+		IssmPDouble flops[MAXIMUMSIZE];
+		IssmPDouble flops_start[MAXIMUMSIZE];
+		IssmPDouble memory[MAXIMUMSIZE];
+		IssmPDouble memory_start[MAXIMUMSIZE];
+		IssmPDouble time[MAXIMUMSIZE];
+		IssmPDouble time_start[MAXIMUMSIZE];
+		bool        running[MAXIMUMSIZE];
 
-		/*Profiler constructors, destructors {{{*/
+		/*Profiler constructors, destructors */
 		Profiler();
 		~Profiler();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{ */
+
+		/*Object virtual functions definitions*/
 		Object *copy();
 		void    DeepEcho();
 		void    Echo();
 		int     Id();
-		void Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
+		void    Marshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction);
 		int     ObjectEnum();
-		/*}}}*/
-		/*Profiler routines {{{*/
-		IssmDouble  DeltaFlops(int inittag, int finaltag);
-		IssmDouble  DeltaTime(int inittag, int finaltag);
-		int     DeltaTimeModHour(int inittag, int finaltag);
-		int     DeltaTimeModMin(int inittag, int finaltag);
-		int     DeltaTimeModSec(int inittag, int finaltag);
-		IssmDouble  Memory(int tag);
-		void    Tag(int tagenum,bool dontmpisync=false);
-		/*}}}*/
+
+		/*Profiler routines*/
+		IssmPDouble  TotalFlops(int tag);
+		IssmPDouble  TotalTime(int tag);
+		int          TotalTimeModHour(int tag);
+		int          TotalTimeModMin(int tag);
+		int          TotalTimeModSec(int tag);
+		IssmPDouble  Memory(int tag);
+		void         Start(int tagenum,bool dontmpisync=false);
+		void         Stop(int tagenum,bool dontmpisync=false);
 };
 
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_adjoint_linear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_adjoint_linear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_adjoint_linear.cpp	(revision 22551)
@@ -29,5 +29,9 @@
 	CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 	Reduceloadx(pf, Kfs, ys,true); delete Kfs; //true means spc = 0
+
+	femmodel->profiler->Start(SOLVER);
 	Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); delete Kff; delete pf; delete df;
+	femmodel->profiler->Stop(SOLVER);
+
 	Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters,true); delete ys; //true means spc0
 	InputUpdateFromSolutionx(femmodel,ug);
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_fct.cpp	(revision 22551)
@@ -404,5 +404,7 @@
 	
 	/*Go solve lower order solution*/
+	femmodel->profiler->Start(SOLVER);
 	SolverxPetsc(&u,LHS,RHS,NULL,NULL, femmodel->parameters); 
+	femmodel->profiler->Stop(SOLVER);
 	MatFree(&LHS);
 	VecFree(&RHS);
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 22551)
@@ -104,5 +104,9 @@
 				Reduceloadx(pf,Kfs,ys); delete Kfs;
 				delete uf_sed;
+
+				femmodel->profiler->Start(SOLVER);
 				Solverx(&uf_sed,Kff,pf,uf_sed_sub_iter,df,femmodel->parameters);
+				femmodel->profiler->Stop(SOLVER);
+
 				delete Kff; delete pf; delete df;
 				delete ug_sed;
@@ -186,5 +190,7 @@
 				Reduceloadx(pf,Kfs,ys); delete Kfs;
 				delete uf_epl;
+				femmodel->profiler->Start(SOLVER);
 				Solverx(&uf_epl,Kff,pf,uf_epl_sub_iter,df,femmodel->parameters);
+				femmodel->profiler->Stop(SOLVER);
 				delete Kff; delete pf; delete df;
 				delete uf_epl_sub_iter;
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la.cpp	(revision 22551)
@@ -64,5 +64,9 @@
 			CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 			Reduceloadx(pf, Kfs, ys); delete Kfs;
+
+			femmodel->profiler->Start(SOLVER);
 			Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 
+			femmodel->profiler->Stop(SOLVER);
+
 			delete Kff; delete pf; delete df;
 			Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys;
@@ -95,5 +99,9 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf, Kfs, ys); delete Kfs;
+
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 
+		femmodel->profiler->Stop(SOLVER);
+
 		delete Kff; delete pf; delete df;
 		Mergesolutionfromftogx(&pug, uf,ys,femmodel->nodes,femmodel->parameters); delete uf; delete ys;
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la_theta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la_theta.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_la_theta.cpp	(revision 22551)
@@ -59,5 +59,9 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf, Kfs, ys); delete Kfs;
+
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 
+		femmodel->profiler->Stop(SOLVER);
+
 		delete Kff; delete pf; delete df;
 		Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete uf; delete ys;
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_linear.cpp	(revision 22551)
@@ -35,5 +35,8 @@
 	CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 	Reduceloadx(pf, Kfs, ys); delete Kfs;
+
+	femmodel->profiler->Start(SOLVER);
 	Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); 
+	femmodel->profiler->Stop(SOLVER);
 	
 	/*Check that the solver converged nicely: */
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_newton.cpp	(revision 22551)
@@ -63,5 +63,7 @@
 			CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 			Reduceloadx(pf,Kfs,ys);delete Kfs;
+			femmodel->profiler->Start(SOLVER);
 			Solverx(&uf,Kff,pf,old_uf,df,femmodel->parameters);delete df; delete Kff; delete pf;
+			femmodel->profiler->Stop(SOLVER);
 			Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
 			InputUpdateFromSolutionx(femmodel,ug);
@@ -81,5 +83,7 @@
 
 		CreateJacobianMatrixx(&Jff,femmodel,kmax);
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&duf,Jff,pJf,NULL,NULL,femmodel->parameters); delete Jff; delete pJf;
+		femmodel->profiler->Stop(SOLVER);
 		uf->AXPY(duf, 1.0); delete duf;
 		Mergesolutionfromftogx(&ug,uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_nonlinear.cpp	(revision 22551)
@@ -67,5 +67,7 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf, Kfs, ys); delete Kfs;
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters);
+		femmodel->profiler->Stop(SOLVER);
 		Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
 
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_shakti_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_shakti_nonlinear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_shakti_nonlinear.cpp	(revision 22551)
@@ -52,5 +52,7 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf, Kfs, ys); delete Kfs;
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf, Kff, pf, old_uf, df, femmodel->parameters);
+		femmodel->profiler->Stop(SOLVER);
 		Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters);delete ys;
 
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp	(revision 22551)
@@ -68,5 +68,7 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf_horiz, Kfs_horiz, ys); delete Kfs_horiz;
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf_horiz, Kff_horiz, pf_horiz, old_uf_horiz, df_horiz,femmodel->parameters);
+		femmodel->profiler->Stop(SOLVER);
 		Mergesolutionfromftogx(&ug_horiz, uf_horiz,ys,femmodel->nodes,femmodel->parameters); delete ys;
 		InputUpdateFromSolutionx(femmodel,ug_horiz);
@@ -82,5 +84,7 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf_vert, Kfs_vert, ys); delete Kfs_vert;
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&uf_vert, Kff_vert, pf_vert, NULL, df_vert,femmodel->parameters); delete Kff_vert; delete pf_vert; delete df_vert;
+		femmodel->profiler->Stop(SOLVER);
 		Mergesolutionfromftogx(&ug_vert, uf_vert,ys,femmodel->nodes,femmodel->parameters);
 		delete uf_vert; 
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp	(revision 22550)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_thermal_nonlinear.cpp	(revision 22551)
@@ -77,5 +77,7 @@
 		CreateNodalConstraintsx(&ys,femmodel->nodes,configuration_type);
 		Reduceloadx(pf, Kfs, ys); delete Kfs;
+		femmodel->profiler->Start(SOLVER);
 		Solverx(&tf, Kff, pf, tf_old, df, femmodel->parameters);
+		femmodel->profiler->Stop(SOLVER);
 		Mergesolutionfromftogx(&tg, tf,ys,femmodel->nodes,femmodel->parameters); delete ys;
 		if(isenthalpy){ 
