[GRASS-SVN] r57476 - sandbox/soeren/benchmarks/neighborhood_openmp
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 21 07:12:42 PDT 2013
Author: neteler
Date: 2013-08-21 07:12:42 -0700 (Wed, 21 Aug 2013)
New Revision: 57476
Modified:
sandbox/soeren/benchmarks/neighborhood_openmp/benchmark.sh
Log:
openMP benchmark.sh: main.c -> neighbor_bench.c; +AVX-i test
Modified: sandbox/soeren/benchmarks/neighborhood_openmp/benchmark.sh
===================================================================
--- sandbox/soeren/benchmarks/neighborhood_openmp/benchmark.sh 2013-08-20 14:30:44 UTC (rev 57475)
+++ sandbox/soeren/benchmarks/neighborhood_openmp/benchmark.sh 2013-08-21 14:12:42 UTC (rev 57476)
@@ -3,10 +3,31 @@
# Author: Soeren Gebbert
# License: GPL >=2
-gcc -Wall -fopenmp -lgomp -Ofast main.c -o neighbor
+#
+# requires gcc 4.7+
+
+gcc -Wall -fopenmp -lgomp -Ofast neighbor_bench.c -o neighbor
+
+echo "openMP tests 1/2/4 threads...:"
+
export OMP_NUM_THREADS=1
+#time ./neighbor 5000 5000 23
+export OMP_NUM_THREADS=2
+#time ./neighbor 5000 5000 23
+export OMP_NUM_THREADS=4
time ./neighbor 5000 5000 23
+
+echo "------------------------------"
+echo "openMP tests 1/2/4 threads with AVX-i...:"
+
+# requires recent processors, see
+# http://en.wikipedia.org/wiki/Advanced_Vector_Extensions
+gcc -Wall -fopenmp -lgomp -Ofast -fno-fast-math -march=core-avx-i neighbor_bench.c -o neighbor
+
+export OMP_NUM_THREADS=1
+time ./neighbor 5000 5000 23
export OMP_NUM_THREADS=2
time ./neighbor 5000 5000 23
export OMP_NUM_THREADS=4
time ./neighbor 5000 5000 23
+
More information about the grass-commit
mailing list