PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Compiling Warnings..."type conversion of subscript..&qu
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Sat Feb 15, 2014 1:22 pm    Post subject: Compiling Warnings..."type conversion of subscript..&qu Reply with quote

Hello

I have posted a picture of 2 main warning I keep getting. Although I use the flag "-Mlarge_arrays"..which I do since I am expecting the .exe to use memory exceeding 2GB, I still end up with this warning. I am not sure that they are even related, but it most likely is.



I am sorry this might be a hassle, could you please point me in the right direction?

Thank you
Ahmed
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Feb 18, 2014 9:15 am    Post subject: Reply with quote

Hi Ahmed,

For the underflow warning, you most likely have a constant assignment. Constants use the default kind so is most likely a REAL(4) which isn't able to represent the constant. Try adding "-r8" to change the default kind to REAL(8), or add "_8" to the end of the constant to change it's kind.

For the type conversion, I'd like to know how "cog" and "coh" are declared and an example how they are being used.

- Mat
Back to top
View user's profile
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Wed Feb 19, 2014 8:32 am    Post subject: Reply with quote

Hey Mat,

Thank you for your replies.

1. Neither _8 nor "-r8" have worked with the second warning. I am assuming that these constant values are truncated since it most likely is using REAL (4) ?

2. "cog" and "coh" are assigned in the main program:
DOUBLE PRECISION, DIMENSION (4000000)::coG
DOUBLE PRECISION, DIMENSION (4000000)::coH
and they are also
COMMON/coG,coH
and so appear in many subroutines throughout my code. These variables evaluate some really simple equations where their contents are all REAL and thus the cog and coh array is populated. This is in addition to an array in the code "amat" that is processed from "cog" and "coh". (I have only 4GB ram on cpu, is an upgrade a must?)

I wonder if these arrays are too massive... (I am guessing not). Would I have to assign and allocate these two arrays in each subroutine?

I hope I am not losing you.

Ahmed
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Feb 19, 2014 12:18 pm    Post subject: Reply with quote

Hi Ahmed,

These arrays aren't very big. So unless you have hundreds of them, you shouldn't have any problems with memory.

Can you please post lines 4303 through 4316 and post the declaration of any other variable used?

- Mat
Back to top
View user's profile
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Wed Feb 19, 2014 2:50 pm    Post subject: Reply with quote

This part of the subroutine starts at 4294 and ends at 4316

Variables in this subroutine are:
COMMON/GHdirect/coG,coH
Double precision index
dimension amat(3*ni,*),bc(2,*)
dimension inod(*),jnod(*)
dimension amat(3*ni,*),bc(2,*)
dimension coH(4000000),coG(4000000)
data pi/3.141592653589793D0/
pi2 = pi*2.d0

While in the main program are:
DOUBLE PRECISION, DIMENSION (4000000)::coG
DOUBLE PRECISION, DIMENSION (4000000)::coH

Code:

   elseif(bc(1,3*jind-2).eq.2.and.bc(1,3*jind-1).eq.1.and.!Store coefficient
     +    bc(1,3*jind).eq.1) then
       amat(3*i-2,3*j-2) = coH(Index*9+1)
   amat(3*i-1,3*j-2) =   coH(Index*9+4)
   amat(3*i,3*j-2)   =   coH(Index*9+7)
       amat(3*i-2,3*j-1) = -coG(Index*9+2)
   amat(3*i-1,3*j-1) =   -coG(Index*9+5)
   amat(3*i,3*j-1)   =   -coG(Index*9+8)
       amat(3*i-2,3*j)   = -coG(Index*9+3)
   amat(3*i-1,3*j)   =   -coG(Index*9+6)
   amat(3*i,3*j)     = -coG(Index*9+9)
   elseif(bc(1,3*jind-2).eq.1.and.bc(1,3*jind-1).eq.2.and.!Store coefficient
     +    bc(1,3*jind).eq.2) then
       amat(3*i-2,3*j-2) = -coG(Index*9+1)
   amat(3*i-1,3*j-2) =   -coG(Index*9+4)
   amat(3*i,3*j-2)   =   -coG(Index*9+7)
       amat(3*i-2,3*j-1) = coH(Index*9+2)
   amat(3*i-1,3*j-1) =   coH(Index*9+5)
   amat(3*i,3*j-1)   =   coH(Index*9+8)
       amat(3*i-2,3*j)   = coH(Index*9+3)
   amat(3*i-1,3*j)   =   coH(Index*9+6)
   amat(3*i,3*j)     = coH(Index*9+9)



I hope this might be helpful to comprehend

Ahmed


Last edited by Torkin on Wed Feb 19, 2014 4:03 pm; edited 1 time in total
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, 3  Next
Page 1 of 3

 
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