c - Time issue with Successive execution of OpenMP scripts -



c - Time issue with Successive execution of OpenMP scripts -

i'm having issues execution times of c openmp scripts.

timing within script done on block of code using gettimeofday() function:

gettimeofday(&tim, null); double t1=tim.tv_sec+(tim.tv_usec/1000000.0); .. timed code here gettimeofday(&tim, null); double t2=tim.tv_sec+(tim.tv_usec/1000000.0); printf("%.6lf seconds elapsed\n", t2-t1);

however when run scripts successively time each execution increases:

the script has not been edited since yesterday did not have issue. also, found when leaving time (say 10-20 seconds) rerunning programme execution time starts decrease.

my guess is to process itself. using gcc version 4.8.2 compile on linux mint 17 using xfce (gcc 4.8.2-19ubuntu1):

gcc bluromp.c -fopenmp -o bluromp.out

any ideas?

edit: added clock() time.h testing:

start_t = clock(); .. timed code here total_t = (double)(end_t - start_t) / clocks_per_sec; printf("time.h clock result: %ld\n", total_t);

results:

clock increasing although workload in programme same (as said previously, if wait ~20 seconds execution time less

edit 2:

when running on machine results successive runs of programme correct, problem lies on scheme somewhere.

edit 3:

using sync not help, morning timings seem jump rather increase, think must cache or memory issue somewhere:

edit 4:

used vmstat memory/cpu info:

c terminal openmp linuxmint xfce

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -