Skip to content
Snippets Groups Projects
Commit 4c6c814f authored by Aidan Chalk's avatar Aidan Chalk
Browse files

Update to #15, now TASKTIMERS is output and configure is fixed

parent 9e4d1d1e
No related branches found
No related tags found
1 merge request!9Task timers
......@@ -99,22 +99,23 @@ if test "$enable_san" = "yes"; then
fi
fi
# Autoconf stuff
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_ARG_ENABLE([task-timers],
[AS_HELP_STRING([--enable-task-timers],
[Enables task timer output and collection of extra data to enable it])].
[enable_tts]="$enableval$"],
[enable_tts]="no"]
[Enables task timer output and collection of extra data to enable it])],
[enable_tts="$enableval"],
[enable_tts="no"]
)
if test "$enable_tts" = "yes"; then
AC_DEFINE(WITH_TASK_TIMERS,1,[Define if Task Timer recording is enabled])
fi
# Autoconf stuff
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
# Check for pthreads.
AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC" LDFLAGS="$LDFLAGS $PTHREAD_LIBS $LIBS"]
......
......@@ -609,7 +609,7 @@ void qsched_done ( struct qsched *s , struct task *t ) {
/* Set the task stats. */
t->toc = getticks();
#ifdef WITH_TASK_TIMERS
t->tid = qsched_get_tid();
t->tid = omp_get_thread_num();
#endif
if (!(s->flags & qsched_flag_norecost))
t->cost = t->toc - t->tic;
......@@ -1658,11 +1658,11 @@ FILE *task_file;
task_file = fopen(filename, "w");
for(int i = 0; i < s->nr_tasks; i++)
for(int i = 0; i < s->count; i++)
{
struct task *t = s->tasks[i];
struct task *t = &s->tasks[i];
fprintf("%i %i %lli %lli\n", t->type, t->tid, t->tic, t->toc);
fprintf(task_file,"%i %i %lli %lli\n", t->type, t->tid, t->tic, t->toc);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment