Index: /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 14329)
+++ /issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp	(revision 14330)
@@ -28,4 +28,9 @@
 	Observations *observations = NULL;
 
+	/*timing*/
+	double   start, finish;
+	double   start_core, finish_core;
+	double   start_init, finish_init;
+
 	/*Get my_rank: */
 	my_rank=IssmComm::GetRank();
@@ -33,4 +38,5 @@
 
 	/*Get some Options*/
+	MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime();
 	options->Get(&radius,"searchradius",0.);
 	options->Get(&mindata,"mindata",1);
@@ -38,5 +44,7 @@
 
 	/*Process observation dataset*/
+	MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime();
 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+	MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
 
 	/*Allocate output*/
@@ -47,4 +55,5 @@
 	options->Get(&output,"output",(char*)"prediction");
 
+	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
 	if(strcmp(output,"quadtree")==0){
 		observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
@@ -109,4 +118,5 @@
 		_error_("output '" << output << "' not supported yet");
 	}
+	MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
 
 	/*clean-up and Assign output pointer*/
@@ -116,4 +126,9 @@
 	*ppredictions = predictions;
 	*perror       = error;
+
+	MPI_Barrier(MPI_COMM_WORLD); finish=MPI_Wtime( );
+	_printf_(true,"\n   %-34s %f seconds  \n","Observation fitering elapsed time:",finish_init-start_init);
+	_printf_(true,"   %-34s %f seconds  \n","Kriging prediction elapsed time:",finish_core-start_core);
+	_printf_(true,"\n   %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60);
 	return 1;
 }/*}}}*/
Index: /issm/trunk-jpl/src/c/solutions/kriging.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutions/kriging.cpp	(revision 14329)
+++ /issm/trunk-jpl/src/c/solutions/kriging.cpp	(revision 14330)
@@ -8,7 +8,4 @@
 void ProcessArguments2(char** pbinfilename,char** poutbinfilename,char** plockfilename,char** prootpath,int argc,char **argv);
 void ProcessInputfile(IssmDouble **px,IssmDouble **py,IssmDouble **pdata,int *pnobs,IssmDouble **px_interp,IssmDouble **py_interp,int *pninterp,Options **poptions,FILE* fid);
-
-int my_rank;
-int num_procs;
 
 int main(int argc,char **argv){
@@ -26,6 +23,4 @@
 
 	MPI_Comm comm;
-	extern int my_rank;
-	extern int num_procs;
 
 	/*Input*/
@@ -47,13 +42,6 @@
 	/*Initialize environment (MPI, PETSC, MUMPS, etc ...)*/
 	comm=EnvironmentInit(argc,argv);
+	IssmComm::SetComm(comm);
 
-	MPI_Comm_size(comm,&num_procs);
-	MPI_Comm_rank(comm,&my_rank);
-
-	/*First process inputs*/
-	_pprintLine_("");
-	_pprintLine_("Ice Sheet System Model (" << PACKAGE_NAME << ") version " << PACKAGE_VERSION);
-	_pprintLine_("(website: " << PACKAGE_URL << " contact: " << PACKAGE_BUGREPORT << ")");
-	_pprintLine_("");
 	ProcessArguments2(&binfilename,&outbinfilename,&lockfilename,&rootpath,argc,argv);
 
@@ -68,5 +56,5 @@
 	_pprintLine_("write results to disk:");
 	Results *results = new Results();
-	if(my_rank==0){
+	if(IssmComm::GetRank()==0){
 		output_fid=pfopen(outbinfilename,"wb");
 		results->AddObject(new GenericExternalResult<double*>(results->Size()+1,0,predictions,ninterp,1,1,0));
