To enable profiling of the execution, turn on profiling by setting OMPC_LOG:
setenv OMPC_LOGAnd run your OpenMP program as usual. For example:
a.outWhen run your program, the log file is created with the name of your program and ".log" extension. For example, if the name of the program is "a.out", the log file "a.out.log" is created. In the log file, several timings of parallel region, barrier and scheduling events are included. The kinds of the events in the log file are defined in "lib/libtlog/tlog.h".
To see the log file, use "tlogview" command:
tlogview a.out.logtlogview is a profile visualization tool, which allow you to check several states and events of OpenMP during the execution in the window. By dragging the region in the window by mouse, you can zoom up the selected region to see the status more preciously. For more information and usage of tlogview, check tlogview .
To disable profiling, unset OMPC_LOG environment variable:
unsetenv OMPC_LOG
Note that when profiling is on, the execution is getting slow down due to the overhead for getting the timing for each event. As default, the timer routine uses the "gettimeofday" system call which give wall clock time. The resolution of timing depends on the timer routine. You may replace the timer routine with platform-specific routine in "lib/libtlog/tlog-time.c".