PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

PGC-S-0058-Illegal lvalue, PGC-W-0095...
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
forest_gump



Joined: 05 Oct 2006
Posts: 23

PostPosted: Thu Oct 12, 2006 12:17 am    Post subject: Reply with quote

mkcolg wrote:
Where are "PML_HY" and "PML_HZ" defined? They're either macros or functions. If they are macros, you need to find their definitions. If they're functions, then this is illegal code since you can't assign a value to a function.

- Mat

i get this code with -P then i theh i think that are not a macros "#define", i dont know how the program know : it's not declared "but it's not important to me because i get no error ", that's the declaration in *.h file



Code:
define OFF2(j,k,J,K)                             ((j)*(K)+(k))
#define OFF3(i,j,k,I,J,K)               (((i)*(J)+(j))*(K)+(k))
#define OFF4(a,i,j,k,A,I,J,K) ((((a)*(I)+(i))*(J)+(j))*(K)+(k))

#define EX(i,j,k)            ex[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define EY(i,j,k)            ey[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define EZ(i,j,k)            ez[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define HX(i,j,k)            hx[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define HY(i,j,k)            hy[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define HZ(i,j,k)            hz[OFF3(i,j,k,nx+2,ny+2,nz+2)]

#define EMULT(i,j,k,a)       emult[OFF4(i,j,k,a,nx+2,ny+2,nz+2,6)]
#define HMULT(i,j,k,a)       hmult[OFF4(i,j,k,a,nx+2,ny+2,nz+2,6)]

#define CELL_ARRAY(i,j,k)    cell_array[OFF3(i,j,k,nx+2,ny+2,nz+2)]
#define TYPE_ARRAY(i,j,k)    type_array[OFF3(i,j,k,nx+2,ny+2,nz+2)]

#define SOURCE_ADD(i,j)      source_add[OFF2(i,j,n_source+1,n_step+1)]


#define PML_EX(f,i,j,k)   PML_EX(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_EY(f,i,j,k)   PML_EY(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_EZ(f,i,j,k)   PML_EZ(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_DEX(f,i,j,k)  PML_DEX(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_DEY(f,i,j,k)  PML_DEY(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_DEZ(f,i,j,k)  PML_DEZ(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_PEX(f,i,j,k)  PML_PEX(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_PEY(f,i,j,k)  PML_PEY(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_PEZ(f,i,j,k)  PML_PEZ(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_HX(f,i,j,k)   PML_HX(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_HY(f,i,j,k)   PML_HY(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_HZ(f,i,j,k)   PML_HZ(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_BHX(f,i,j,k)  PML_BHX(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_BHY(f,i,j,k)  PML_BHY(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))
#define PML_BHZ(f,i,j,k)  PML_BHZ(f,OFF3(i,j,k,PML_nbx[f]+2,PML_nby[f]+2,PML_nbz[f]+2))

And if you have any document about advaced gestion of memory, it's be welcome
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Oct 12, 2006 8:31 am    Post subject: Reply with quote

Hi Saad,

You should consider contacting the authors of this code since defining a macro to itself doesn't make a lot sense. Perhaps your missing a configuration step?

Quote:
And if you have any document about advaced gestion of memory, it's be welcome


Sorry, but I'm not sure what type of documentation your looking for? Can you be more specific.

Thanks,
Mat
Back to top
View user's profile
forest_gump



Joined: 05 Oct 2006
Posts: 23

PostPosted: Fri Oct 13, 2006 12:19 am    Post subject: Reply with quote

advanced documentation , memory allocation
Thank's 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
Goto page Previous  1, 2
Page 2 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