|
| View previous topic :: View next topic |
| Author |
Message |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Tue Apr 30, 2013 10:59 am Post subject: |
|
|
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 |
|
 |
TheMatt
Joined: 06 Jul 2009 Posts: 263 Location: Greenbelt, MD
|
Posted: Tue Apr 30, 2013 11:05 am Post subject: |
|
|
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 |
|
 |
AZaldei
Joined: 22 Apr 2013 Posts: 9
|
Posted: Tue May 07, 2013 2:50 am Post subject: |
|
|
Whooops! You're absolutely right! I didn't notice!
Thanks! Addressing the formatting issue worked perfectly! |
|
| Back to top |
|
 |
|
|
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
|