PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

passing arrays to subroutines in fortran

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



Joined: 13 Apr 2006
Posts: 1

PostPosted: Thu Apr 13, 2006 11:29 am    Post subject: passing arrays to subroutines in fortran Reply with quote

How do I view the contents of an array that has been passed to a subroutine? I'm using PGDBG and I'm not very familiar with it.

I'm using v6.1 of the fortran 95 compiler on a linux machine for system references.

[/code]
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Apr 13, 2006 2:31 pm    Post subject: Reply with quote

Hi Chris,

Section 1.7.6 of PGI Tools Guide, http://www.pgroup.com/doc/pgitools.pdf details how to print a variable's value. For Fortran arrays, the command would be "print a(1:10)" where "a" is the name of your array, in your case, the callee subroutine's local array name. Replace "1:10" with the actual range of elements that you would like to print.

Hope this helps,
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