PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

error F0004 : Unable to open MODULE file
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Wed May 30, 2012 3:54 pm    Post subject: error F0004 : Unable to open MODULE file Reply with quote

Hi there,

I am using PGI Fortran compiler 12.1 on windows 7, I have a code that compile perfectly with PGI, I want to move some of the subroutines to GPU, unfortunately, when I created a module called GReynVar_mod, I have the following error when I compile:

Error 1 Unable to open MODULE file greynvar_mod.mod D:\Cuda Dev\Quick_cuda\reynolds.f90 354

in file reynolds.f90, line 354:

use GReynVar_mod

by the way, the original code have few modules that have no problems to compile before I created the module.

please advice.

Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Wed May 30, 2012 4:48 pm    Post subject: Reply with quote

Hi Dolf,

The error simply means that the dependent module file can't be found. Some possible reasons why are:

- The file that file that contains the module hasn't been compiled yet.

If you are using PVF, then this message is not unusual especially if it's the first time the project is compiled. PVF will make multiple compilation passes building up a dependency list. If your dependencies change, then you may need to first clean the project before rebuilding.

If you are using makefiles, you need to add the GReynVar_mod.obj to reynolds.f90 dependencies.

If you are building by hand, you need to compile the GReynVar_mod file before compiling reynolds.f90

- You built the GReynVar_mod module in a different directory.

The default is to look in the same directory as the source for any dependent files. If the module file is in a different directory, you can tell the compiler search this directory by using the "-I<dir>" or "-module <dir>" flags.


- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Wed May 30, 2012 5:23 pm    Post subject: Reply with quote

I am using PVF on windows 7, that's why its strange to me to have this unfamiliar error.

what do you think??

Dolf
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Wed May 30, 2012 5:58 pm    Post subject: Reply with quote

new update:
I moved my module to the file common.f90 (where all the other modules located), now I have 56 similar errors, such us:

Error 1 Host MODULE data cannot be used in a DEVICE or GLOBAL subprogram - iqpo D:\Cuda Dev\Quick_cuda\common.f90 463

output shows:
D:\Cuda Dev\Quick_cuda\common.f90(463) : error S0520 : Host MODULE data cannot be used in a DEVICE or GLOBAL subprogram - iqpo

1) why I have to move the module related to GPU to common.f90?
is there something I missed?

2) why some of the variables like iqpo cannot be used in a global module?
Back to top
View user's profile
mkcolg



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

PostPosted: Thu May 31, 2012 9:04 am    Post subject: Reply with quote

Quote:
1) why I have to move the module related to GPU to common.f90?
is there something I missed?
I don't know for sure how your project is organized, but if your module's source file is not part of your project, then the rest of your program wont be able to find the generated module file.

Quote:
2) why some of the variables like iqpo cannot be used in a global module?
These errors mean that you are trying to use a variable who's data storage resides in host memory within code that is running on the GPU. The GPU can not directly access host memory.

- 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 1, 2, 3  Next
Page 1 of 3

 
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