|
@@ -66,7 +66,7 @@ static long submitorder = -1;
|
|
|
static starpu_tag_t tag;
|
|
|
static int workerid;
|
|
|
static uint32_t footprint;
|
|
|
-static double flops;
|
|
|
+static double flops, total_flops = 0.;
|
|
|
|
|
|
static double startTime;
|
|
|
static double endTime;
|
|
@@ -345,7 +345,7 @@ void dumb_kernel(void *buffers[], void *args) {
|
|
|
nexecuted_tasks++;
|
|
|
if (!(nexecuted_tasks % 1000))
|
|
|
{
|
|
|
- printf("\rExecuted task %lu...", nexecuted_tasks);
|
|
|
+ fprintf(stderr, "\rExecuted task %lu...", nexecuted_tasks);
|
|
|
fflush(stdout);
|
|
|
}
|
|
|
|
|
@@ -614,7 +614,7 @@ int submit_tasks(void)
|
|
|
|
|
|
if (ret_val != 0)
|
|
|
{
|
|
|
- printf("\nWhile submitting task %ld (%s): return %d\n",
|
|
|
+ fprintf(stderr, "\nWhile submitting task %ld (%s): return %d\n",
|
|
|
currentTask->submit_order,
|
|
|
currentTask->task.name? currentTask->task.name : "unknown",
|
|
|
ret_val);
|
|
@@ -622,10 +622,10 @@ int submit_tasks(void)
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (!(currentTask->submit_order % 1000))
|
|
|
{
|
|
|
- printf("\rSubmitted task order %ld...", currentTask->submit_order);
|
|
|
+ fprintf(stderr, "\rSubmitted task order %ld...", currentTask->submit_order);
|
|
|
fflush(stdout);
|
|
|
}
|
|
|
if (currentTask->submit_order != -1)
|
|
@@ -646,7 +646,7 @@ int submit_tasks(void)
|
|
|
currentNode = starpu_rbtree_next(currentNode);
|
|
|
|
|
|
}
|
|
|
- printf(" done.\n");
|
|
|
+ fprintf(stderr, " done.\n");
|
|
|
|
|
|
return 1;
|
|
|
}
|
|
@@ -729,7 +729,7 @@ int main(int argc, char **argv)
|
|
|
|
|
|
if (!fgets(s, s_allocated, rec))
|
|
|
{
|
|
|
- printf(" done.\n");
|
|
|
+ fprintf(stderr, " done.\n");
|
|
|
int submitted = submit_tasks();
|
|
|
|
|
|
if (submitted == -1)
|
|
@@ -747,7 +747,7 @@ int main(int argc, char **argv)
|
|
|
|
|
|
if (!fgets(s + s_allocated-1, s_allocated+1, rec))
|
|
|
{
|
|
|
- printf("\n");
|
|
|
+ fprintf(stderr, "\n");
|
|
|
int submitted = submit_tasks();
|
|
|
|
|
|
if (submitted == -1)
|
|
@@ -895,6 +895,7 @@ int main(int argc, char **argv)
|
|
|
|
|
|
task->task.cl_arg = arg;
|
|
|
task->task.flops = flops;
|
|
|
+ total_flops += flops;
|
|
|
}
|
|
|
|
|
|
task->task.cl_arg_size = 0;
|
|
@@ -922,7 +923,7 @@ int main(int argc, char **argv)
|
|
|
nread_tasks++;
|
|
|
if (!(nread_tasks % 1000))
|
|
|
{
|
|
|
- printf("\rRead task %lu...", nread_tasks);
|
|
|
+ fprintf(stderr, "\rRead task %lu...", nread_tasks);
|
|
|
fflush(stdout);
|
|
|
}
|
|
|
|
|
@@ -1112,9 +1113,11 @@ int main(int argc, char **argv)
|
|
|
eof:
|
|
|
|
|
|
starpu_task_wait_for_all();
|
|
|
- printf(" done.\n");
|
|
|
+ fprintf(stderr, " done.\n");
|
|
|
|
|
|
- printf("Simulation ended. Elapsed simulated time: %g ms\n", (starpu_timing_now() - start) / 1000.);
|
|
|
+ printf("%g ms\n", (starpu_timing_now() - start) / 1000.);
|
|
|
+ if (total_flops != 0.)
|
|
|
+ printf("%g GF/s\n", (total_flops / (starpu_timing_now() - start)) / 1000.);
|
|
|
|
|
|
|
|
|
|