|
| View previous topic :: View next topic |
| Author |
Message |
Efortin
Joined: 19 Oct 2012 Posts: 6
|
Posted: Fri Oct 19, 2012 1:30 pm Post subject: the two pointers |
|
|
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 |
|
 |
silvercat
Joined: 18 Jan 2013 Posts: 1
|
Posted: Fri Jan 18, 2013 3:26 am Post subject: Re: the two pointers |
|
|
| 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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Fri Jan 18, 2013 11:01 am Post subject: |
|
|
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 |
|
 |
|
|
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
|