- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using Intel 9.1 Compiler, and in one of my module I had defined a parameter with name exit like this
[bash]integer, parameter :: exit = 3[/bash]
With Compaq Visual Fortran compiler, this code used to compile fine, now with Intel compiler I am getting this error
bndymod.f(66) : Error: The attributes of this name conflict with those made accessible by a USE statement. [EXIT]
integer, parameter :: exit = 3
What might be the issue, Can't we define a parameter with name exit ?
- Manoj
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error means that there is another variable or parameter with the same name in
a module that your module is using. CVF did not check on that, IIRC, but Intel Fortran
is much more strict.
One possibility to solve this:
use module_that_contains_exit, exit_not_used => exit
to rename the conflicting variable/parameter.
Another solution, probably better, is to collect all these parameters in a single
module of their own.
Regards,
Arjen
a module that your module is using. CVF did not check on that, IIRC, but Intel Fortran
is much more strict.
One possibility to solve this:
use module_that_contains_exit, exit_not_used => exit
to rename the conflicting variable/parameter.
Another solution, probably better, is to collect all these parameters in a single
module of their own.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arjen,
Thanks for your response.
I had defined exit only in this module in my entire source and I had used ifport module. I found that by removing the ifport module from the module source I was able to compile the module successfully.
So it means exit is defined in ifport module, Is there any way that I can use ifport without exit defined in it.
Is there is any way to find the multiply defined parameters in modules ?
- Manoj
Thanks for your response.
I had defined exit only in this module in my entire source and I had used ifport module. I found that by removing the ifport module from the module source I was able to compile the module successfully.
[bash] module test c use ifport c implicit none c integer, parameter :: b121 = 1 integer, parameter :: b121_block = 1 integer, parameter :: b121_master = 2 integer, parameter :: b121_slave = 3 c integer, parameter :: inlet = 2 c integer, parameter :: exit = 3 c c integer, parameter :: no_bc = 6 c end module test[/bash]
So it means exit is defined in ifport module, Is there any way that I can use ifport without exit defined in it.
Is there is any way to find the multiply defined parameters in modules ?
- Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arjen told you how already: use the rename feature in the USE statement.
To be specific, replace
useifport
by
useifport, IFP_EXIT => EXIT
You can use any name instead of IFP_EXIT, as long as it is not used in the current scope.
To be specific, replace
useifport
by
useifport, IFP_EXIT => EXIT
You can use any name instead of IFP_EXIT, as long as it is not used in the current scope.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Guys,
Thanks for your suggestions, I am able to compile the module successfully with these changes.
-Manoj
Thanks for your suggestions, I am able to compile the module successfully with these changes.
-Manoj

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page