PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

What is _mp_p2 from the profiler?

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
brush



Joined: 26 Jun 2012
Posts: 44

PostPosted: Tue Apr 16, 2013 8:09 pm    Post subject: What is _mp_p2 from the profiler? Reply with quote

Hi,

I am trying to use openMP to speedup a subroutine. I get two mp routines taking up considerable time:

_mp_p2 28% (81.66 seconds)
and
_mp_barrier 3% (9.33 seconds)

I am guessing the barrier is showing considerable time because I have a critical region, so I am guessing there are some threads that are waiting to execute the critical region and that time accumulates as _mp_barrier.

However, I do not know what _mp_p2 is. Usually a lot of time is spent in the routine grid, which is what I am using OMP on, but it seems that much of grid's time has been transfered to this _mp_p2.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6129
Location: The Portland Group Inc.

PostPosted: Wed Apr 17, 2013 8:41 am    Post subject: Reply with quote

Hi Ben,

"_mp_p2" is a spin lock for critical sections. The 81 seconds is not wall clock time, rather the combined time of all threads spent spinning on a semaphore. One thing you can do is set the environment variable "MP_SPIN" to a small value, like 1. MP_SPIN defines the number of times the semaphore is checked before putting the thread to sleep. By setting it to a small value, the thread will enter a sleep state sooner and the "_mp_p2" routine shouldn't show up in your profile.

- Mat
Back to top
View user's profile
brush



Joined: 26 Jun 2012
Posts: 44

PostPosted: Wed Apr 17, 2013 3:28 pm    Post subject: Reply with quote

Thanks Mat.

Though, I think in my case it is wallclock time, because for some reason the profiler thinks I only have a single-threaded program. (And the time only adds up correctly when it is counted as wallclock time.)
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group