profiling of OpenMP

General OpenMP discussion

profiling of OpenMP

Postby rashmi_k28 » Sun Mar 16, 2008 10:14 pm

1) Why profilers like Intel's V-Tune is required when there is a pofiling option in OPenMp by enbling the
profiling opton .

setenv OMPC_LOG

2) What is the difference between critical and reduction? As both are used to avoid race conditions?

3) In which case master is used in work sharing construct?
rashmi_k28
 
Posts: 8
Joined: Wed Mar 12, 2008 4:20 am

Re: profiling of OpenMP

Postby ejd » Mon Mar 17, 2008 7:09 am

1) Why profilers like Intel's V-Tune is required when there is a pofiling option in OpenMP by enabling the
profiling option .

setenv OMPC_LOG

OMPC_LOG is specific to omni and not OpenMP. OpenMP doesn't defined any profiling mechanism as part of the specification. Also the methods used for profiling can be quite different. Some profiling schemes instrument the run-time while others use a sampling technique.

2) What is the difference between critical and reduction? As both are used to avoid race conditions?

The forms of the expression for reduction are limited as opposed to critical. Also most implementations use some sort of algorithm to do a reduction that minimizes overhead and make it more efficient than critical (if it were used on the same code as the reduction).

3) In which case master is used in work sharing construct?

Master and single are very similar. With single, you don't care which thread executes the code and there is an implicit barrier at the end by default (which can be removed with a nowait). So you use a master construct only if you really care that the master thread is the thread executing a section of code. This was more important when storage reuse was allowed prior to version 3. Now, I really can't think of a good example of needing to use a master construct - but maybe someone else can give you a good example.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am


Return to Using OpenMP

Who is online

Users browsing this forum: TurnitinBot [Bot] and 10 guests