Kaynağa Gözat

Write benchmark result to stdout

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50075 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 yıl önce
ebeveyn
işleme
97ed344885

+ 1 - 1
lib/gmath/test/Makefile

@@ -3,7 +3,7 @@ MODULE_TOPDIR = ../../..
 PGM=test.gmath.lib
 
 LIBES = $(GISLIB) $(GMATHLIB) $(OMPLIB)
-DEPENDENCIES = $(GISDEP) $(GMATHDEP)
+DEPENDENCIES = $(GISDEP) $(GMATHDEP) $(OMPDEP)
 EXTRA_CFLAGS = $(OMPCFLAGS)
 
 include $(MODULE_TOPDIR)/include/Make/Module.make

+ 5 - 5
lib/gmath/test/bench_blas2.c

@@ -71,35 +71,35 @@ void bench_blas_level_2_double(int rows)
     G_math_Ax_sparse(sples->Asp, x, z, rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_Ax_sparse: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_Ax_sparse: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 #pragma omp parallel default(shared)
 {
     G_math_Ax_sband(bles->A, x, z, rows, rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_Ax_sband: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_Ax_sband: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 #pragma omp parallel default(shared)
 {
     G_math_d_Ax(les->A, x, z, rows, rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_d_Ax: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_d_Ax: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 #pragma omp parallel default(shared)
 {
     G_math_d_aAx_by(les->A, x, y, 3.0, 4.0, z, rows, rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_d_Ax_by: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_d_Ax_by: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 #pragma omp parallel default(shared)
 {
     G_math_d_x_dyad_y(x, x, A, rows, rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_d_x_dyad: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_d_x_dyad: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 
 

+ 2 - 2
lib/gmath/test/bench_blas3.c

@@ -67,14 +67,14 @@ void bench_blas_level_3_double(int rows)
     G_math_d_aA_B(A, B, 4.0 , C, rows , rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_d_aA_B: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_d_aA_B: %g\n", compute_time_difference(tstart, tend));
     gettimeofday(&tstart, NULL);
 #pragma omp parallel default(shared)
 {
     G_math_d_AB(A, B, C, rows , rows , rows);
 }
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time G_math_d_AB: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time G_math_d_AB: %g\n", compute_time_difference(tstart, tend));
 
 
     if(x)

+ 6 - 6
lib/gmath/test/bench_solver_direct.c

@@ -54,7 +54,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_lu(les->A, les->x, les->b, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time gmath lu decomposition: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time gmath lu decomposition: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
     G_message("\t * benchmarking lu ccmath decomposition solver with unsymmetric matrix\n");
@@ -63,7 +63,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solv(les->A, les->b, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time ccmath lu decomposition: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time ccmath lu decomposition: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
 
@@ -73,7 +73,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_gauss(les->A, les->x, les->b, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time gauss elimination: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time gauss elimination: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
     G_message("\t * benchmarking gmath cholesky decomposition solver with symmetric matrix\n");
@@ -82,7 +82,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_cholesky(les->A, les->x, les->b, les->rows, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time gmath cholesky decomposition: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time gmath cholesky decomposition: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
     G_message("\t * benchmarking ccmath cholesky decomposition solver with symmetric matrix\n");
@@ -91,7 +91,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solvps(les->A, les->b, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time ccmath cholesky decomposition: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time ccmath cholesky decomposition: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
     G_message("\t * benchmarking gmath cholesky band matrix decomposition solver with symmetric band matrix\n");
@@ -100,7 +100,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_cholesky_sband(les->A, les->x, les->b, les->rows, les->rows);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time cholesky band matrix decomposition: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time cholesky band matrix decomposition: %g\n", compute_time_difference(tstart, tend));
     G_math_free_les(les);
 
 

+ 7 - 7
lib/gmath/test/bench_solver_krylov.c

@@ -57,13 +57,13 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_pcg(les->A, les->x, les->b, les->rows, 250, 0.1e-9, 1);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time pcg normal matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time pcg normal matrix: %g\n", compute_time_difference(tstart, tend));
 
     gettimeofday(&tstart, NULL);
     G_math_solver_sparse_pcg(sples->Asp, sples->x, sples->b, les->rows, 250,
             0.1e-9, 1);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time pcg sparse matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time pcg sparse matrix: %g\n", compute_time_difference(tstart, tend));
 
     G_math_free_les(les);
     G_math_free_les(sples);
@@ -76,13 +76,13 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_cg(les->A, les->x, les->b, les->rows, 250, 0.1e-9);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time cg normal matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time cg normal matrix: %g\n", compute_time_difference(tstart, tend));
     
     gettimeofday(&tstart, NULL);
     G_math_solver_sparse_cg(sples->Asp, sples->x, sples->b, les->rows, 250,
             0.1e-9);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time cg sparse matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time cg sparse matrix: %g\n", compute_time_difference(tstart, tend));
     
     G_math_free_les(les);
     G_math_free_les(sples);
@@ -94,7 +94,7 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_cg_sband(les->A, les->x, les->b, les->rows, les->rows, 250, 0.1e-9);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time cg symmetric band matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time cg symmetric band matrix: %g\n", compute_time_difference(tstart, tend));
     
     G_math_free_les(les);
 
@@ -106,13 +106,13 @@ int bench_solvers(int rows) {
     gettimeofday(&tstart, NULL);
     G_math_solver_bicgstab(les->A, les->x, les->b, les->rows, 250, 0.1e-9);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time bicgstab normal matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time bicgstab normal matrix: %g\n", compute_time_difference(tstart, tend));
     
     gettimeofday(&tstart, NULL);
     G_math_solver_sparse_bicgstab(sples->Asp, sples->x, sples->b, les->rows,
             250, 0.1e-9);
     gettimeofday(&tend, NULL);
-    G_important_message("Computation time bicgstab sparse matrix: %g\n", compute_time_difference(tstart, tend));
+    printf("Computation time bicgstab sparse matrix: %g\n", compute_time_difference(tstart, tend));
 
     G_math_free_les(les);
     G_math_free_les(sples);