PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

openMP: threadprivate not effected and function variables no
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
karthi_selvam



Joined: 24 Jan 2006
Posts: 4

PostPosted: Tue Jan 24, 2006 6:21 am    Post subject: openMP: threadprivate not effected and function variables no Reply with quote

Problem 1: The threadprivate common block variable which is copiedin in two threads, is not private in the threads but is shared between the threads.(The memory address seen in the debugger(pgdbg) is same in both the threads).

Problem 2: Variables passed in subroutine calls inside a parallel region are not getting passed. There is no memory address and value shown in the pgdbg debugger.

The compiler is pgf90 in Linux platform.
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 108

PostPosted: Tue Jan 24, 2006 2:44 pm    Post subject: Reply with quote

Problem 1 is a known issue in the current pgdbg. It turns out that the compiler is not producing dwarf information for threadprivate variables as well. This will be fixed in a future release.

Problem 2 we may need a little more information on. What type of variables are being passed within the parallel region? Can you include a little code snippet?
Back to top
View user's profile
karthi_selvam



Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Feb 08, 2006 9:59 pm    Post subject: Reply with quote

Thanks for your reply, We have found a workaround for Problem1. Following is the explaination for Problem2:

The parallelisation is done for a DO loop inside which various call for subroutines are made. If for eg. I pass around 50 variables as arguments for this routine, some of the arguments are not passed to the called routine. Generally as I notice, only 2 contiguous variables are not getting passed. Other variables gets passed properly.

C$OMP PARALLEL
C$OMP& PRIVATE( A, B, C)
C$OMP& SHARED(X, Y, Z)
C$OMP DO

CALL FUNCTION1( A, X, B , Z, Y)

CALL FUNCTION2( Z, Y)

CALL FUNCTION3( A, Z, Y)

C$OMP END DO
C$OMP END PARALLEL


For eg. as in the above case of call to function1(), variables X and B are not passed for example. With the same 'exe', some times B and Z are not passed ". The variables that are not passed may be scalar/vector; etc.
I mean "not passed" as : The debugger stops at this point where it encounters this variable first used for calculation.

For example, inside function1

IF ( X(1) .EQ. 0 )

the computation stops here. There is no memory address shown for this variable in the debugger memory dialog box.
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 108

PostPosted: Mon Feb 13, 2006 4:46 pm    Post subject: Reply with quote

I tried some examples, but couldn't yet recreate your problem. Do you only see it when you pass 50 or so arguments to function1? Does it have to be a combination of private and shared variables passed?
Back to top
View user's profile
karthi_selvam



Joined: 24 Jan 2006
Posts: 4

PostPosted: Wed Feb 15, 2006 5:55 am    Post subject: Reply with quote

Thanks for replying.

Yes, I get the problem in one particular routine which pass around 50 variables. This has a combination of private and shared variables.
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 1, 2  Next
Page 1 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 © phpBB Group