Changeset 15097
- Timestamp:
- 05/24/13 11:14:40 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/externalpackages/matlab/install.sh
r15004 r15097 1 1 #!/bin/bash 2 set -eu 3 4 if [ ! -h install ]; 5 then 6 echo " ****************************************************************" 7 echo " * *" 8 echo " * you need create a symbolic link from matlab's root directory *" 9 echo " * *" 10 echo " * First, you need to locate matlab's root directory *" 11 echo " * The easiest way to find it is to launch matlab and run the *" 12 echo " * following command: matlabroot *" 13 echo " * Then, create a symbolic link using the command 'ln -s ' the *" 14 echo " * target directory should be named 'install' *" 15 echo " * *" 16 echo " * Examples: *" 17 echo " * ln -s /usr/local/matlab712/ install *" 18 echo " * ln -s /Applications/MATLAB_R2012a.app/ install *" 19 echo " * *" 20 echo " * run ./install.sh again to check that the link is correct *" 21 echo " * *" 22 echo " ****************************************************************" 23 else 24 25 #Read link 26 DIR=$(readlink install) 27 if [ -d $DIR ] 28 then 29 echo "Symbolic link correctly set" 30 else 31 rm -rf install 32 echo "Incorrect symbolic link:" 33 echo "provided target ($DIR) does not exist or is not a directory" 34 fi 35 fi 2 rm -rf install 3 ln -s /usr/local/matlab714/ install -
issm/trunk-jpl/src/c/analyses/prognostic_core.cpp
r15001 r15097 32 32 33 33 if(issmbgradients){ 34 _printf_(VerboseSolution()," call smb gradients module\n");34 if(VerboseSolution)_printLine_(" call smb gradients module\n"); 35 35 SmbGradientsx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); 36 36 } -
issm/trunk-jpl/src/c/kml/KML_LinearRing.cpp
r15069 r15097 81 81 if(flag) _pprintLine_(indent << " coords: (ncoord=" << ncoord << ")"); 82 82 for (i=0; i<ncoord; i++) 83 _printf_(flag,"%s (%g,%g,%g)\n",indent, 84 coords[3*i+0],coords[3*i+1],coords[3*i+2]); 83 if(flag)_printLine_(indent << " (" <<coords[3*i+0] << "," <<coords[3*i+1] << "," <<coords[3*i+2] << ")\n"); 85 84 86 85 return; -
issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
r15069 r15097 287 287 clock1=clock(); 288 288 time1 =time(NULL); 289 _printf_(true,"Exp2Kmlx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 290 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 289 _printLine_("Exp2Kmlx Module -- " <<((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " <<difftime(time1,time0) << " elapsed seconds.\n\n"); 291 290 292 291 return(iret); -
issm/trunk-jpl/src/c/modules/KMLFileReadx/KMLFileReadx.cpp
r14999 r15097 57 57 clock1=clock(); 58 58 time1 =time(NULL); 59 _printf_(true,"KMLFileReadx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 60 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 59 _printLine_("KMLFileReadx Module -- " <<((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " <<difftime(time1,time0) << " elapsed seconds.\n\n"); 61 60 62 61 return(kfil); -
issm/trunk-jpl/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp
r14999 r15097 185 185 clock0a=clock(); 186 186 time0a =time(NULL); 187 _printf_(true," Constructed kml document -- %f CPU seconds; %f elapsed seconds.\n\n", 188 ((double)(clock0a-clock0))/CLOCKS_PER_SEC,difftime(time0a,time0)); 187 _printLine_(" Constructed kml document -- " << ((double)(clock0a-clock0))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time0a,time0) << " elapsed seconds.\n\n"); 189 188 190 189 /* write kml file */ … … 197 196 clock0b=clock(); 198 197 time0b =time(NULL); 199 _printf_(true," Wrote kml file -- %f CPU seconds; %f elapsed seconds.\n\n", 200 ((double)(clock0b-clock0a))/CLOCKS_PER_SEC,difftime(time0b,time0a)); 198 _printLine_(" Wrote kml file -- " << ((double)(clock0b-clock0a))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time0b,time0a) << " elapsed seconds.\n\n"); 201 199 202 200 _pprintLine_("Deleting kml document."); … … 204 202 clock0c=clock(); 205 203 time0c =time(NULL); 206 _printf_(true," Deleted kml document -- %f CPU seconds; %f elapsed seconds.\n\n", 207 ((double)(clock0c-clock0b))/CLOCKS_PER_SEC,difftime(time0c,time0b)); 204 _printLine_(" Deleted kml document -- " << ((double)(clock0c-clock0b))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time0c,time0b) << " elapsed seconds.\n\n"); 208 205 209 206 clock1=clock(); 210 207 time1 =time(NULL); 211 _printf_(true,"KMLMeshWritex Module -- %f CPU seconds; %f elapsed seconds.\n\n", 212 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 208 _printLine_("KMLMeshWritex Module -- " << ((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time1,time0) << " elapsed seconds.\n\n"); 213 209 214 210 return; -
issm/trunk-jpl/src/c/modules/KMLOverlayx/KMLOverlayx.cpp
r15068 r15097 87 87 clock1=clock(); 88 88 time1 =time(NULL); 89 _printf_(true,"KMLOverlayx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 90 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 89 _printLine_("KMLOverlayx Module -- " << ((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time1,time0) << " elapsed seconds.\n\n"); 91 90 92 91 return; -
issm/trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
r15069 r15097 61 61 clock1=clock(); 62 62 time1 =time(NULL); 63 _printf_(true,"Kml2Expx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 64 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 63 _printLine_("Kml2Expx Module -- " << ((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time1,time0) << " elapsed seconds.\n\n"); 65 64 66 65 return(iret); -
issm/trunk-jpl/src/c/modules/Krigingx/pKrigingx.cpp
r15000 r15097 142 142 143 143 MPI_Barrier(MPI_COMM_WORLD); finish=MPI_Wtime( ); 144 _print f_(true,"\n %-34s %f seconds \n","Observation fitering elapsed time:",finish_init-start_init);145 _print f_(true," %-34s %f seconds \n","Kriging prediction elapsed time:",finish_core-start_core);146 _print f_(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);144 _printLine_("\n " << setw(34) << left << "Observation fitering elapsed time: " << finish_init-start_init << " seconds \n"); 145 _printLine_(" " << setw(34) << left << "Kriging prediction elapsed time: " << finish_core-start_core << " seconds \n"); 146 _printLine_("\n " << "Total elapsed time " << int((finish-start)/3600) << " hrs " << int(int(finish-start)%3600/60) << " min " << int(finish-start)%60 << " sec\n\n"); 147 147 return 1; 148 148 #else -
issm/trunk-jpl/src/c/modules/Shp2Expx/Shp2Expx.cpp
r15069 r15097 295 295 296 296 if (pnpart[i] > 0) 297 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 0 parts.\n", 298 i,SHPTypeName( pstype[i] ),pnpart[i]); 297 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnpart[i] << " > 0 parts.\n"); 299 298 if (pnvert[i] > 1) 300 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 1 vertices.\n", 301 i,SHPTypeName( pstype[i] ),pnvert[i]); 299 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnvert[i] << " > 1 vertices.\n"); 302 300 303 301 kpoint=new KML_Point(); … … 466 464 else { 467 465 if (!kpoly) { 468 _printf_(true,"Warning -- Shape %d of type \"%s\", part %d, expected to be outer loop (cw).\n", 469 i,SHPTypeName( pstype[i] ),j); 466 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\", part " << j << ", expected to be outer loop (cw).\n"); 470 467 continue; 471 468 } … … 515 512 516 513 if (pnpart[i] > 0) 517 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 0 parts.\n", 518 i,SHPTypeName( pstype[i] ),pnpart[i]); 514 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnpart[i] << " > 0 parts.\n"); 519 515 520 516 /* create a multigeometry to hold all the points */ … … 559 555 560 556 else if (pstype[i] == SHPT_MULTIPATCH) { 561 _printf_(true,"Warning -- Shape %d of type \"%s\" will be ignored.\n", 562 i,SHPTypeName( pstype[i] )); 557 _printLine_("Warning -- Shape " << i << " of type \"" <<SHPTypeName( pstype[i] ) << "\" will be ignored.\n"); 563 558 continue; 564 559 } … … 567 562 568 563 else { 569 _printf_(true,"Warning -- Shape %d of type \"%s\" will be ignored.\n", 570 i,SHPTypeName( pstype[i] )); 564 _printLine_(,"Warning -- Shape " << i << " of type \"" <<SHPTypeName( pstype[i] ) << "\" will be ignored.\n"); 571 565 } 572 566 } … … 615 609 clock1=clock(); 616 610 time1 =time(NULL); 617 _printf_(true,"Shp2Expx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 618 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 611 _printLine_("Shp2Expx Module -- " <<((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " <<difftime(time1,time0) << " elapsed seconds.\n\n"); 619 612 620 613 return(iret); -
issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp
r15069 r15097 283 283 284 284 if (pnpart[i] > 0) 285 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 0 parts.\n", 286 i,SHPTypeName( pstype[i] ),pnpart[i]); 285 _printLine_("Warning -- Shape "<< i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnpart[i] << " > 0 parts.\n"); 287 286 if (pnvert[i] > 1) 288 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 1 vertices.\n", 289 i,SHPTypeName( pstype[i] ),pnvert[i]); 287 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnpart[i] << " > 1 vertices.\n"); 290 288 291 289 kpoint=new KML_Point(); … … 454 452 else { 455 453 if (!kpoly) { 456 _printf_(true,"Warning -- Shape %d of type \"%s\", part %d, expected to be outer loop (cw).\n", 457 i,SHPTypeName( pstype[i] ),j); 454 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\", part " << j << ", expected to be outer loop (cw).\n"); 458 455 continue; 459 456 } … … 503 500 504 501 if (pnpart[i] > 0) 505 _printf_(true,"Warning -- Shape %d of type \"%s\" should not have %d > 0 parts.\n", 506 i,SHPTypeName( pstype[i] ),pnpart[i]); 502 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" should not have " << pnpart[i] << " > 0 parts.\n"); 507 503 508 504 /* create a multigeometry to hold all the points */ … … 547 543 548 544 else if (pstype[i] == SHPT_MULTIPATCH) { 549 _printf_(true,"Warning -- Shape %d of type \"%s\" will be ignored.\n", 550 i,SHPTypeName( pstype[i] )); 545 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" will be ignored.\n"); 551 546 continue; 552 547 } … … 555 550 556 551 else { 557 _printf_(true,"Warning -- Shape %d of type \"%s\" will be ignored.\n", 558 i,SHPTypeName( pstype[i] )); 552 _printLine_("Warning -- Shape " << i << " of type \"" << SHPTypeName( pstype[i] ) << "\" will be ignored.\n"); 559 553 } 560 554 } … … 598 592 clock1=clock(); 599 593 time1 =time(NULL); 600 _printf_(true,"Shp2Kmlx Module -- %f CPU seconds; %f elapsed seconds.\n\n", 601 ((double)(clock1-clock0))/CLOCKS_PER_SEC,difftime(time1,time0)); 594 _printLine_("Shp2Kmlx Module -- " << ((double)(clock1-clock0))/CLOCKS_PER_SEC << " CPU seconds; " << difftime(time1,time0) << " elapsed seconds.\n\n"); 602 595 603 596 return(iret); -
issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h
r14920 r15097 64 64 }\ 65 65 catch (exception& e) {\ 66 _print f_(true,"Standard exception: %s\n",e.what());\66 _printLine_("Standard exception: " << e.what() << "\n");\ 67 67 return 0;\ 68 68 }\ 69 69 catch(...){\ 70 _print f_(true,"An unexpected error occurred");\70 _printLine_("An unexpected error occurred \n");\ 71 71 return 0;\ 72 72 } -
issm/trunk-jpl/src/c/shared/Matrix/MatrixUtils.cpp
r14954 r15097 205 205 pindx[ipiv]++; 206 206 207 // _printf_(true,"pivot for i=%d: irow=%d, icol=%d, pindx[%d]=%d\n", 208 // i,irow,icol,ipiv,pindx[ipiv]); 207 // _printLine_("pivot for i=" << i << ": irow=" << irow << ", icol=" << icol << ", pindx[" << ipiv << "]=" << pindx[ipiv] << "\n"); 209 208 210 209 /* switch rows to put pivot element on diagonal, noting that the … … 212 211 213 212 if (irow != icol) { 214 // _printf_(true,"row switch for i=%d: irow=%d, icol=%d\n", 215 // i,irow,icol); 213 // _printLine_("row switch for i=" << i << ": irow=" << irow << ", icol=" << icol << "\n"); 216 214 217 215 ipt=irow*ndim; … … 294 292 icol=pivrc2[j]; 295 293 296 // _printf_(true,"column switch back for j=%d: irow=%d, icol=%d\n", 297 // j,irow,icol); 294 // _printLine_("column switch back for j=" << j << ": irow=" << irow << ", icol=" << icol << "\n"); 298 295 299 296 ipt=0; -
issm/trunk-jpl/src/c/shared/Numerics/GaussPoints.cpp
r15071 r15097 1200 1200 // _pprintLine_("GaussLegendreTria - ngaus=" << *pngaus); 1201 1201 // for (i=0; i<*pngaus; i++) 1202 // _printf_(true,"i=%d: l1gaus=%f,l2gaus=%f,l3gaus=%f,wgt=%f\n", 1203 // i,(*pl1 )[i],(*pl2 )[i],(*pl3 )[i],(*pwgt)[i]); 1202 // _pprintLine_("i=" << i << ": l1gaus=" << (*pl1 )[i] << ",l2gaus=" << (*pl2 )[i] << ",l3gaus=" << (*pl3 )[i]<< ",wgt=" << (*pwgt)[i]<< "\n"); 1204 1203 1205 1204 return; -
issm/trunk-jpl/src/c/shared/io/Print/Print.h
r15091 r15097 19 19 using namespace std; 20 20 /*macros:*/ 21 /* _printf_ {{{*/22 /*Printing macro: only cpu number 0 */23 #define _printf_(flag,...) do{if(flag) PrintfFunction(__VA_ARGS__);}while(0)24 /*}}}*/25 21 /* _printLine_ {{{*/ 26 22 /* macro to print a line, adds std::endl, only on cpu 0 */ -
issm/trunk-jpl/src/c/shared/io/Print/PrintfFunction.cpp
r15091 r15097 1 1 /*\file PrintfFunction.c 2 *\brief: this function is used by the _printf_ macro, to take into account the2 *\brief: this function is used by the print macros, to take into account the 3 3 *fact we may be running on a cluster. 4 4 */
Note:
See TracChangeset
for help on using the changeset viewer.