- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have math utility library that compiles in a version of Compaq Fortran that I no longer have. I needed to add some diagnostics to a routine and now I'm trying to recompile with the Intel Visual Fortran 11 compiler. But I'm getting the error message:
error #6633: The type of the actual argument differs from the type of the dummy argument.
The problem seems to be related to external functions but I can't see anything that looks particularly off (and this part of the code did compile in CVF). Here's a sample of where the error seems to be.
subroutine avsq(isc,av,av2, xn1,uv1,xv2,uv2)
implicit none
integer isc
double precision av(3),av2(3),xn1,uv1(3),xv2,uv2(3),
& dpi,req,pi,h(3),h1(3),h2(3),h3(3),dmag,dang,
& amin,amax,fpa,f_internal,tol,d11(3),
integer mot,ierr
double precision a1,b1,a22,b22,gnu
common /vpa_fcn_cmn/
& a1(3),b1(3),a22(3),b22(3),gnu,mot
external vpa_fcn
:
:
:
pa=f_internal(amin,amax,vpa_fcn,1,tol) << this line reports the error
:
:
:
return
end
function vpa_fcn(fpa)
implicit none
double precision vpa_fcn,fpa,v3(3),v4(3),dv1(3),dv2(3),dmag
integer motion,ierr
double precision r1,v1,r22,v22,gmu
common /vpa_fcn_cmn/
& a1(3),b1(3),a22(3),b22(3),gnu,mot
:
:
:
vpa_fcn=avn(dv1)+asb(dv2)
return
end
function f_internal(a1,a2,f,key,tol)
implicit none
integer itmax,key,iter
real*8 f_internal,a1,a2,tol,f,
& a,b,d,e,etemp,fu,fv,fw,fx,p,q,r,tol1,tol2,u,v,w,x,xm
external f
:
:
:
fx=f(x)*etemp
:
:
:
f_internal=x
return
end
Any thoughts or suggestions would be greatly appreciated.
Chris
error #6633: The type of the actual argument differs from the type of the dummy argument.
The problem seems to be related to external functions but I can't see anything that looks particularly off (and this part of the code did compile in CVF). Here's a sample of where the error seems to be.
subroutine avsq(isc,av,av2, xn1,uv1,xv2,uv2)
implicit none
integer isc
double precision av(3),av2(3),xn1,uv1(3),xv2,uv2(3),
& dpi,req,pi,h(3),h1(3),h2(3),h3(3),dmag,dang,
& amin,amax,fpa,f_internal,tol,d11(3),
integer mot,ierr
double precision a1,b1,a22,b22,gnu
common /vpa_fcn_cmn/
& a1(3),b1(3),a22(3),b22(3),gnu,mot
external vpa_fcn
:
:
:
pa=f_internal(amin,amax,vpa_fcn,1,tol) << this line reports the error
:
:
:
return
end
function vpa_fcn(fpa)
implicit none
double precision vpa_fcn,fpa,v3(3),v4(3),dv1(3),dv2(3),dmag
integer motion,ierr
double precision r1,v1,r22,v22,gmu
common /vpa_fcn_cmn/
& a1(3),b1(3),a22(3),b22(3),gnu,mot
:
:
:
vpa_fcn=avn(dv1)+asb(dv2)
return
end
function f_internal(a1,a2,f,key,tol)
implicit none
integer itmax,key,iter
real*8 f_internal,a1,a2,tol,f,
& a,b,d,e,etemp,fu,fv,fw,fx,p,q,r,tol1,tol2,u,v,w,x,xm
external f
:
:
:
fx=f(x)*etemp
:
:
:
f_internal=x
return
end
Any thoughts or suggestions would be greatly appreciated.
Chris
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you could provide the full source of the caller and callee, that would be very helpful. It would also help if you gave the full text of the error message, including the name of the argument.
Intel Fortran has a diagnostic feature CVF didn't called "generated interface checking" - this is on by default in a debug configuration. It looks at the sources of routines you compile and checks the routine signature against the call, even across sources. (CVF could do this within a single source only.)
Looking at the source you provided, my guess is that it is complaining about vpa_fcn. In the caller this is simply "external" and hence "default real", but in f_internal the corresponding argument f is declared real*8, which is a mismatch. Probably, if you declared vpa_fcn as real*8 in the caller and rebuilt the solution, the error would go away. I can't be certain with only excerpts. Let me know if this helps or not.
I will comment that I am uncomfortable seeing "real*8" in one source and "double precision" in another. Most of the time these will be the same, but if one uses the "double_size" compiler option, they could differ.
Intel Fortran has a diagnostic feature CVF didn't called "generated interface checking" - this is on by default in a debug configuration. It looks at the sources of routines you compile and checks the routine signature against the call, even across sources. (CVF could do this within a single source only.)
Looking at the source you provided, my guess is that it is complaining about vpa_fcn. In the caller this is simply "external" and hence "default real", but in f_internal the corresponding argument f is declared real*8, which is a mismatch. Probably, if you declared vpa_fcn as real*8 in the caller and rebuilt the solution, the error would go away. I can't be certain with only excerpts. Let me know if this helps or not.
I will comment that I am uncomfortable seeing "real*8" in one source and "double precision" in another. Most of the time these will be the same, but if one uses the "double_size" compiler option, they could differ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, the problem was with the vpa_fcn not being declared in the avsq routine. I'd swear I thought I'd looked for that but apparently not.
Thanks for the help!
Chris
Thanks for the help!
Chris

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