Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28924 Discussions

How can one module be different modules? Bug?

davisr
Beginner
532 Views

With the following source code (condensed from the actual)

Module

NewMaterialBurnupStepM
Implicit none
Contains
Function NewMaterialBurnupStep (ThisMaterial) result (This)
Use WIMSBURFCaseM
Type (MaterialType), intent (In), target:: ThisMaterial
Type (MaterialBurnupStepType):: This
This % Material => ThisMaterial
This % ReactionFissionPerLengthTime = ReactionFission_per_CmSec (0.0)
End function NewMaterialBurnupStep
End module NewMaterialBurnupStepM

I get the error message

Error: The same named entity from different modules and/or program units cannot be referenced. [REACTIONFISSION_PER_CMSEC]

How can I be referring to it from different modules when I onlyUse one module? What's more to the point, how can I correct this program, so that I can earn a living?

0 Kudos
3 Replies
Steven_L_Intel1
Employee
532 Views
If WIMSBURFCaseM USEd two other modules, both of which define ReactionFission_per_CmSec, you'd see this error. The duplicate definitions are not an error until you reference the name.
0 Kudos
davisr
Beginner
532 Views

Thank you for your help.

That was not the problem. However, after another problem, and an inability to reproduce the problem in a smaller program, I discovered that under Properties ? Configuration Properties ? Fortran ? Preprocessor ? Additional Include Directories, where a list of several long directory names is crammed into a tiny space, there was a reference to a directory full of .mod files prepared by CVF. Correcting that sure corrected a lot of problems. I am going around all my other problem postings on this site to ensure that noboby wastes any (more) time on this problem.

0 Kudos
Steven_L_Intel1
Employee
532 Views
I'd be astonished if changing the include paths made a difference for this issue, since the Intel compiler cannot read CVF .mod files.
0 Kudos
Reply