diff -N -r -c HLib-1.3/Contrib/example_netcdf.c HLib-1.3new/Contrib/example_netcdf.c *** HLib-1.3/Contrib/example_netcdf.c 2004-11-23 18:16:16.000000000 +0100 --- HLib-1.3new/Contrib/example_netcdf.c 2007-05-16 14:47:05.136316672 +0200 *************** *** 20,25 **** --- 20,26 ---- #include #include #include + #include /* ************************************************************ Demonstrate the use of NetCDF files *************** *** 44,53 **** --- 45,57 ---- struct tms buffer; clock_t t1, t2; time_t t; + long clk_tck; size_t sz; int split, p, nfdeg, nmin; int i, maxiter; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 152,158 **** " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getnrnodes_supermatrix(M), sz / 1048576.0, sz / 1024.0 / root->size, --- 156,162 ---- " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getnrnodes_supermatrix(M), sz / 1048576.0, sz / 1024.0 / root->size, *************** *** 163,169 **** netcdf_write_supermatrix(M, "dlp.cdf"); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); } else { (void) printf("# Name of NetCDF file?\n"); --- 167,173 ---- netcdf_write_supermatrix(M, "dlp.cdf"); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); } else { (void) printf("# Name of NetCDF file?\n"); *************** *** 180,186 **** M = netcdf_read_supermatrix(filename); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); } x0 = (double *) malloc((size_t) sizeof(double) * M->cols); --- 184,190 ---- M = netcdf_read_supermatrix(filename); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); } x0 = (double *) malloc((size_t) sizeof(double) * M->cols); *************** *** 197,203 **** eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK / maxiter); if(M->rows <= 10000 || M->cols <= 10000) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); --- 201,207 ---- eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / clk_tck / maxiter); if(M->rows <= 10000 || M->cols <= 10000) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); diff -N -r -c HLib-1.3/Examples/example_1d.c HLib-1.3new/Examples/example_1d.c *** HLib-1.3/Examples/example_1d.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_1d.c 2007-05-16 14:44:33.053436784 +0200 *************** *** 3,15 **** #include #include #include - #include "supermatrix.h" - #include "ie1d.h" #include "graphics.h" - #include "krylov.h" #include "hcoarsening.h" #include "lapack.h" int main(int argc, char** argv){ --- 3,16 ---- #include #include #include + #include #include "graphics.h" #include "hcoarsening.h" + #include "ie1d.h" + #include "krylov.h" #include "lapack.h" + #include "supermatrix.h" int main(int argc, char** argv){ *************** *** 17,28 **** --- 18,32 ---- double *rhs, *u, zeit; struct tms buffer; clock_t t1, t2; + long clk_tck; psupermatrix s; /* psupermatrix sc; */ char buf[80]; + clk_tck = sysconf(_SC_CLK_TCK); + n = 10000; k = 6; nr = 2; *************** *** 69,75 **** t1 = times(&buffer); s = build_1d_supermatrix(n,k,nmin); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time for the assembly was %.2f seconds.\n",zeit); --- 73,79 ---- t1 = times(&buffer); s = build_1d_supermatrix(n,k,nmin); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time for the assembly was %.2f seconds.\n",zeit); *************** *** 92,98 **** t1 = times(&buffer); solve_cg_supermatrix(s, rhs, u, 1e-13, 500, 0x0, 0, 1); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time to solve (cg) was %.2f seconds.\n",zeit); /* --- 96,102 ---- t1 = times(&buffer); solve_cg_supermatrix(s, rhs, u, 1e-13, 500, 0x0, 0, 1); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time to solve (cg) was %.2f seconds.\n",zeit); /* *************** *** 104,110 **** choleskydecomposition_supermatrix(sc); solve_cg_supermatrix(s, rhs, u, 1e-13, 500, sc, 2, 1); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time to solve (pcg) was %.2f seconds.\n",zeit); */ --- 108,114 ---- choleskydecomposition_supermatrix(sc); solve_cg_supermatrix(s, rhs, u, 1e-13, 500, sc, 2, 1); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time to solve (pcg) was %.2f seconds.\n",zeit); */ diff -N -r -c HLib-1.3/Examples/example_bem3d.c HLib-1.3new/Examples/example_bem3d.c *** HLib-1.3/Examples/example_bem3d.c 2005-05-30 17:25:07.000000000 +0200 --- HLib-1.3new/Examples/example_bem3d.c 2007-05-16 14:42:26.542669344 +0200 *************** *** 23,28 **** --- 23,29 ---- #include #include #include + #include /* ******************************************** Demonstrate the coarsening of BEM-matrices *************** *** 65,70 **** --- 66,72 ---- struct tms buffer; clock_t t1, t2; time_t t; + long clk_tck; int split, nfdeg, qmin=2, rows, cols; int i, nmin, maxiter,j; size_t size_m; *************** *** 73,78 **** --- 75,83 ---- ph2recompression h2r; EvalMode mode; BEMBasis basisfunc=HLIB_CONSTANT_BASIS; + + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 330,336 **** }else{ } ! (void) printf(" Fill: %.1f sec.,",((double)t2-t1)/CLK_TCK); size_m = getsize_supermatrix(M); (void) printf(" Storage: %.1f MB (%.1f KB/DoF)\n", size_m / 1024.0 / 1024.0, size_m / 1024.0 / rows); --- 335,341 ---- }else{ } ! (void) printf(" Fill: %.1f sec.,",((double)t2-t1)/clk_tck); size_m = getsize_supermatrix(M); (void) printf(" Storage: %.1f MB (%.1f KB/DoF)\n", size_m / 1024.0 / 1024.0, size_m / 1024.0 / rows); *************** *** 373,379 **** } t2 = times(&buffer); (void) printf(" M*v: %.3f sec.\n", ! (double) (t2-t1) / CLK_TCK / maxiter); if(output>0 && reference==0){ (void) printf("# Print matrix structure to \"M.ps\"\n"); if(output==2){ --- 378,384 ---- } t2 = times(&buffer); (void) printf(" M*v: %.3f sec.\n", ! (double) (t2-t1) / clk_tck / maxiter); if(output>0 && reference==0){ (void) printf("# Print matrix structure to \"M.ps\"\n"); if(output==2){ *************** *** 473,479 **** t2 = times(&buffer); (void) printf(" Coarsen (eps=%.3f): %.1f sec.,",h_coarsen, ! (double) (t2-t1) / CLK_TCK); (void) printf(" Storage: %.1f KB/DoF\n", getsize_supermatrix(M) / 1024.0 / rows); t1 = times(&buffer); --- 478,484 ---- t2 = times(&buffer); (void) printf(" Coarsen (eps=%.3f): %.1f sec.,",h_coarsen, ! (double) (t2-t1) / clk_tck); (void) printf(" Storage: %.1f KB/DoF\n", getsize_supermatrix(M) / 1024.0 / rows); t1 = times(&buffer); *************** *** 482,488 **** eval_supermatrix(M, x0, x2); t2 = times(&buffer); (void) printf(" M*v: %.3f sec.\n", ! (double) (t2-t1) / CLK_TCK / maxiter); epd->typ = 0; epd->e_B.A = M; --- 487,493 ---- eval_supermatrix(M, x0, x2); t2 = times(&buffer); (void) printf(" M*v: %.3f sec.\n", ! (double) (t2-t1) / clk_tck / maxiter); epd->typ = 0; epd->e_B.A = M; *************** *** 503,509 **** } t2 = times(&buffer); ! (void) printf(" %.1f seconds for setup\n",(double) (t2-t1) / CLK_TCK); if(operator == 'd') { epd->e_B.A = 0; --- 508,514 ---- } t2 = times(&buffer); ! (void) printf(" %.1f seconds for setup\n",(double) (t2-t1) / clk_tck); if(operator == 'd') { epd->e_B.A = 0; *************** *** 538,544 **** } t2 = times(&buffer); ! (void) printf(" %.1f seconds, %d steps\n", (double) (t2-t1) / CLK_TCK,i); } fill_vector(cols, x2, 0.0); --- 543,549 ---- } t2 = times(&buffer); ! (void) printf(" %.1f seconds, %d steps\n", (double) (t2-t1) / clk_tck,i); } fill_vector(cols, x2, 0.0); *************** *** 547,553 **** i = solve_gmres_supermatrix(M_compress, x1, x2, 1e-6, 500, 0x0, HLIB_PREC_DEFAULT, Kmod, mode, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds, %d steps\n", (double) (t2-t1) / CLK_TCK,i); fill_vector(cols, x2, 0.0); t1 = times(&buffer); --- 552,558 ---- i = solve_gmres_supermatrix(M_compress, x1, x2, 1e-6, 500, 0x0, HLIB_PREC_DEFAULT, Kmod, mode, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds, %d steps\n", (double) (t2-t1) / clk_tck,i); fill_vector(cols, x2, 0.0); t1 = times(&buffer); diff -N -r -c HLib-1.3/Examples/example_bem.c HLib-1.3new/Examples/example_bem.c *** HLib-1.3/Examples/example_bem.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_bem.c 2007-05-16 14:46:39.049282504 +0200 *************** *** 11,16 **** --- 11,17 ---- #include #include #include + #include /* ************************************************************ Demonstrate the construction of BEM-matrices on curves *************** *** 30,35 **** --- 31,39 ---- int i, n, p, leafsize; struct tms buffer; clock_t t1, t2; + long clk_tck; + + clk_tck = sysconf(_SC_CLK_TCK); n = 256; p = 3; *************** *** 81,87 **** t2 = times(&buffer); printf("# Time for the assembly was %.2f seconds.\n", ! (double) (t2-t1) / CLK_TCK); x0 = allocate_vector(M->cols); x1 = allocate_vector(M->rows); --- 85,91 ---- t2 = times(&buffer); printf("# Time for the assembly was %.2f seconds.\n", ! (double) (t2-t1) / clk_tck); x0 = allocate_vector(M->cols); x1 = allocate_vector(M->rows); diff -N -r -c HLib-1.3/Examples/example_fem.c HLib-1.3new/Examples/example_fem.c *** HLib-1.3/Examples/example_fem.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_fem.c 2007-05-16 14:46:16.346733816 +0200 *************** *** 14,19 **** --- 14,20 ---- #include #include #include + #include /* ************************************************************ Demonstrate the construction of FEM matrices *************** *** 32,41 **** --- 33,45 ---- int n, i, k, nmin, maxiter,dofs; struct tms buffer; clock_t t1, t2; + long clk_tck; double *v, *w; char cholesky='c'; char buf[80]; + clk_tck = sysconf(_SC_CLK_TCK); + n = 64; k = 5; eps = 1e-4; *************** *** 120,126 **** t1 = times(&buffer); invert_supermatrix(Minv, M, Mwork); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time for the inversion was %.2f seconds.\n", zeit); (void) printf(" The H-Matrix inverse requires %.2f KB of storage\n", getsize_supermatrix(Minv) / 1024.0); --- 124,130 ---- t1 = times(&buffer); invert_supermatrix(Minv, M, Mwork); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time for the inversion was %.2f seconds.\n", zeit); (void) printf(" The H-Matrix inverse requires %.2f KB of storage\n", getsize_supermatrix(Minv) / 1024.0); *************** *** 136,142 **** t1 = times(&buffer); choleskydecomposition_supermatrix(M); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time for the decomposition was %.2f seconds.\n", zeit); (void) printf(" The H-Cholesky factor requires %.2f KB of storage\n", getsize_supermatrix(M) / 1024.0); --- 140,146 ---- t1 = times(&buffer); choleskydecomposition_supermatrix(M); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time for the decomposition was %.2f seconds.\n", zeit); (void) printf(" The H-Cholesky factor requires %.2f KB of storage\n", getsize_supermatrix(M) / 1024.0); *************** *** 164,170 **** solvecholesky_supermatrix(M,v); } t2 = times(&buffer); ! zeit = (double)(t2-t1) / (CLK_TCK * maxiter); (void) printf("# Time (MVM) is %.4f seconds.\n", zeit); (void) printf("#\n# H2-Matrix approximation of the inverse.\n"); --- 168,174 ---- solvecholesky_supermatrix(M,v); } t2 = times(&buffer); ! zeit = (double)(t2-t1) / (clk_tck * maxiter); (void) printf("# Time (MVM) is %.4f seconds.\n", zeit); (void) printf("#\n# H2-Matrix approximation of the inverse.\n"); *************** *** 176,182 **** M2 = buildh2_supermatrix(M, root, root, eps, 300, HLIB_EUCLIDEAN_RELATIVE); } t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf("# Time for the conversion is %.4f seconds.\n", zeit); (void) printf(" The H2-Matrix inverse required %.2f KB of storage.\n", (getsize_supermatrix(M2) + --- 180,186 ---- M2 = buildh2_supermatrix(M, root, root, eps, 300, HLIB_EUCLIDEAN_RELATIVE); } t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf("# Time for the conversion is %.4f seconds.\n", zeit); (void) printf(" The H2-Matrix inverse required %.2f KB of storage.\n", (getsize_supermatrix(M2) + *************** *** 200,206 **** for(i=0; i #include #include + #include /* Use HCA to build coefficient matrices? */ /* *************** *** 50,59 **** --- 51,63 ---- struct tms buffer; clock_t t1, t2, tstart; time_t t; + long clk_tck; size_t sz; int split, p, nfdeg, nmin, nmax; int i, maxiter; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 271,277 **** (void) printf(" %.1f seconds\n" " Storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, (getsize_clusterbasis(rb) + getsize_clusterbasis(cb)) / 1048576.0); (void) printf("# Creating supermatrix by interpolation\n"); --- 275,281 ---- (void) printf(" %.1f seconds\n" " Storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, (getsize_clusterbasis(rb) + getsize_clusterbasis(cb)) / 1048576.0); (void) printf("# Creating supermatrix by interpolation\n"); *************** *** 284,291 **** getsize_clusterbasis(Mpoly->col)); (void) printf(" %.1f seconds\n" " %.1f seconds total\n", ! (double) (t2-t1) / CLK_TCK, ! (double) (t2-tstart) / CLK_TCK); if(matrix != 'p' && matrix != 'P') { (void) printf(" Storage requirements: %.1f MB (%.1f KB/DoF)\n", sz / 1048576.0, --- 288,295 ---- getsize_clusterbasis(Mpoly->col)); (void) printf(" %.1f seconds\n" " %.1f seconds total\n", ! (double) (t2-t1) / clk_tck, ! (double) (t2-tstart) / clk_tck); if(matrix != 'p' && matrix != 'P') { (void) printf(" Storage requirements: %.1f MB (%.1f KB/DoF)\n", sz / 1048576.0, *************** *** 298,304 **** eval_supermatrix(Mpoly, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK / maxiter); } switch(matrix) { --- 302,308 ---- eval_supermatrix(Mpoly, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / clk_tck / maxiter); } switch(matrix) { *************** *** 314,320 **** HLIB_EUCLIDEAN_RELATIVE); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); del_supermatrix(Mpoly); Mpoly = NULL; --- 318,324 ---- HLIB_EUCLIDEAN_RELATIVE); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); del_supermatrix(Mpoly); Mpoly = NULL; *************** *** 328,334 **** eps, kmax, HLIB_EUCLIDEAN_RELATIVE); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); del_supermatrix(Mpoly); Mpoly = NULL; --- 332,338 ---- eps, kmax, HLIB_EUCLIDEAN_RELATIVE); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); del_supermatrix(Mpoly); Mpoly = NULL; *************** *** 352,358 **** #endif t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); switch(matrix) { --- 356,362 ---- #endif t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); switch(matrix) { *************** *** 368,374 **** } t2 = times(&buffer); (void) printf(" %.1f seconds total\n", ! (double) (t2-t1) / CLK_TCK); } sz = (getsize_supermatrix(M) + --- 372,378 ---- } t2 = times(&buffer); (void) printf(" %.1f seconds total\n", ! (double) (t2-t1) / clk_tck); } sz = (getsize_supermatrix(M) + *************** *** 394,400 **** eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK / maxiter); if(M->rows <= 32768 || M->cols <= 32768) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); --- 398,404 ---- eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / clk_tck / maxiter); if(M->rows <= 32768 || M->cols <= 32768) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); *************** *** 438,444 **** } (void) printf(" %.1f seconds\n" " Storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_supermatrix(Mfull) / 1048576.0); if(operator == 'd') { --- 442,448 ---- } (void) printf(" %.1f seconds\n" " Storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_supermatrix(Mfull) / 1048576.0); if(operator == 'd') { *************** *** 468,474 **** t1 = times(&buffer); Mc = coarsenh2_supermatrix(M, 0.1, 1, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / CLK_TCK); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Mc, M); (void) printf(" Relative approximation error: %.3g\n", error / norm); --- 472,478 ---- t1 = times(&buffer); Mc = coarsenh2_supermatrix(M, 0.1, 1, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / clk_tck); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Mc, M); (void) printf(" Relative approximation error: %.3g\n", error / norm); *************** *** 491,502 **** addrk2_supermatrix(Mmod->r,Mc,0,0); ludecomposition_supermatrix(Mc); t2 = times(&buffer); ! (void) printf(" %.1f seconds for LU\n",(double) (t2-t1) / CLK_TCK); } else { t1 = times(&buffer); choleskydecomposition_supermatrix(Mc); t2 = times(&buffer); ! (void) printf(" %.1f seconds for Cholesky\n",(double) (t2-t1) / CLK_TCK); } random_vector(M->cols, x0); --- 495,506 ---- addrk2_supermatrix(Mmod->r,Mc,0,0); ludecomposition_supermatrix(Mc); t2 = times(&buffer); ! (void) printf(" %.1f seconds for LU\n",(double) (t2-t1) / clk_tck); } else { t1 = times(&buffer); choleskydecomposition_supermatrix(Mc); t2 = times(&buffer); ! (void) printf(" %.1f seconds for Cholesky\n",(double) (t2-t1) / clk_tck); } random_vector(M->cols, x0); *************** *** 514,520 **** HLIB_PREC_CHOLESKY, 0x0, HLIB_EVAL_DEFAULT, 1); } t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / CLK_TCK); scale_lapack(M->rows,x1,-1.0); norm = norm2_lapack(M->rows,x1); --- 518,524 ---- HLIB_PREC_CHOLESKY, 0x0, HLIB_EVAL_DEFAULT, 1); } t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / clk_tck); scale_lapack(M->rows,x1,-1.0); norm = norm2_lapack(M->rows,x1); diff -N -r -c HLib-1.3/Examples/example_h2arith.c HLib-1.3new/Examples/example_h2arith.c *** HLib-1.3/Examples/example_h2arith.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_h2arith.c 2007-05-16 14:45:13.111347056 +0200 *************** *** 22,27 **** --- 22,28 ---- #include #include #include + #include /* ************************************************************ Demonstrate H^2-matrix arithmetics *************** *** 169,178 **** --- 170,182 ---- struct tms buffer; clock_t t1, t2, t1_h2, t2_h2, t1_ap, t2_ap, t1_ap2, t2_ap2; time_t t; + long clk_tck; size_t sz; int split, p, nfdeg, nmin; int i, maxiter, depth; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 291,297 **** t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %d blocks\n", ! (double) (t2-t1) / CLK_TCK, getnrnodes_blockcluster(blk)); t1 = times(&buffer); --- 295,301 ---- t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %d blocks\n", ! (double) (t2-t1) / clk_tck, getnrnodes_blockcluster(blk)); t1 = times(&buffer); *************** *** 299,305 **** M = virtual2_supermatrix(root, root, h2r, blk); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK); i = h2fault_supermatrix(M); (void) printf(" H^2-matrix check: %s\n", --- 303,309 ---- M = virtual2_supermatrix(root, root, h2r, blk); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / clk_tck); i = h2fault_supermatrix(M); (void) printf(" H^2-matrix check: %s\n", *************** *** 330,336 **** eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK / maxiter); if(M->rows <= 8192 || M->cols <= 8192) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); --- 334,340 ---- eval_supermatrix(M, x0, x1); t2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2-t1) / clk_tck / maxiter); if(M->rows <= 8192 || M->cols <= 8192) { (void) printf("# Printing the matrix structure to 'matrix.ps'\n"); *************** *** 371,377 **** apriorimuladd2_supermatrix(1.0, M, M, Mp); t2_ap = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2_ap-t1_ap) / CLK_TCK); (void) printf("# Testing a priori matrix\n"); error = normdiffprod_supermatrix(M, M, Mp, normiter); --- 375,381 ---- apriorimuladd2_supermatrix(1.0, M, M, Mp); t2_ap = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2_ap-t1_ap) / clk_tck); (void) printf("# Testing a priori matrix\n"); error = normdiffprod_supermatrix(M, M, Mp, normiter); *************** *** 388,394 **** t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_mixedmatrix(Mprod) / 1024.0 / 1024.0); (void) printf("# Concentrating mixed matrix\n"); --- 392,398 ---- t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_mixedmatrix(Mprod) / 1024.0 / 1024.0); (void) printf("# Concentrating mixed matrix\n"); *************** *** 397,403 **** t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_mixedmatrix(Mprod) / 1024.0 / 1024.0); if(M->rows <= 8192 || M->cols <= 8192) { --- 401,407 ---- t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_mixedmatrix(Mprod) / 1024.0 / 1024.0); if(M->rows <= 8192 || M->cols <= 8192) { *************** *** 413,419 **** t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_supermatrix(Mp) / 1024.0 / 1024.0); (void) printf("# Converting to H^2-matrix\n"); --- 417,423 ---- t2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_supermatrix(Mp) / 1024.0 / 1024.0); (void) printf("# Converting to H^2-matrix\n"); *************** *** 423,429 **** t2_h2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_supermatrix(M2) / 1024.0 / 1024.0); i = h2fault_supermatrix(M2); --- 427,433 ---- t2_h2 = times(&buffer); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_supermatrix(M2) / 1024.0 / 1024.0); i = h2fault_supermatrix(M2); *************** *** 457,463 **** del_supermatrix(Mh); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_supermatrix(Mp) / 1024.0 / 1024.0); (void) printf("# Testing H-matrix product\n"); --- 461,467 ---- del_supermatrix(Mh); (void) printf(" %.2f seconds\n" " %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_supermatrix(Mp) / 1024.0 / 1024.0); (void) printf("# Testing H-matrix product\n"); *************** *** 485,491 **** apriorimuladd2_supermatrix(1.0, M, M, M2b); t2_ap2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2_ap2-t1_ap2) / CLK_TCK); i = h2fault_supermatrix(M2b); (void) printf(" H^2-matrix check: %s\n", (i ? "Not passed" : "Passed")); --- 489,495 ---- apriorimuladd2_supermatrix(1.0, M, M, M2b); t2_ap2 = times(&buffer); (void) printf(" %.2f seconds\n", ! (double) (t2_ap2-t1_ap2) / clk_tck); i = h2fault_supermatrix(M2b); (void) printf(" H^2-matrix check: %s\n", (i ? "Not passed" : "Passed")); *************** *** 504,513 **** " H^2-matrix product: %.2f seconds\n" " A priori H^2-matrix product: %.2f seconds\n" " A priori with adapted bases: %.2f seconds\n", ! (double) (t2-t1) / CLK_TCK, ! (double) (t2_h2-t1_h2) / CLK_TCK, ! (double) (t2_ap-t1_ap) / CLK_TCK, ! (double) (t2_ap2-t1_ap2) / CLK_TCK); return 0; } --- 508,517 ---- " H^2-matrix product: %.2f seconds\n" " A priori H^2-matrix product: %.2f seconds\n" " A priori with adapted bases: %.2f seconds\n", ! (double) (t2-t1) / clk_tck, ! (double) (t2_h2-t1_h2) / clk_tck, ! (double) (t2_ap-t1_ap) / clk_tck, ! (double) (t2_ap2-t1_ap2) / clk_tck); return 0; } diff -N -r -c HLib-1.3/Examples/example_h2.c HLib-1.3new/Examples/example_h2.c *** HLib-1.3/Examples/example_h2.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_h2.c 2007-05-16 14:43:43.739933576 +0200 *************** *** 5,16 **** #include "supermatrix.h" #include "graphics.h" #include #include - #include #include #include ! #include /* ************************************************************ Demonstrate the construction of H^2-matrices on curves --- 5,17 ---- #include "supermatrix.h" #include "graphics.h" + #include + #include #include #include #include #include ! #include /* ************************************************************ Demonstrate the construction of H^2-matrices on curves *************** *** 30,37 **** --- 31,41 ---- time_t t; struct tms buffer; clock_t t1, t2; + long clk_tck; int i, n, p; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 87,93 **** t2 = times(&buffer); printf("# Time for the assembly was %.2f seconds.\n", ! (double) (t2-t1) / CLK_TCK); x0 = allocate_vector(M->cols); x1 = allocate_vector(M->rows); --- 91,97 ---- t2 = times(&buffer); printf("# Time for the assembly was %.2f seconds.\n", ! (double) (t2-t1) / clk_tck); x0 = allocate_vector(M->cols); x1 = allocate_vector(M->rows); diff -N -r -c HLib-1.3/Examples/example_h2direct.c HLib-1.3new/Examples/example_h2direct.c *** HLib-1.3/Examples/example_h2direct.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_h2direct.c 2007-05-16 14:45:43.985653448 +0200 *************** *** 19,24 **** --- 19,25 ---- #include #include #include + #include /* ------------------------------------------------------------ Demonstrate the direct method with H^2-matrices on surfaces *************** *** 132,140 **** --- 133,144 ---- struct tms buffer; clock_t t1, t2; time_t t; + long clk_tck; size_t sz; int split, p, nfdeg, nmin, nmax; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 283,289 **** V = virtual2_supermatrix(nroot, nroot, h2rV, blkV); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); sz = (getsize_supermatrix(V) + getsize_clusterbasis(V->row) + --- 287,293 ---- V = virtual2_supermatrix(nroot, nroot, h2rV, blkV); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); sz = (getsize_supermatrix(V) + getsize_clusterbasis(V->row) + *************** *** 315,321 **** K = virtual2_supermatrix(nroot, droot, h2rK, blkK); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); sz = (getsize_supermatrix(K) + getsize_clusterbasis(K->row) + --- 319,325 ---- K = virtual2_supermatrix(nroot, droot, h2rK, blkK); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); sz = (getsize_supermatrix(K) + getsize_clusterbasis(K->row) + *************** *** 353,359 **** t1 = times(&buffer); Vc = coarsenh2_supermatrix(V, 0.1, 1,0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / CLK_TCK); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Vc, V); (void) printf(" Relative approximation error: %.3g\n", error / norm); --- 357,363 ---- t1 = times(&buffer); Vc = coarsenh2_supermatrix(V, 0.1, 1,0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / clk_tck); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Vc, V); (void) printf(" Relative approximation error: %.3g\n", error / norm); *************** *** 364,370 **** choleskydecomposition_supermatrix(Vc); t2 = times(&buffer); (void) printf(" %.1f seconds for Cholesky\n", ! (double) (t2-t1) / CLK_TCK); /* --- Preparing tests */ --- 368,374 ---- choleskydecomposition_supermatrix(Vc); t2 = times(&buffer); (void) printf(" %.1f seconds for Cholesky\n", ! (double) (t2-t1) / clk_tck); /* --- Preparing tests */ *************** *** 380,386 **** M = buildmassmatrix_surfacebem(1, bfactoryK); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t1-t1) / CLK_TCK); /* --- Tests Dirichlet-to-Neumann mapping */ --- 384,390 ---- M = buildmassmatrix_surfacebem(1, bfactoryK); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t1-t1) / clk_tck); /* --- Tests Dirichlet-to-Neumann mapping */ diff -N -r -c HLib-1.3/Examples/example_simplebem3d.c HLib-1.3new/Examples/example_simplebem3d.c *** HLib-1.3/Examples/example_simplebem3d.c 2004-12-10 14:31:39.000000000 +0100 --- HLib-1.3new/Examples/example_simplebem3d.c 2007-05-16 14:47:36.763508608 +0200 *************** *** 19,24 **** --- 19,25 ---- #include #include #include + #include /* ------------------------------------------------------------ Demonstrate the direct boundary element method on surfaces *************** *** 77,84 **** --- 78,88 ---- struct tms buffer; clock_t t1, t2; time_t t; + long clk_tck; int split, p, nfdeg, nmin, nmax; + clk_tck = sysconf(_SC_CLK_TCK); + (void) time(&t); srand(t); *************** *** 168,174 **** V = build_supermatrix_from_blockcluster(blkV, 0, 0.0); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); (void) printf("# Filling single layer potential matrix\n"); t1 = times(&buffer); --- 172,178 ---- V = build_supermatrix_from_blockcluster(blkV, 0, 0.0); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); (void) printf("# Filling single layer potential matrix\n"); t1 = times(&buffer); *************** *** 178,184 **** " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getnrnodes_supermatrix(V), getsize_supermatrix(V) / 1048576.0, getsize_supermatrix(V) / 1024.0 / nmax, --- 182,188 ---- " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getnrnodes_supermatrix(V), getsize_supermatrix(V) / 1048576.0, getsize_supermatrix(V) / 1024.0 / nmax, *************** *** 194,200 **** K = build_supermatrix_from_blockcluster(blkK, 0, 0.0); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / CLK_TCK); (void) printf("# Filling double layer potential matrix\n"); t1 = times(&buffer); --- 198,204 ---- K = build_supermatrix_from_blockcluster(blkK, 0, 0.0); t2 = times(&buffer); (void) printf(" %.1f seconds\n", ! (double) (t2-t1) / clk_tck); (void) printf("# Filling double layer potential matrix\n"); t1 = times(&buffer); *************** *** 204,210 **** " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getnrnodes_supermatrix(K), getsize_supermatrix(K) / 1048576.0, getsize_supermatrix(K) / 1024.0 / nmax, --- 208,214 ---- " %d blocks\n" " Storage requirements: %.1f MB (%.1f KB/DoF)\n" " Nearfield storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getnrnodes_supermatrix(K), getsize_supermatrix(K) / 1048576.0, getsize_supermatrix(K) / 1024.0 / nmax, *************** *** 231,237 **** t1 = times(&buffer); Vc = coarsenh2_supermatrix(V, 0.01, 1, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / CLK_TCK); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Vc, V); --- 235,241 ---- t1 = times(&buffer); Vc = coarsenh2_supermatrix(V, 0.01, 1, 0); t2 = times(&buffer); ! (void) printf(" %.1f seconds\n",(double) (t2-t1) / clk_tck); (void) printf("# Computing approximation error\n"); error = norm2diff_supermatrix(Vc, V); *************** *** 245,251 **** choleskydecomposition_supermatrix(Vc); t2 = times(&buffer); (void) printf(" %.1f seconds for Cholesky\n", ! (double) (t2-t1) / CLK_TCK); /* --- Linear test example */ --- 249,255 ---- choleskydecomposition_supermatrix(Vc); t2 = times(&buffer); (void) printf(" %.1f seconds for Cholesky\n", ! (double) (t2-t1) / clk_tck); /* --- Linear test example */ *************** *** 258,271 **** t2 = times(&buffer); (void) printf(" %.1f seconds for the projection of Dirichlet values\n" " L^2-norm error: %g (%g)\n", ! (double) (t2-t1) / CLK_TCK, error, error/norm); t1 = times(&buffer); eval_supermatrix(K, diri, rhs); t2 = times(&buffer); (void) printf(" %.1f seconds for applying the double layer potential\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); solve_gmres_supermatrix(V, rhs, neum, 1e-8, 50, --- 262,275 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for the projection of Dirichlet values\n" " L^2-norm error: %g (%g)\n", ! (double) (t2-t1) / clk_tck, error, error/norm); t1 = times(&buffer); eval_supermatrix(K, diri, rhs); t2 = times(&buffer); (void) printf(" %.1f seconds for applying the double layer potential\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); solve_gmres_supermatrix(V, rhs, neum, 1e-8, 50, *************** *** 273,279 **** HLIB_EVAL_DEFAULT, 1); t2 = times(&buffer); (void) printf(" %.1f seconds for solving the system\n", ! (double) (t2-t1) / CLK_TCK); error = l2norm_surfacebem(neum, rhs_neumann_linear, 1, bfactoryV); norm = l2norm_surfacebem(NULL, rhs_neumann_linear, 1, bfactoryV); --- 277,283 ---- HLIB_EVAL_DEFAULT, 1); t2 = times(&buffer); (void) printf(" %.1f seconds for solving the system\n", ! (double) (t2-t1) / clk_tck); error = l2norm_surfacebem(neum, rhs_neumann_linear, 1, bfactoryV); norm = l2norm_surfacebem(NULL, rhs_neumann_linear, 1, bfactoryV); *************** *** 291,304 **** t2 = times(&buffer); (void) printf(" %.1f seconds for the projection of Dirichlet values\n" " L^2-norm error: %g (%g)\n", ! (double) (t2-t1) / CLK_TCK, error, error/norm); t1 = times(&buffer); eval_supermatrix(K, diri, rhs); t2 = times(&buffer); (void) printf(" %.1f seconds for applying the double layer potential\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); solve_gmres_supermatrix(V, rhs, neum, 1e-8, 50, --- 295,308 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for the projection of Dirichlet values\n" " L^2-norm error: %g (%g)\n", ! (double) (t2-t1) / clk_tck, error, error/norm); t1 = times(&buffer); eval_supermatrix(K, diri, rhs); t2 = times(&buffer); (void) printf(" %.1f seconds for applying the double layer potential\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); solve_gmres_supermatrix(V, rhs, neum, 1e-8, 50, *************** *** 306,312 **** HLIB_EVAL_DEFAULT, 1); t2 = times(&buffer); (void) printf(" %.1f seconds for solving the system\n", ! (double) (t2-t1) / CLK_TCK); error = l2norm_surfacebem(neum, rhs_neumann_quadratic, 1, bfactoryV); norm = l2norm_surfacebem(NULL, rhs_neumann_quadratic, 1, bfactoryV); --- 310,316 ---- HLIB_EVAL_DEFAULT, 1); t2 = times(&buffer); (void) printf(" %.1f seconds for solving the system\n", ! (double) (t2-t1) / clk_tck); error = l2norm_surfacebem(neum, rhs_neumann_quadratic, 1, bfactoryV); norm = l2norm_surfacebem(NULL, rhs_neumann_quadratic, 1, bfactoryV); diff -N -r -c HLib-1.3/Examples/example_simplefem.c HLib-1.3new/Examples/example_simplefem.c *** HLib-1.3/Examples/example_simplefem.c 2004-12-12 17:42:30.000000000 +0100 --- HLib-1.3new/Examples/example_simplefem.c 2007-05-16 14:47:44.248370736 +0200 *************** *** 12,17 **** --- 12,18 ---- #include #include #include + #include /* ************************************************************ Demonstrate the construction of FEM matrices *************** *** 30,39 **** --- 31,43 ---- int nx, ny, k; struct tms buffer; clock_t t1, t2; + long clk_tck; char buf[80]; double *x, x_pos, y_pos; int i; + clk_tck = sysconf(_SC_CLK_TCK); + nx = 32; ny = 32; k = 4; *************** *** 85,91 **** t1 = times(&buffer); choleskydecomposition_supermatrix(M); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf(" Time for the decomposition was %.2f seconds.\n",zeit); (void) printf("# Printing the matrix structure to 'matrixc.ps'\n"); --- 89,95 ---- t1 = times(&buffer); choleskydecomposition_supermatrix(M); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf(" Time for the decomposition was %.2f seconds.\n",zeit); (void) printf("# Printing the matrix structure to 'matrixc.ps'\n"); *************** *** 110,116 **** t1 = times(&buffer); solvecholesky_supermatrix(M,x); t2 = times(&buffer); ! zeit = (((double)t2-t1)/CLK_TCK); (void) printf(" Time for solving was %.2f seconds.\n",zeit); norm = norm2_lapack(M->rows,x); --- 114,120 ---- t1 = times(&buffer); solvecholesky_supermatrix(M,x); t2 = times(&buffer); ! zeit = (((double)t2-t1)/clk_tck); (void) printf(" Time for solving was %.2f seconds.\n",zeit); norm = norm2_lapack(M->rows,x); diff -N -r -c HLib-1.3/Library/h2virtual.c HLib-1.3new/Library/h2virtual.c *** HLib-1.3/Library/h2virtual.c 2005-06-30 10:23:38.000000000 +0200 --- HLib-1.3new/Library/h2virtual.c 2007-05-16 14:47:20.097042296 +0200 *************** *** 27,32 **** --- 27,33 ---- #include #include #include + #include #endif static const double RECOMP_EPS = 1e-20; *************** *** 844,849 **** --- 845,851 ---- #ifdef VERBOSE_RECOMPRESSION struct tms buffer; clock_t t1, t2; + long clk_tck; #endif assert(h2r != NULL); *************** *** 851,856 **** --- 853,860 ---- assert(blk->block_cols > 0); #ifdef VERBOSE_RECOMPRESSION + clk_tck = sysconf(_SC_CLK_TCK); + (void) printf(" Building column cluster basis product\n"); t1 = times(&buffer); #endif *************** *** 872,878 **** t2 = times(&buffer); (void) printf(" %.1f seconds for column basis product\n" " Building row cluster basis\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); #endif --- 876,882 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for column basis product\n" " Building row cluster basis\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); #endif *************** *** 913,919 **** t2 = times(&buffer); (void) printf(" %.1f seconds for row basis construction\n" " Storage for row basis: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(rb) / 1024.0 / 1024.0); #endif --- 917,923 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for row basis construction\n" " Storage for row basis: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(rb) / 1024.0 / 1024.0); #endif *************** *** 942,948 **** t2 = times(&buffer); (void) printf(" %.1f seconds for row cluster basis product\n" " Building column cluster basis and matrix\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); #endif --- 946,952 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for row cluster basis product\n" " Building column cluster basis and matrix\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); #endif *************** *** 978,984 **** (void) printf(" %.1f seconds for far- and nearfield\n" " Storage for column basis: %.1f MB\n" " Temporary storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(cb) / 1024.0 / 1024.0, (getsize_clusteroperator(rowproj) + getsize_clusteroperator(ww)) / 1024.0 / 1024.0); --- 982,988 ---- (void) printf(" %.1f seconds for far- and nearfield\n" " Storage for column basis: %.1f MB\n" " Temporary storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(cb) / 1024.0 / 1024.0, (getsize_clusteroperator(rowproj) + getsize_clusteroperator(ww)) / 1024.0 / 1024.0); *************** *** 1581,1589 **** --- 1585,1596 ---- #ifdef VERBOSE_RECOMPRESSION struct tms buffer; clock_t t1, t2; + long clk_tck; #endif #ifdef VERBOSE_RECOMPRESSION + clk_tck = sysconf(_SC_CLK_TCK); + (void) printf(" Building orthogonal row cluster basis\n"); t1 = times(&buffer); #endif *************** *** 1597,1603 **** " Storage for row basis: %.1f MB\n" " Storage for row projection operator: %.1f MB\n" " Building orthogonal column cluster basis\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(rb) / 1024.0 / 1024.0, getsize_clusteroperator(rproj) / 1024.0 / 1024.0); t1 = times(&buffer); --- 1604,1610 ---- " Storage for row basis: %.1f MB\n" " Storage for row projection operator: %.1f MB\n" " Building orthogonal column cluster basis\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(rb) / 1024.0 / 1024.0, getsize_clusteroperator(rproj) / 1024.0 / 1024.0); t1 = times(&buffer); *************** *** 1612,1618 **** " Storage for column basis: %.1f MB\n" " Storage for column projection operator: %.1f MB\n" " Building supermatrix\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(cb) / 1024.0 / 1024.0, getsize_clusteroperator(rproj) / 1024.0 / 1024.0); t1 = times(&buffer); --- 1619,1625 ---- " Storage for column basis: %.1f MB\n" " Storage for column projection operator: %.1f MB\n" " Building supermatrix\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(cb) / 1024.0 / 1024.0, getsize_clusteroperator(rproj) / 1024.0 / 1024.0); t1 = times(&buffer); *************** *** 1634,1640 **** #ifdef VERBOSE_RECOMPRESSION t2 = times(&buffer); (void) printf(" %.1f seconds for far- and nearfield\n", ! (double) (t2-t1) / CLK_TCK); #endif return s; --- 1641,1647 ---- #ifdef VERBOSE_RECOMPRESSION t2 = times(&buffer); (void) printf(" %.1f seconds for far- and nearfield\n", ! (double) (t2-t1) / clk_tck); #endif return s; *************** *** 2929,2934 **** --- 2936,2942 ---- #ifdef VERBOSE_RECOMPRESSION struct tms buffer; clock_t t1, t2; + long clk_tck; #endif assert(h2r != NULL); *************** *** 2936,2941 **** --- 2944,2951 ---- assert(blk->block_cols > 0); #ifdef VERBOSE_RECOMPRESSION + clk_tck = sysconf(_SC_CLK_TCK); + (void) printf(" Orthogonalizing row cluster basis\n"); t1 = times(&buffer); #endif *************** *** 2947,2953 **** t2 = times(&buffer); (void) printf(" %.1f seconds for row orthogonalization\n" " Orthogonalizing column cluster basis\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); #endif --- 2957,2963 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for row orthogonalization\n" " Orthogonalizing column cluster basis\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); #endif *************** *** 2958,2964 **** t2 = times(&buffer); (void) printf(" %.1f seconds for column orthogonalization\n" " Building row cluster basis\n", ! (double) (t2-t1) / CLK_TCK); t1 = times(&buffer); #endif --- 2968,2974 ---- t2 = times(&buffer); (void) printf(" %.1f seconds for column orthogonalization\n" " Building row cluster basis\n", ! (double) (t2-t1) / clk_tck); t1 = times(&buffer); #endif *************** *** 3006,3012 **** (void) printf(" %.1f seconds for row recompression\n" " Storage for row basis: %.1f MB\n" " Building column cluster basis and matrix\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(rb) / 1024.0 / 1024.0); t1 = times(&buffer); #endif --- 3016,3022 ---- (void) printf(" %.1f seconds for row recompression\n" " Storage for row basis: %.1f MB\n" " Building column cluster basis and matrix\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(rb) / 1024.0 / 1024.0); t1 = times(&buffer); #endif *************** *** 3048,3054 **** (void) printf(" %.1f seconds for column recompression and nearfield\n" " Storage for column basis: %.1f MB\n" " Temporary storage requirements: %.1f MB\n", ! (double) (t2-t1) / CLK_TCK, getsize_clusterbasis(cb) / 1024.0 / 1024.0, (getsize_clusterbasis(orb) + getsize_clusteroperator(orbp) + --- 3058,3064 ---- (void) printf(" %.1f seconds for column recompression and nearfield\n" " Storage for column basis: %.1f MB\n" " Temporary storage requirements: %.1f MB\n", ! (double) (t2-t1) / clk_tck, getsize_clusterbasis(cb) / 1024.0 / 1024.0, (getsize_clusterbasis(orb) + getsize_clusteroperator(orbp) +