- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I have the followind code:
============ mod.f =============
MODULE rr_mod
INTEGER :: nbuck(1)
END MODULE rr_mod
============ overlap.f ===========
SUBROUTINE overlap_fie (overlap)
USE rr_mod
IMPLICIT NONE
INTEGER ,OPTIONAL :: OVERLAP(0:NBUCK(1)-1)
overlap = 1
END SUBROUTINE
============== tst.f =============
SUBROUTINE tst
USE rr_mod
IMPLICIT NONE
INTEGER, DIMENSION(0:nbuck(1)-1):: iover
INTERFACE
SUBROUTINE overlap_fie (overlap)
USE rr_mod
INTEGER,OPTIONAL::OVERLAP(0:NBUCK(1)-1)
END SUBROUTINE overlap_fie
END INTERFACE
call overlap_fie (overlap=iover)
RETURN
END SUBROUTINE tst
====== compilation and output =======
$ ifort -c -warn interfaces mod.f
$ ifort -c -warn interfaces overlap.f
$ ifort -c -warn interfaces tst.f
tst.f(7): error #8000: There is a conflict between local interface block and external interface block. [OVERLAP]
SUBROUTINE overlap_fie (overlap)
--------------------------------^
compilation aborted for tst.f (code 1)
As far as I can see the problem results from the fact nbuck is an array andcomes through the module rr_mod.
Any suggestion how to overcome this problem (problem is stripped from a large code packag) ?
Best Regards,
Albert
I have the followind code:
============ mod.f =============
MODULE rr_mod
INTEGER :: nbuck(1)
END MODULE rr_mod
============ overlap.f ===========
SUBROUTINE overlap_fie (overlap)
USE rr_mod
IMPLICIT NONE
INTEGER ,OPTIONAL :: OVERLAP(0:NBUCK(1)-1)
overlap = 1
END SUBROUTINE
============== tst.f =============
SUBROUTINE tst
USE rr_mod
IMPLICIT NONE
INTEGER, DIMENSION(0:nbuck(1)-1):: iover
INTERFACE
SUBROUTINE overlap_fie (overlap)
USE rr_mod
INTEGER,OPTIONAL::OVERLAP(0:NBUCK(1)-1)
END SUBROUTINE overlap_fie
END INTERFACE
call overlap_fie (overlap=iover)
RETURN
END SUBROUTINE tst
====== compilation and output =======
$ ifort -c -warn interfaces mod.f
$ ifort -c -warn interfaces overlap.f
$ ifort -c -warn interfaces tst.f
tst.f(7): error #8000: There is a conflict between local interface block and external interface block. [OVERLAP]
SUBROUTINE overlap_fie (overlap)
--------------------------------^
compilation aborted for tst.f (code 1)
As far as I can see the problem results from the fact nbuck is an array andcomes through the module rr_mod.
Any suggestion how to overcome this problem (problem is stripped from a large code packag) ?
Best Regards,
Albert
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An interface body has no awareness of external (to it) constants and variables (such as NBUCK) that one may imagine to be available by host association.
It is for this purpose that the IMPORT statement was created.
It is for this purpose that the IMPORT statement was created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, NBUCK is visible through the USE RR_MOD.
I can't reproduce the problem using 12.0.2. Which compiler version are you using?
I can't reproduce the problem using 12.0.2. Which compiler version are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
The Fortran compiler version: c11.1.059_f11.1.059
Best regards,
Albert
The Fortran compiler version: c11.1.059_f11.1.059
Best regards,
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - we've made fixes in that area since then. Please try the current compiler. I think 12.0.3 is now posted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll have a try next week, see if I can persuade our sys admin to install it (otherwise I'll see if I can install it localy)
Albert
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can certainly do a local install of the compiler - I do that all the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't doubt that I can instal it, but what is the easiest way t down load the compiler (could not find a direct link to the instal package).
Albert
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://registrationcenter.intel.com
If your license has been registerd by someone else, their credentials will be needed.
If your license has been registerd by someone else, their credentials will be needed.
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