PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

the two pointers

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Efortin



Joined: 19 Oct 2012
Posts: 6

PostPosted: Fri Oct 19, 2012 1:30 pm    Post subject: the two pointers Reply with quote

Hi Everyone,

In my program (a big model) there are two pointers profiles%p, and coef%rfp_p, both are defined in the derived data.

In one subroutine coef%rfp_p = pres (which is read from the input file), also coef%rfp_p is a array.

In the main program, after the allocate(profiles%p), there is

profiles%p(:) = coef%rfp_p(:)
do ii = 1, nlevels
print(*,*) profiles%p(ii), coef%rfp_p(ii)
end do

Here the print is what I added, and I found the value for profiles%p is all 0.0, while for coef%rfp_p is correct. I did the same print in IBM machine, which is normal.

Also if I do
profiles%p(:) = 5.0 (for example) the profiles%p works normally.

Is there somebody has idea what to fix, or how to resolve the problem. Even my computer administrator says there is very weird.

thanks,

Efortin
Back to top
View user's profile
silvercat



Joined: 18 Jan 2013
Posts: 1

PostPosted: Fri Jan 18, 2013 3:26 am    Post subject: Re: the two pointers Reply with quote

Efortin wrote:
Hi Everyone,

In my program (a big model) there are two pointers profiles%p, and coef%rfp_p, both are defined in the derived data.

In one subroutine coef%rfp_p = pres (which is read from the input file), also coef%rfp_p is a array.

In the main program, after the allocate(profiles%p), there is

profiles%p(:) = coef%rfp_p(:)
do ii = 1, nlevels
print(*,*) profiles%p(ii), coef%rfp_p(ii)
end do

Here the print is what I added, and I found the value for profiles%p is all 0.0, while for coef%rfp_p is correct. I did the same print in IBM machine, which is normal.

Also if I do
profiles%p(:) = 5.0 (for example) the profiles%p works normally.

Is there somebody has idea what to fix, or how to resolve the problem. Even my computer administrator says there is very weird.

thanks,

Efortin


this problem
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Jan 18, 2013 11:01 am    Post subject: Reply with quote

FYI, Efortin cross-posted this question here:
Quote:
http://www.pgroup.com/userforum/viewtopic.php?t=3528


Unfortunately, they weren't able to send us a reproducing example so we weren't able to determine the cause of his problem.

Silvercat, are you having a similar issue? If so, can you please give more details?

Thanks,
Mat
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
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