PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

openacc seq directive overridden by parallel directive

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
li7hui



Joined: 20 Jun 2012
Posts: 1

PostPosted: Mon Jun 25, 2012 4:28 pm    Post subject: openacc seq directive overridden by parallel directive Reply with quote

Hello,

I have a pretty simple program has a "for loop" coupled with openacc "seq" directive. However, the -Minfo output "Loop is parallelizable" for that code region tagged with "seq" which indicates that this code is scheduled in parallel rather than sequentially.

Here is my code:
Code:

#pragma acc for seq
        for(int i = 0; i < NUM; i++){
                float a = 1.0;
        }//for


Here is my OpenACC Flag in Makefile
Code:
ACCFLAGS = -Msafeptr -fast -ta=nvidia,time -Minfo=acc -Minline=levels:3 -acc


Please let me know if I did something wrong.

Thank you,
Hui
Back to top
View user's profile
toepfer



Joined: 04 Dec 2007
Posts: 47

PostPosted: Tue Jun 26, 2012 12:11 pm    Post subject: Reply with quote

I don't think you did anything wrong. I tried a small experiment using your code and the compiler emitted the following messages:

Code:
     9, Loop is parallelizable
         Accelerator kernel generated


I then ran the resultant executable, first setting the environment variable ACC_NOTIFY

    export ACC_NOTIFY=1
    ./a.out


I got the following output:

    launch kernel file=x.c function=foo line=9 device=0 grid=1 block=1 queue=0


It does appear that it ran the kernel sequentially(block=1), even though the compiler output messages don't seem to suggest this. I will follow up and see about getting the correct message emitted from the compiler.
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
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