- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Following message is mistake, please do not pay attention.
Jakub
I have problem with generated interfaces to routines.
When I have complex*16 arguments of function, in generated interface is complex(KIND=8).
I used generated interfaces in my program and observed problems passing complex values and after search for cause I have found this error.
I created simple test project (compiler 11.1.067 but it is also in 65)
Jakub
Jakub
I have problem with generated interfaces to routines.
When I have complex*16 arguments of function, in generated interface is complex(KIND=8).
I used generated interfaces in my program and observed problems passing complex values and after search for cause I have found this error.
I created simple test project (compiler 11.1.067 but it is also in 65)
[fortran]program TestComplex16Generated interface is
interface
recursive double complex function EvalParaxAberf(w1,w2,w3,w4,&
gamma)
double complex w1,w2,w3,w4 ! particle coordx x,y at z position
real*8 gamma
end function
end interface
complex*16 w(4),waux
integer*4 iRay(3)
real*8 gamma
complex(KIND=8) c8
complex(KIND=16) c16
c8=(1.D0,2.D0)
c16=(1.D0,2.D0)
w(1)=(1.D0,0.D0)
w(2)=(2.D0,0.D0)
w(3)=(3.D0,0.D0)
iRay(1)=1
iRay(2)=2
iRay(3)=1
iRayDefl=0
gamma=4.D0
wAux=EvalParaxAberf(w(iRay(1)),w(iRay(2)),w(iRay(3)),w(1),&
gamma)
end program TestComplex16
recursive double complex function EvalParaxAberf(w1,w2,w3,w4,&
gamma)
double complex w1,w2,w3,w4 ! particle coordx x,y at z position
real*8 gamma
write(91,*) w1,w2,w3,w4,gamma
EvalParaxAberf=1.D0/2.D0*w1
return
end
[/fortran]
[fortran] !COMPILER-GENERATED INTERFACE MODULE: Thu Sep 02 13:00:21 2010
MODULE EVALPARAXABERF__genmod
INTERFACE
RECURSIVE FUNCTION EVALPARAXABERF(W1,W2,W3,W4,GAMMA) RESULT(&
&EVALPARAXABERF@0)
COMPLEX(KIND=8) :: W1
COMPLEX(KIND=8) :: W2
COMPLEX(KIND=8) :: W3
COMPLEX(KIND=8) :: W4
REAL(KIND=8) :: GAMMA
COMPLEX(KIND=8) :: EVALPARAXABERF@0
END FUNCTION EVALPARAXABERF
END INTERFACE
END MODULE EVALPARAXABERF__genmod
[/fortran]
Jakub
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry it is my mistake all is OK, complex(KIND=8) is complex*16. There is not problem
Jakub
Jakub
![](/skins/images/2E08A100FB92911314A240D1EAFB2828/responsive_peak/images/icon_anonymous_message.png)
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