[GRASS-SVN] r50075 - grass/trunk/lib/gmath/test
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jan 6 08:50:00 EST 2012
Author: huhabla
Date: 2012-01-06 05:49:59 -0800 (Fri, 06 Jan 2012)
New Revision: 50075
Modified:
grass/trunk/lib/gmath/test/Makefile
grass/trunk/lib/gmath/test/bench_blas2.c
grass/trunk/lib/gmath/test/bench_blas3.c
grass/trunk/lib/gmath/test/bench_solver_direct.c
grass/trunk/lib/gmath/test/bench_solver_krylov.c
Log:
Write benchmark result to stdout
Modified: grass/trunk/lib/gmath/test/Makefile
===================================================================
--- grass/trunk/lib/gmath/test/Makefile 2012-01-05 19:14:13 UTC (rev 50074)
+++ grass/trunk/lib/gmath/test/Makefile 2012-01-06 13:49:59 UTC (rev 50075)
@@ -3,7 +3,7 @@
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
Modified: grass/trunk/lib/gmath/test/bench_blas2.c
===================================================================
--- grass/trunk/lib/gmath/test/bench_blas2.c 2012-01-05 19:14:13 UTC (rev 50074)
+++ grass/trunk/lib/gmath/test/bench_blas2.c 2012-01-06 13:49:59 UTC (rev 50075)
@@ -71,35 +71,35 @@
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);
Modified: grass/trunk/lib/gmath/test/bench_blas3.c
===================================================================
--- grass/trunk/lib/gmath/test/bench_blas3.c 2012-01-05 19:14:13 UTC (rev 50074)
+++ grass/trunk/lib/gmath/test/bench_blas3.c 2012-01-06 13:49:59 UTC (rev 50075)
@@ -67,14 +67,14 @@
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)
Modified: grass/trunk/lib/gmath/test/bench_solver_direct.c
===================================================================
--- grass/trunk/lib/gmath/test/bench_solver_direct.c 2012-01-05 19:14:13 UTC (rev 50074)
+++ grass/trunk/lib/gmath/test/bench_solver_direct.c 2012-01-06 13:49:59 UTC (rev 50075)
@@ -54,7 +54,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);
Modified: grass/trunk/lib/gmath/test/bench_solver_krylov.c
===================================================================
--- grass/trunk/lib/gmath/test/bench_solver_krylov.c 2012-01-05 19:14:13 UTC (rev 50074)
+++ grass/trunk/lib/gmath/test/bench_solver_krylov.c 2012-01-06 13:49:59 UTC (rev 50075)
@@ -57,13 +57,13 @@
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 @@
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 @@
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 @@
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);
More information about the grass-commit
mailing list