Author: bart
Date: 2008-03-10 19:17:46 +0000 (Mon, 10 Mar 2008)
New Revision: 7630
Log:
Number of threads is now a command line argument.
Added:
trunk/exp-drd/tests/matinv_openmp.vgtest
Modified:
trunk/exp-drd/tests/matinv_openmp.c
Modified: trunk/exp-drd/tests/matinv_openmp.c
===================================================================
--- trunk/exp-drd/tests/matinv_openmp.c 2008-03-10 18:37:22 UTC (rev 7629)
+++ trunk/exp-drd/tests/matinv_openmp.c 2008-03-10 19:17:46 UTC (rev 7630)
@@ -14,8 +14,9 @@
#include <assert.h>
#include <math.h>
+#include <omp.h>
+#include <stdio.h>
#include <stdlib.h>
-#include <stdio.h>
/*********************/
@@ -250,6 +251,7 @@
int main(int argc, char** argv)
{
int matrix_size;
+ int nthread;
int silent;
elem_t *a, *inv, *prod;
elem_t eps;
@@ -257,8 +259,12 @@
double ratio;
matrix_size = (argc > 1) ? atoi(argv[1]) : 3;
- silent = (argc > 2) ? atoi(argv[2]) : 0;
+ nthread = (argc > 2) ? atoi(argv[2]) : 3;
+ silent = (argc > 3) ? atoi(argv[3]) : 0;
+ omp_set_num_threads(nthread);
+ omp_set_dynamic(0);
+
eps = epsilon();
a = new_matrix(matrix_size, matrix_size);
init_matrix(a, matrix_size, matrix_size);
Added: trunk/exp-drd/tests/matinv_openmp.vgtest
===================================================================
--- trunk/exp-drd/tests/matinv_openmp.vgtest (rev 0)
+++ trunk/exp-drd/tests/matinv_openmp.vgtest 2008-03-10 19:17:46 UTC (rev
7630)
@@ -0,0 +1,2 @@
+prog: matinv_openmp
+args: 30 15 1
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers