Index: issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/BamgConvertMeshx/BamgConvertMeshx.cpp	(revision 12511)
@@ -24,11 +24,11 @@
 
 	// read mesh
-	if(verbose) printf("Reading mesh\n");
+	if(verbose) _printLine_("Reading mesh");
 	Mesh Th(index,x,y,nods,nels); 
 
 	//write mesh and geometry
-	if (verbose) printf("Write Geometry\n");
+	if (verbose) _printLine_("Write Geometry");
 	Th.Gh.WriteGeometry(bamggeom,bamgopts);
-	if (verbose) printf("Write Mesh\n");
+	if (verbose) _printLine_("Write Mesh");
 	Th.WriteMesh(bamgmesh,bamgopts);
 
Index: issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12511)
@@ -41,6 +41,6 @@
 
 		//Step1: generate geometry Gh
-		if (verbosity>0) printf("Construction of a mesh from a given geometry\n");
-		if (verbosity>1) printf("   Processing geometry...\n");
+		if (verbosity>0) _printLine_("Construction of a mesh from a given geometry");
+		if (verbosity>1) _printLine_("   Processing geometry...");
 		Geometry Gh(bamggeom_in,bamgopts);
 
@@ -50,5 +50,5 @@
 
 		//build metric using geometry
-		if (verbosity>1) printf("   Generating Metric...\n");
+		if (verbosity>1) _printLine_("   Generating Metric...");
 		for(i=0;i<Gh.nbv;i++){
 			Metric M=Gh[i];
@@ -60,5 +60,5 @@
 
 		//generate mesh
-		if (verbosity>1) printf("   Generating Mesh...\n");
+		if (verbosity>1) _printLine_("   Generating Mesh...");
 		Mesh Th(maxnbv,Gh,bamgopts);
 
@@ -73,7 +73,7 @@
 
 		//Build output
-		if (verbosity>1) printf("   Write Mesh...\n");
+		if (verbosity>1) _printLine_("   Write Mesh...");
 		Th.WriteMesh(bamgmesh_out,bamgopts);
-		if (verbosity>1) printf("   Write Geometry...\n");
+		if (verbosity>1) _printLine_("   Write Geometry...");
 		Gh.WriteGeometry(bamggeom_out,bamgopts);
 
@@ -87,6 +87,6 @@
 
 		// read background mesh 
-		if (verbosity>0) printf("Anisotropic mesh adaptation\n");
-		if (verbosity>1) printf("   Processing initial mesh and geometry...\n");
+		if (verbosity>0) _printLine_("Anisotropic mesh adaptation");
+		if (verbosity>1) _printLine_("   Processing initial mesh and geometry...");
 		Mesh BTh(bamggeom_in,bamgmesh_in,bamgopts); 
 
@@ -100,9 +100,9 @@
 		//Generate initial metric
 		if (bamgopts->metric){
-			if (verbosity>1) printf("   Processing Metric...\n");
+			if (verbosity>1) _printLine_("   Processing Metric...");
 			BTh.ReadMetric(bamgopts);
 		}
 		else { 
-			if (verbosity>1) printf("   Generating initial Metric...\n");
+			if (verbosity>1) _printLine_("   Generating initial Metric...");
 			Metric Mhmax(bamgopts->hmax);
 			for (int iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax;
@@ -111,5 +111,5 @@
 		//use present fields to generate metric if present
 		if (bamgopts->field){
-			if (verbosity>1) printf("   Merge metric with field provided...\n");
+			if (verbosity>1) _printLine_("   Merge metric with field provided...");
 			BTh.AddMetric(bamgopts);
 		}
@@ -117,5 +117,5 @@
 		// change using hVertices if provided
 		if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==BTh.nbv){
-			if (verbosity>1) printf("   Merging Metric with hVertices...\n");
+			if (verbosity>1) _printLine_("   Merging Metric with hVertices...");
 			for (i=0;i<BTh.nbv;i++){
 				if (!isnan(bamgopts->hVertices[i])){
@@ -127,5 +127,5 @@
 		// change using hminVertices if provided
 		if (bamgopts->hminVertices){
-			if (verbosity>1) printf("   Merging Metric with hminVertices...\n");
+			if (verbosity>1) _printLine_("   Merging Metric with hminVertices...");
 			for (i=0;i<BTh.nbv;i++){
 				if (!isnan(bamgopts->hminVertices[i])){
@@ -140,5 +140,5 @@
 		// change using hmaxVertices if provided
 		if (bamgopts->hmaxVertices){
-			if (verbosity>1) printf("   Merging Metric with hmaxVertices...\n");
+			if (verbosity>1) _printLine_("   Merging Metric with hmaxVertices...");
 			for (i=0;i<BTh.nbv;i++){
 				if (!isnan(bamgopts->hmaxVertices[i])){
@@ -164,5 +164,5 @@
 
 		//Build new mesh
-		if (verbosity>1) printf("   Generating Mesh...\n");
+		if (verbosity>1) _printLine_("   Generating Mesh...");
 		Thr=&BTh,Thb=0;
 		Mesh & Th( *(0 ?  new Mesh(*Thr,&Thr->Gh,Thb,maxnbv) :  new Mesh(maxnbv,BTh,bamgopts,bamgopts->KeepVertices)));
@@ -185,17 +185,17 @@
 		if(verbosity>0) {
 			if (Th.nbt-Th.nbtout-Th.nbq*2){
-				printf("   new number of triangles = %i\n",(Th.nbt-Th.nbtout-Th.nbq*2));
+				_printLine_("   new number of triangles = " << (Th.nbt-Th.nbtout-Th.nbq*2));
 			}
 			if (Th.nbq ){
-				printf("   new number of quads = %i\n",Th.nbq);
+				_printLine_("   new number of quads = " << Th.nbq);
 			}
 		}
 
 		//Build output
-		if (verbosity>1) printf("   Write Mesh...\n");
+		if (verbosity>1) _printLine_("   Write Mesh...");
 		Th.WriteMesh(bamgmesh_out,bamgopts);
-		if (verbosity>1) printf("   Write Geometry...\n");
+		if (verbosity>1) _printLine_("   Write Geometry...");
 		Th.Gh.WriteGeometry(bamggeom_out,bamgopts);
-		if (verbosity>1) printf("   Write Metric...\n");
+		if (verbosity>1) _printLine_("   Write Metric...");
 		BTh.WriteMetric(bamgopts);
 
@@ -207,5 +207,5 @@
 
 	/*No error return*/
-	if (verbosity>1) printf("   Exiting Bamg.\n");
+	if (verbosity>1) _printLine_("   Exiting Bamg.");
 	return noerr;
 
Index: issm/trunk-jpl/src/c/modules/Chacox/Chacox.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Chacox/Chacox.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/Chacox/Chacox.cpp	(revision 12511)
@@ -66,10 +66,10 @@
 
 	if (DEBUG_TRACE > 0) {
-		printf("<Entering main>\n");
+		_printLine_("<Entering main>");
 	}
 
 	if (PRINT_HEADERS) {
-		printf("\n                    Chaco 2.0\n");
-		printf("          Sandia National Laboratories\n\n");
+		_printLine_("\n                    Chaco 2.0");
+		_printLine_("          Sandia National Laboratories\n");
 	}
 
@@ -177,5 +177,5 @@
 
 	if (DEBUG_MEMORY > 0) {
-		printf("\n");
+		_printLine_("");
 		smalloc_stats();
 	}
@@ -185,5 +185,5 @@
 
 	if (DEBUG_TRACE > 1) {
-		printf("<Leaving main>\n");
+		_printLine_("<Leaving main>");
 	}
 	
Index: issm/trunk-jpl/src/c/modules/Chacox/input_parse.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Chacox/input_parse.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/Chacox/input_parse.cpp	(revision 12511)
@@ -38,13 +38,13 @@
 
 	if (DEBUG_TRACE > 0) {
-		printf("<Entering input_parse>\n");
+		_printLine_("<Entering input_parse>");
 	}
 
 	if (PROMPT) {
-		printf("Parallel machine architecture:\n");
-		printf("  (0) Hypercube\n");
-		printf("  (1) One-dimensional mesh\n");
-		printf("  (2) Two-dimensional mesh\n");
-		printf("  (3) Three-dimensional mesh\n");
+		_printLine_("Parallel machine architecture:");
+		_printLine_("  (0) Hypercube");
+		_printLine_("  (1) One-dimensional mesh");
+		_printLine_("  (2) Two-dimensional mesh");
+		_printLine_("  (3) Three-dimensional mesh");
 	}
 	*architecture = (int)options[OPT_ARCH];
@@ -57,10 +57,10 @@
 	/* Name output assignment file. */
 	if (PROMPT)
-		printf("Assignment output file: ");
+		_printString_("Assignment output file: ");
 	outassignname = NULL;
 
 	/* Name output results file. */
 	if (PROMPT)
-		printf("File name for saving run results: ");
+		_printString_("File name for saving run results: ");
 	outfilename = NULL;
 
@@ -75,12 +75,12 @@
 	else {
 		if (PROMPT) {
-			printf("Global partitioning method:\n");
-			printf("  (1) Multilevel-KL\n");
-			printf("  (2) Spectral\n");
-			printf("  (3) Inertial\n");
-			printf("  (4) Linear\n");
-			printf("  (5) Random\n");
-			printf("  (6) Scattered\n");
-			printf("  (7) Read-from-file\n");
+			_printLine_("Global partitioning method:");
+			_printLine_("  (1) Multilevel-KL");
+			_printLine_("  (2) Spectral");
+			_printLine_("  (3) Inertial");
+			_printLine_("  (4) Linear");
+			_printLine_("  (5) Random");
+			_printLine_("  (6) Scattered");
+			_printLine_("  (7) Read-from-file");
 		}
 		*global_method = (int)options[OPT_GLOBAL];
@@ -94,17 +94,17 @@
 	if (*global_method == 7) {	/* Name and open input assignment file. */
 		if (PROMPT)
-			printf("Assignment input file: ");
+			_printString_("Assignment input file: ");
 	}
 
 	else if (*global_method == 3) {
 		if (PROMPT)
-			printf("Geometry input file name: ");
+			_printString_("Geometry input file name: ");
 	}
 
 	else if (*global_method == 2) {
 		if (PROMPT) {
-			printf("Eigensolver:\n");
-			printf("  (1) Multilevel RQI/Symmlq\n");
-			printf("  (2) Lanczos\n"); 
+			_printLine_("Eigensolver:");
+			_printLine_("  (1) Multilevel RQI/Symmlq");
+			_printLine_("  (2) Lanczos"); 
 		}
 		eigensolver = (int)options[OPT_RQI];
@@ -117,9 +117,9 @@
 			if (MATCH_TYPE == 5) {	/* geometric matching */
 				if (PROMPT)
-					printf("Geometry input file name: ");
+					_printString_("Geometry input file name: ");
 			}
 			*rqi_flag = 1;
 			if (PROMPT)
-				printf("Number of vertices to coarsen down to: ");
+				_printString_("Number of vertices to coarsen down to: ");
 			*vmax = (int)options[OPT_VMAX];
 			if (*vmax <= 0) {
@@ -137,8 +137,8 @@
 		if (MATCH_TYPE == 5) {		/* geometric matching */
 			if (PROMPT)
-				printf("Geometry input file name: ");
-		}
-		if (PROMPT)
-			printf("Number of vertices to coarsen down to: ");
+				_printString_("Geometry input file name: ");
+		}
+		if (PROMPT)
+			_printString_("Number of vertices to coarsen down to: ");
 		*vmax = (int)options[OPT_VMAX];
 		if (*vmax <= 0) {
@@ -168,7 +168,7 @@
 	else {
 		if (PROMPT) {
-			printf("Local refinement method:\n");
-			printf("  (1) Kernighan-Lin\n");
-			printf("  (2) None\n");
+			_printLine_("Local refinement method:");
+			_printLine_("  (1) Kernighan-Lin");
+			_printLine_("  (2) None");
 		}
 		*local_method = (int)options[OPT_LOCAL];
@@ -185,8 +185,8 @@
 		*ndims_tot = 0;
 		if (PROMPT)
-			printf("Total number of target hypercube dimensions: ");
+			_printString_("Total number of target hypercube dimensions: ");
 		*ndims_tot = nparts[0];
 		if (*ndims_tot < 1) {
-			printf(" Number of divisions must be at least 1\n");
+			_printLine_(" Number of divisions must be at least 1");
 			printf("%s -- Number of divisions %d must be at least 1.\n",
 				   __FUNCT__,nparts[0]);
@@ -200,5 +200,5 @@
 		if (*architecture == 2) {
 			if (PROMPT)
-				printf("X and Y extent of of 2-D mesh: ");
+				_printString_("X and Y extent of of 2-D mesh: ");
 			mesh_dims[0] = nparts[0];
 			mesh_dims[1] = nparts[1];
@@ -206,5 +206,5 @@
 		else if (*architecture == 3) {
 			if (PROMPT)
-				printf("X, Y and Z extent of 3-D mesh: ");
+				_printString_("X, Y and Z extent of 3-D mesh: ");
 			mesh_dims[0] = nparts[0];
 			mesh_dims[1] = nparts[1];
@@ -213,5 +213,5 @@
 		else {			/* Anything else => 1-D mesh */
 			if (PROMPT)
-				printf("Size of 1-D mesh: ");
+				_printString_("Size of 1-D mesh: ");
 			mesh_dims[0] = nparts[0];
 			*architecture = 1;
@@ -227,7 +227,7 @@
 	else if (*nprocs <= 7) {
 		if (PROMPT) {
-			printf("Partitioning dimension: \n");
-			printf("  (1) Bisection\n");
-			printf("  (2) Quadrisection\n");
+			_printLine_("Partitioning dimension: ");
+			_printLine_("  (1) Bisection");
+			_printLine_("  (2) Quadrisection");
 		}
 		*ndims = (int)options[OPT_NDIMS];
@@ -240,8 +240,8 @@
 	else {
 		if (PROMPT) {
-			printf("Partitioning dimension: \n");
-			printf("  (1) Bisection\n");
-			printf("  (2) Quadrisection\n");
-			printf("  (3) Octasection\n");
+			_printLine_("Partitioning dimension: ");
+			_printLine_("  (1) Bisection");
+			_printLine_("  (2) Quadrisection");
+			_printLine_("  (3) Octasection");
 		}
 		*ndims = (int)options[OPT_NDIMS];
Index: issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp	(revision 12511)
@@ -110,8 +110,8 @@
 	/*Synthesize echo: {{{*/
 	if(my_rank==0){
-		printf("   responses: %i: ",d_numresponses);
-		for(i=0;i<d_numresponses-1;i++)printf("%g|",d_responses[i]);
-		printf("%g",d_responses[d_numresponses-1]);
-		printf("\n");
+		_printString_("   responses: " << d_numresponses << ": ");
+		for(i=0;i<d_numresponses-1;i++)_printString_("" << d_responses[i] << "|");
+		_printString_("" << d_responses[d_numresponses-1]);
+		_printLine_("");
 	}
 	/*}}}*/
Index: issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12511)
@@ -58,5 +58,5 @@
 	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
 //	for (i=0; i<nprof; i++)
-//		printf("i=%d; nvert=%d, closed=%d\n",i,pnvert[i],closed[i]);
+//		_printLine_("i=" << i << "; nvert=" << pnvert[i] << ", closed=" << closed[i]);
 
 /*  construct kml file  */
Index: issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 12511)
@@ -76,6 +76,6 @@
 			}
 		}
-		printf( "\n" );
-		printf("Number of zeroes remaining: %d",lines*samps-counter);
+		_printLine_( "" );
+		_printString_("Number of zeroes remaining: " << lines*samps-counter);
 		fflush( stdout );
 	#endif
@@ -95,6 +95,6 @@
 		}
 		//        n u m b e r   o f   z e r o e s   r e m a i n i n g :   1 2 3 4 5 6 7 8 9 10        
-		printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
-		printf("Number of zeroes remaining: %d",lines*samps-counter);
+		_printString_( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
+		_printString_("Number of zeroes remaining: " << lines*samps-counter);
 		fflush( stdout );
 	#endif
@@ -104,5 +104,5 @@
 /***************** FIRST RUN *********************/
 /*
-fprintf ( stdout, "First  Application:  " ); time(&t2); printf( ctime(&t2) );
+fprintf ( stdout, "First  Application:  " ); time(&t2); _printString_( ctime(&t2) );
 */
 	for ( i = 0; i < lines; i++ ){
@@ -277,5 +277,5 @@
 			
 			#ifdef _DEBUG2_
-				//printf("%g %g %g \n",temp,elev,range);
+				//_printLine_("" << temp << " " << elev << " " << range << " ");
 			#endif
 
@@ -354,6 +354,6 @@
 	
 	#ifdef _DEBUG2_
-		printf( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
-		printf("Number of zeroes remaining:          0\n\n");
+		_printString_( "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" );
+		_printLine_("Number of zeroes remaining:          0\n");
 		printf ( "\n");
 	#endif
Index: issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 12511)
@@ -175,5 +175,5 @@
 					break;
 				default:
-					printf("Interpolation %s not supported yet\n",EnumToStringx(interpenum));
+					_printLine_("Interpolation " << EnumToStringx(interpenum) << " not supported yet");
 					return NULL; /*WARNING: no error because it would blow up the multithreading!*/
 			}
Index: issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 12511)
@@ -54,14 +54,14 @@
 
 	/*Initialize output*/
-	if (verbose) printf("Initializing output vector\n");
+	if (verbose) _printLine_("Initializing output vector");
 	data_interp=xNew<double>(nods_interp*data_cols);
 
 	// read background mesh 
-	if (verbose) printf("Reading mesh\n");
+	if (verbose) _printLine_("Reading mesh");
 	Mesh Th(index_data,x_data,y_data,nods_data,nels_data); 
 	Th.CreateSingleVertexToTriangleConnectivity();
 
 	//Loop over output nodes
-	if (verbose) printf("Loop over the nodes\n");
+	if (verbose) _printLine_("Loop over the nodes");
 	for(i=0;i<nods_interp;i++){
 		
@@ -138,5 +138,5 @@
 
 	/*Assign output pointers:*/
-	if (verbose) printf("Assigning output\n");
+	if (verbose) _printLine_("Assigning output");
 	*pdata_interp=data_interp;
 
Index: issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12511)
@@ -66,5 +66,5 @@
 		observations->ObservationList(&x,&y,&data,&nobs);
 
-		printf("Generation Delaunay Triangulation\n");
+		_printLine_("Generation Delaunay Triangulation");
 		BamgTriangulatex(&index,&nel,x,y,nobs);
 		indexd =xNewZeroInit<double>(nel*3);
@@ -72,5 +72,5 @@
 		xDelete<int>(index);
 
-		printf("Interpolating\n");
+		_printLine_("Interpolating");
 		xDelete<double>(predictions);
 		InterpFromMeshToMesh2dx(&predictions,indexd,x,y,nobs,nel,data,nobs,1,x_interp,y_interp,n_interp,NULL,0,new DataSet());
Index: issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
===================================================================
--- issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12507)
+++ issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 12511)
@@ -57,5 +57,5 @@
   
   if (itm >= NPDMAX){
-    printf("increase NPDMAX in massBalance.cpp\n");
+    _printLine_("increase NPDMAX in massBalance.cpp");
     exit (1);
       }
@@ -83,5 +83,5 @@
   itm = (int)((PDCUT+2.*siglimc)/DT + 1.5);
   if (itm >= NPDCMAX){
-    printf("'increase NPDCMAX in p35com'\n");
+    _printLine_("'increase NPDCMAX in p35com'");
     exit (1);
       }
