Converting Fortran 77 to PGI Fortran CUDA code

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’)

Any help or suggestions would be appreciated,
Thank you

are these statements in host code or device code?

They are in host.

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,

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