- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apologies in advance for what seems to be a very basic question. I'm not a Fortran programmer, unfortunately, but I'm in a position of having to maintain some legacy FORTRAN77 code, and it is not compiling in Intel Visual Fortran Parallel XE 2013 (with VS2010) on Windows7.
The error I'm getting is
> error #6633: The type of the actual argument differs from the type of the dummy argument.
It occurs in several calls to subroutines that are defined within the project. This code has the statement
IMPLICIT REAL(8) (A-H,O-Z)
throughout, in both the calling function and the called subroutine. (It had been `REAL*8`, but I changed it.)
Doesn't that mean that the arguments, all of which have names that fall into the range (A-H,O-Z), will be two-byte reals? I don't know where they are being declared or otherwise converted to any other type. The only functions called within the subroutines are intrinsic math functions, such as cos, sin, atan2.
Below is an example (I left out an INCLUDE statement that included a file with the IMPLICIT REAL statement above as its first line):
C Transform from RS to RL call RS$RL(0,iobl,1,vrel,xlatgc,gam,az,vph,vth,vr, * xlatgd,gaml,azl,vphl,vthl,vrl)
which calls
SUBROUTINE RS$RL(ID,IOBL,IV,VREL,TH,GAM,AZ,VPH,VTH,VR, * THL,GAML,AZL,VPHL,VTHL,VRL) C* DECLARATIONS IMPLICIT REAL(8) (A-H,O-Z) C IMPLICIT REAL*8(A-H,O-Z) DEL = THL-TH IF(ID.EQ.0) THEN C* TRANSFORM FROM RS TO RL FRAME IF(IV.EQ.0) THEN VPH = VREL*COS(GAM)*SIN(AZ) VTH = VREL*COS(GAM)*COS(AZ) VR = VREL*SIN(GAM) ENDIF IF(IOBL.EQ.0) THEN VPHL = VPH VTHL = VTH VRL = VR ELSE VPHL = VPH VTHL = VTH*COS(DEL)-VR*SIN(DEL) VRL = VTH*SIN(DEL)+VR*COS(DEL) ENDIF GAML = ATAN2(VRL,SQRT(VPHL**2+VTHL**2)) AZL = ATAN2(VPHL,VTHL) ELSE C* TRANSFORM FROM RL FRAME TO RS FRAME IF(IV.EQ.0) THEN VPHL = VREL*COS(GAML)*SIN(AZL) VTHL = VREL*COS(GAML)*COS(AZL) VRL = VREL*SIN(GAML) ENDIF IF(IOBL.EQ.0) THEN VPH = VPHL VTH = VTHL VR = VRL ELSE VPH = VPHL VTH = VTHL*COS(DEL)+VRL*SIN(DEL) VR =-VTHL*SIN(DEL)+VRL*COS(DEL) ENDIF GAM = ATAN2(VR,SQRT(VPH**2+VTH**2)) AZ = ATAN2(VPH,VTH) ENDIF RETURN END
The error messages complain about the arguments, vrel, xlatgc, gam, az.
Any suggestions or clues are much appreciated.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I don't get any errors building this, so what might have happened is that you have a "stale" generated interface module left behind. Do a Build > Clean and then rebuild the project and see what happens. If you still get the error, please provide me with the .vfproj file from your project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
Thanks. I don't get any errors building this, so what might have happened is that you have a "stale" generated interface module left behind. Do a Build > Clean and then rebuild the project and see what happens. If you still get the error, please provide me with the .vfproj file from your project.
Wow, that worked! I have to confess that I wasn't expecting that. I thought for sure that I had started from nothing but the source files, but I guess I must have carried along some leftover file from the old CVF project. Or maybe I did something wrong the first time and left some kind of bad interface module file (??).
Anyway, sure enough, Clean > Build worked, and now it compiles.
Thanks very much, and I'm sorry to have taken so much time looking for the wrong answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All is well that ends well!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FortranFan wrote:
All is well that ends well!
Indeed!
Thanks again to all who helped.
Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps the error message could be more informative, although I'm not sure this is the full extent of the error message.
error #6633: The type of the actual argument differs from the type of the dummy argument.
Is the error that the variable type is wrong or just the variable kind ? Could a description of the two inconsistent types identified also be included in the report, especially if they are intrinsic data types.
Greater clarity in the message would help us ifort users and especially those learning the language to identify these problems.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's a good suggestion, John.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »