Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8498067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:18:07+00:00 2026-06-11T00:18:07+00:00

Fortran 90 modules are evanescent creatures. I was using a (singular) module for a

  • 0

Fortran 90 modules are evanescent creatures. I was using a (singular) module for a while with some success (compiling using Intel Visual Fortran and Visual Studio 2010). Then I wrote another module and tried to USE it in another function, before receiving this error:

 error #7002: Error in opening the compiled module file.  Check INCLUDE paths.

So I deleted the offending module. But now I receive the same error after when trying to access my original module!

How can I locate these mysterious creatures? Why does one module work but not two? I’m assuming that I need to delete and recompile them, or tell the compiler to include them somehow. I know the file locations of the source code but not where they compile to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:18:08+00:00Added an answer on June 11, 2026 at 12:18 am

    For that specific processor (many other Fortran processors have similar characteristics, but the details differ):

    • When a module is compiled successfully, the compiler generates a .mod file (and perhaps an .obj file) that contains information about the entities provided by the module. It is this mod file that the error message you quote is referring to. The compiler requires this mod file when it encounters a USE statement for the module while compiling other source. (The obj file is used in the link stage.)

    • Hence, before a module is USE’d, the compiler must at some time have compiled the source code for the module. That means that the module’s source code (MODULE…END MODULE) must have appeared earlier in the source file prior to the USE statement, or must have been in a separate file that was compiled prior to the source file with the USE statement.

    • When compiling using an Intel Fortran project within Visual Studio, the build environment will automatically attempt to arrange an appropriate compilation order for the source files within a project. When compiling using the ifort command from the command line the programmer is responsible for managing the compilation order.

    • The directory that receives the generated mod files is specified by the first /module command line option given to the compiler. In Visual Studio this option is set using the Fortran > Output Files > Module Path property. By default, a Fortran project in Visual Studio has this property set to be the name of the current configuration, hence the mod files appear in a child directory of the project called Debug or Release. In the absence of a /module command line option the mod files appear in the current directory.

    • Directories specified by the /module command line option (or the equivalent Visual Studio property) are also used in the search for mod files. In addition, directories specified by the /I command line option (in Visual Studio, Fortran > General > Additional Include Directories) are searched.

    It is not clear from your question as to how you have distributed your modules amongst your source files, whether you have a single Visual Studio project or multiple projects etc. If you are only dealing with a single project then typically all that is required is to add all the Fortran files to the Source files for the project, and the default settings should “work”. Errors in finding mod files may be because:

    • the associated source for the module isn’t in one of the source files for the project;

    • compilation of the source for a module failed for some other reason (are other errors listed earlier in the build sequence?)

    • a module is defined after its use in a particular source file;

    • there are circular dependencies between modules (module A uses module B which uses A or similar – this is not allowed by the rules of the language);

    • some source construct that confuses the automatic determination of build order (older versions of the build system were confused by the F2003 form of use statement with the double colon, plus it is possible to obfuscate USE statements such that the build system fails to identify them) but these aspects are pretty obscure.

    With multiple Fortran projects in Visual Studio there may be a need to modify the module search directories for dependent projects, such that they can find the mod files compiled by previous projects in the project dependency tree. Later versions of Intel Fortran handle this aspect automatically too, if the inter-project dependency settings in Visual Studio are correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My complier is Intel Fortran Compiler 11.0.3451.2005. IDE is Microsoft Visual Studio 2005. When
I've been starting to use Fortran (95) for some numerical code (generating python modules).
I've converted some legacy Fortran code to C using the f2c converter ( f2c
I have a very scary error on Fortran 95: Fatal Error: While reading module
I've defined a code module (a Fortran F90 file) and supplied it with these
I have some old fortran 77 I'm trying to port to gcc on Windows.
I have a FORTRAN 95 program that needs to make some calls to the
I'm new to Fortran and just doing some simple things for work. And as
I have a module in Fortran called QFoo. It defines a type QFooType. I
Is the concept of the Fortran ISO_C_BINDING module also supported by C/C++ compiler vendors?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.