Converting Fortran 77 to PGI Fortran CUDA code

Hi,
I’m in the process of converting some Fortran 77 code to PGI CUDA. During the compile process, all of my OPEN / READ / and CLOSE statements for files return with the following message:
S0310 Illegal statement specification in a module

I’ve reveiwed other examples of Fortran CUDA where OPEN / READ / and CLOSE statements are used for files.
Following are excerpts of the statements where the failure occurs:
OPEN (10,file =‘CG_20X_6to1.dat’)
READ (10,*)X0CH,L1CH,E1CH,VCH,QCH,DSWCH,XNWCH,INBCH,INFCH,NVTCH
CLOSE(10)

Any help or suggestions would be appreciated,
Thank you

are these statements in host code or device code?

Hi,
They are in host.
Thanks

Hi JA73266,

Is the error message more like “Illegal statement in the specification part of a module”? In this case, the problem is that you’ve put an executable statement in the specification section (i.e. the part before the ‘contains’) of your module.

Hope this helps,
Mat

Hi Mat,
Thanks for your help.
I think that this is the problem.
-JA73266