- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Codes can be compiled properly in CVF. Trying to move it to Intel VF, but got this error:
"Error 1 error #6633: The type of the actual argument differs from the type of the dummy argument. [INTFILEDEST]"
Any suggestion about this?
The source codes as the following:
"Error 1 error #6633: The type of the actual argument differs from the type of the dummy argument. [INTFILEDEST]"
Any suggestion about this?
The source codes as the following:
SUBROUTINE destroyInternal(intFile)
INCLUDE 'toolType.fi'
type(internalFile):: intFile
IF (intFile%maxLines .gt. 0) deallocate(intFile%fileLines)
intFile%usedLines = 0
END SUBROUTINE destroyInternal
SUBROUTINE copyInternal(intFileSource,intFileDest)
INCLUDE 'toolType.fi'
INTEGER line
type(internalFile) :: intFileSource,intFileDest
CALL destroyInternal(intFileDest)
CALL openInternal(intFileDest,intFileSource%maxLines)
DO line=1,intFileSource%usedLines
CALL writeInternal(intFileDest,intFileSource%fileLines(line));
ENDDO
END SUBROUTINE copyInternal
toolType.fi
TYPE internalFile
character,pointer :: fileLines(:)*maxLineWidth
integer maxLines
integer usedLines
integer lineWidth
integer curLine
END TYPE internalFile
Thanks,
Tsingfeng
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even though you are INCLUDEing the same text for the type declaration for internalFile, the Fortran language says that these are different types and therefore there is a type mismatch. Intel Fortran is better at detecting such errors than CVF was.
The best solution is to turn toolType.fi into a module. You can do this with minimal source changes as follows.
Create a new source file internalFileMod.f90 with the contents:
Now replace toolType.fi with the single line:
USE internalFileMod
See how that works for you. This will work only if the INCLUDE of toolType.fi is the first thing after the SUBROUTINE or FUNCTION statement. If it isn't, then move the INCLUDE up until it is.
The best solution is to turn toolType.fi into a module. You can do this with minimal source changes as follows.
Create a new source file internalFileMod.f90 with the contents:
[fortran]MODULE internalFileMod TYPE internalFile character,pointer :: fileLines(:)*maxLineWidth integer maxLines integer usedLines integer lineWidth integer curLine END TYPE internalFile END MODULE internalFileMod[/fortran]
Now replace toolType.fi with the single line:
USE internalFileMod
See how that works for you. This will work only if the INCLUDE of toolType.fi is the first thing after the SUBROUTINE or FUNCTION statement. If it isn't, then move the INCLUDE up until it is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve for the quick reply!
This solution works. Knowing that Intel Fortran is more strict in type mismatch, will be careful about such type of problems in legacy codes.
This solution works. Knowing that Intel Fortran is more strict in type mismatch, will be careful about such type of problems in legacy codes.

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