PGF90-F-0004-Unable to open MODULE file

Help!when i tried to use PGI 17.10 community edition on Win 10 to compile my .f90 code, i got the following error:PGF90-F-0004-Unable to open MODULE file.
my commands:

pgfortran -acc -ta=tesla:cc60 -Minfo=all mod.f90 -o mod.exe

Even if i add -Mdll ,the error still exists.But it’s odd that when the module file doesn’t contain subroutines
the error disappears,and everything goes fine.
please help me!

Hi Guo shuhao,

This error message means that the compiler can’t find the module file (i.e the “.mod”) associated with a “use” statement in your code.

Do you have any “use” statements? If so, you need to compile the file that contains the module before compiling “mod.f90”.

-Mat

Thank you,Mat�What you said realy works!I made a mistake,i should compile the file contains the module first.