#include "trace.h" #include Event events[MAXTHREADS][MAXEVENTS]; int nevents[MAXTHREADS]; void trace_init(){ int i; #pragma omp master { /* strcpy(colors[0], "#d38d5f"); */ /* strcpy(colors[1], "#ffdd55"); */ /* strcpy(colors[2], "#8dd35f"); */ /* strcpy(colors[3], "#80b3ff"); */ /* strcpy(colors[4], "#e580ff"); */ for(i=0; i 0) nth=i+1; /* scale_x = 1000.0; */ /* scale_y = ((double)(nth+1)) *30000 / ((double)(t_stop-t_zero)); */ scale_x = ((double)(t_stop-t_zero))/1000.0; scale_y = 0.1; pFile = fopen (fname,"w"); fprintf(pFile,"\n", ((double)t_stop-t_zero)*1.06/scale_x, ((double)nth+1)*1.05/scale_y+8); for(t=0; t\n", (double)(ev.t_start-t_zero)/scale_x, ((double)t)/scale_y, ((double)(ev.t_stop-ev.t_start))/scale_x, ((double)1.0)/scale_y, colors[ev.type]); } } fprintf(pFile, "\n", ((double)nth+1)*1.01/scale_y, ((double)t_stop-t_zero)*1.02/scale_x, ((double)nth+1)*1.01/scale_y); for(t=0; tThread %d\n", ((double)t_stop-t_zero)*1.01/scale_x, ((double)t+0.8)/scale_y, t); } fprintf(pFile,"Time (usec.)\n",((double)nth+1)*1.05/scale_y+7); for(x=((double)t_stop-t_zero)/scale_x/10.0; x<=((double)t_stop-t_zero)/scale_x; x+=((double)t_stop-t_zero)/scale_x/10.0){ fprintf(pFile, "\n", x,((double)nth+1)*1.01/scale_y-1, x, ((double)nth+1)*1.01/scale_y+1); fprintf(pFile," %.0f \n", x,((double)nth+1)*1.01/scale_y+7,x*scale_x); } fprintf(pFile,"\n"); } }