PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

PGI FORTRAN OpenMP: poor performance in a big loop???
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Mon Jun 11, 2012 1:25 pm    Post subject: Reply with quote

Hi Nick,

You don't want PASSIVE since this will put the threads to sleep, making it worse.

While I was using Linux before, I just tested Windows with "set MP_SPIN=0" and it worked as expected. Granted, not as well as Linux but there was a speed-up when going from the default to setting "MP_SPIN". Note that since this code does very little work, it's just testing the OpenMP overhead, I wouldn't expect any parallel speed-up.

- Mat
Back to top
View user's profile
Nick Kong



Joined: 08 Jun 2012
Posts: 11

PostPosted: Mon Jun 11, 2012 2:15 pm    Post subject: Reply with quote

Dear Mat,

Thank you for your quick response!

I set MP_SPIN=0 and OMP_WAIT_POLICY=ACTIVE through Windows Control panel and rerun the example codes -- the parallel computing is still much slower than the sequential computing. I may need to restart my machine -- I will do this ....

Thank you again!
Nick
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jun 11, 2012 3:32 pm    Post subject: Reply with quote

Quote:
I set MP_SPIN=0 and OMP_WAIT_POLICY=ACTIVE through Windows Control panel

If you still don't see any change, can you try setting then variables from a PGI DOS Command Window?

Thanks,
Mat
Back to top
View user's profile
Nick Kong



Joined: 08 Jun 2012
Posts: 11

PostPosted: Mon Jun 11, 2012 6:29 pm    Post subject: Reply with quote

I have tried to set those variables through both control panel and DOS command window (is this the PGI DOS command windows?), but the parallel computing is still much slower than the sequential computing. Currently, I am using "-O2 -fast" options for PGI FORTRAN compiler which make the sequential computing pretty fast, thus comparatively the parallel computing is slower. I will check this when I come back to my office tomorrow. THank you! Nick
Back to top
View user's profile
Nick Kong



Joined: 08 Jun 2012
Posts: 11

PostPosted: Tue Jun 12, 2012 11:38 am    Post subject: Reply with quote

Dear Mat,

(1) As you suggested, MP_SPIN is set to 0;
(2) If the example codes is copiled with option "-mp", the "parallel computing" is faster than "sequential computing";
(3) If the example codes is compiled with options "-mp -O3 -fast", the "sequential computing" is much faster than "parallel computing" (with MP_SPIN set to 0);

It seems the options "-O3 -fast" only speedup sequential computing. Therefore, the sequential computing with "-O3 -fast" is better choice compared to parallel computing?

Nick
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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