ILM file: missing subtype for pointer datatype Error

I want to use texture device memory for some “Global variables” I use for my kernel codes. I declared the pointer and target device variables before the "contains " Module statement which contains routines where some “target” variables are going to be generated or read from a file. The module file where the error below is generated can be found here https://dl.dropboxusercontent.com/u/59996494/host_gen_m1.CUF
Here is the error:

pgf90 -Mcuda -Minfo  -c precision_m.F90
pgf90 -Mcuda -Minfo  -c cpurandom_m.F90
cpp  -DTEXTURE host_gen_m.CUF > host_gen_m1.CUF
pgf90 -Mcuda -Minfo  -c host_gen_m1.CUF
ILM file: missing subtype for pointer datatype 122
ILM file: missing subtype for pointer datatype 124
ILM file: missing subtype for pointer datatype 126
ILM file: missing subtype for pointer datatype 128
ILM file: missing subtype for pointer datatype 130
ILM file: missing subtype for pointer datatype 132
ILM file: missing subtype for pointer datatype 134
ILM file: missing subtype for pointer datatype 136
ILM file: missing subtype for pointer datatype 138
ILM file: missing subtype for pointer datatype 140
ILM file: missing subtype for pointer datatype 142
ILM file: missing subtype for pointer datatype 144
ILM file: missing subtype for pointer datatype 146
ILM file: missing subtype for pointer datatype 148
ILM file: missing subtype for pointer datatype 150
ILM file: missing subtype for pointer datatype 152
ILM file: missing subtype for pointer datatype 154
PGF90-F-0000-Internal compiler error. Errors in ILM file      17 (host_gen_m1.CUF: 28)
make: *** [host_gen_m1.o] Error 2

When I got this error I first thought the problem was because I had declared the “target” device variable before the “contains” module statement like they where kind of “Global”, so I declared then in the subroutine where they were going to get values and that point linked them to the “texture pointers”. I will like to know of this error has anything to do with the placement of this declaration or simply that the error comes from an internal compiler bug?

Compiler version:

pgf90 14.10-0 64-bit target on x86-64 Linux -tp istanbul
The Portland Group - PGI Compilers and Tools
Copyright © 2014, NVIDIA CORPORATION. All rights reserved.

CUDA Version:

nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2014 NVIDIA Corporation
Built on Thu_Jul_17_21:41:27_CDT_2014
Cuda compilation tools, release 6.5, V6.5.12


Thanks.

Hi Egodfred,

It appears that no one has tried putting the texture attribute on a scalar pointer before. I’m not sure it makes too much sense to use texture on a scalars, but the compiler definitely shouldn’t be giving you ILM errors. I added TPR#21662 and sent it to engineering for further investigation.

As a work around, I would remove all the texture scalar pointer variables (t_param_array is fine) and instead change them to be “constant”. You would also be able to get rid of the “target” variables and simplify your code. Another option would be to pass the variables to the kernels as “intent(in)” in which case the compiler may put them in textured memory automatically (depending upon the target device).

Thanks,
Mat