From e9285d0cdea756a2830f0ace378e4197b36869aa Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Fri, 12 Jun 2020 01:44:56 +0000 Subject: Add initial instrumentation to and fix warnings in DIS stressmarks Changes: - Backpoint fix to randInt range - Instrument benchmarks with time tracking - assert inputs are correct length to fix compiler warnings Problems: - Timing on a per-loop basis is non representative of real-world workloads, as we clear the cache after every loop. These all need to be re-instrumented to record times for the whole benchmark, rather than per-loop. --- dis/original/Matrix/ver2/matrix.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dis/original/Matrix') diff --git a/dis/original/Matrix/ver2/matrix.c b/dis/original/Matrix/ver2/matrix.c index 56245a6..957d7c5 100755 --- a/dis/original/Matrix/ver2/matrix.c +++ b/dis/original/Matrix/ver2/matrix.c @@ -41,6 +41,7 @@ #include #include #include "DISstressmarkRNG.h" +#include "extra.h" #define MIN_SEED -2147483647 #define MAX_SEED -1 @@ -60,6 +61,8 @@ */ static int dim; +int argc; +char** argv; /* * matrix * vector @@ -329,6 +332,7 @@ void biConjugateGradient(double *value, int i; int l; int ll; + SET_UP alpha = 0; beta = 0; @@ -365,6 +369,7 @@ void biConjugateGradient(double *value, iteration = 0; while ((iteration < maxIterations) && (error > errorTolerance)){ + START_LOOP /* * alpha = (transpose(vectorR) * vectorR) / @@ -429,6 +434,7 @@ void biConjugateGradient(double *value, error = vectorValue(tmpVector1)/vectorValue(vectorB); iteration++; + STOP_LOOP } *actualError = error; @@ -440,6 +446,7 @@ void biConjugateGradient(double *value, free(vectorR); free(vectorP); + WRITE_TO_FILE return; } @@ -508,9 +515,10 @@ void create_CRS(double *matrixA, } - -int main() +int main(int _argc, char** _argv) { + argc = _argc; + argv = _argv; int seed; int numberNonzero; int maxIterations; -- cgit v1.2.2