PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

[SOLVED] Non-working OpenMP
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Tue Apr 30, 2013 10:59 am    Post subject: Reply with quote

It's a formatting issue. Since your file's suffix is ".f", fixed form is used. Hence, the directives need to start in column 1. Matt used a ".f90" suffix where free format was used.

You have three options, compile with "-Mfree", move the "!$OMP" directives to the first column, or rename your file to "main.f90".

Hope this helps,
Mat

Code:
% pgf90 -mp main.f -Minfo
% a.out
 Thread             0  local sum:     500500.0000000000     
 Global Sum:     500500.0000000000     
FORTRAN STOP

% pgf90 -mp main.f -Minfo -Mfree
main:
      9, Parallel region activated
     12, Parallel loop activated with static block schedule
     15, Barrier
     17, Begin critical section (__cs_unspc)
     18, End critical section (__cs_unspc)
         Parallel region terminated
% a.out
 Thread             0  local sum:     7875.000000000000     
 Thread             7  local sum:     117250.0000000000     
 Thread             6  local sum:     101625.0000000000     
 Thread             4  local sum:     70375.00000000000     
 Thread             2  local sum:     39125.00000000000     
 Thread             3  local sum:     54750.00000000000     
 Thread             5  local sum:     86000.00000000000     
 Thread             1  local sum:     23500.00000000000     
 Global Sum:     500500.0000000000     
FORTRAN STOP
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 263
Location: Greenbelt, MD

PostPosted: Tue Apr 30, 2013 11:05 am    Post subject: Reply with quote

I had a reply just like mat's but mat beat me to it.

And I learned that PGI supports ! as a comment character in column 1! (My edit used c$OMP).
Back to top
View user's profile
AZaldei



Joined: 22 Apr 2013
Posts: 9

PostPosted: Tue May 07, 2013 2:50 am    Post subject: Reply with quote

Whooops! You're absolutely right! I didn't notice!

Thanks! Addressing the formatting issue worked perfectly!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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 © 2001, 2002 phpBB Group