|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
KL Guest
|
Posted: Thu Dec 14, 2006 10:17 am Post subject: Problem Error Argument |
|
|
Dear Paul,
The error occurs only with the compiler option /Checkmate. I have
run the program with FTN95 Version 4.7 and a bat file:
del comp.lis
del *.obj
del *.exe
ftn95 Error_Argument.f95 /Checkmate /underflow /link >> comp.lis
sdbg Error_Argument.exe
The error message is
"Attempt to call a routine with argument number three
containing too few array elements"
Without the compiler option /Checkmate, the error
does not occur.
The program is:
Winapp
Program Error_Argument
! With FTN95 Version 4.70 and the compiler option
! ftn95 Error_Argument.f95 /Checkmate /underflow >> comp.lis
! this programs leads to the error output:
! "Attempt to call a routine with argument number three
! containing too few array elements"
!
! Comment: This error occurs only with the option /CHECKMATE
Implicit None
Integer :: nDim
! --------------------------------------------------------------------
Interface
Subroutine Broyden ( x_Broyden_new, F_Broyden_new )
Implicit None
Real , Dimension ( , Intent (in ) :: x_Broyden_new
Real , Dimension ( , Intent (out) :: F_Broyden_new
End Subroutine Broyden
End Interface
! --------------------------------------------------------------------
Integer , Parameter :: mDim_Broyden = 10
Real , Dimension ( mDim_Broyden ) :: x_Broyden_new , &
F_Broyden_new
nDim = 4
x_Broyden_new (1:nDim) = -9.0
Call Broyden ( x_Broyden_new (1:nDim) , &
F_Broyden_new (1:nDim) )
End Program Error_Argument
Subroutine Broyden ( x_Broyden_new , F_Broyden_new )
Implicit None
! --------------------------------------------------------------------
! Interface ! Funcv does not need an interface
! Subroutine Funcv (n,x,f) ! However, the interface does not
! solve the problem
! Integer , Intent (in) :: n
! Real , Dimension (n), Intent (in) :: x
! Real , Dimension (n), Intent (out) :: f
! End Subroutine funcv
! End Interface
! --------------------------------------------------------------------
Real , Dimension ( , Intent (in ) :: x_Broyden_new
Real , Dimension ( , Intent (out) :: F_Broyden_new
Integer :: n
n = size (x_Broyden_new)
write (*,*) 'n = ', n ! gives the correct answer
write (*,*) size (x_Broyden_new) ! gives the correct answer
write (*,*) size (F_Broyden_new) ! gives the correct answer
! stop
! Call Funcv ( n, x_Broyden_new, F_Broyden_new ) ! gives error
! Call Funcv ( n, x_Broyden_new (1:4), F_Broyden_new (1:4) ) ! gives error
Call Funcv ( n, x_Broyden_new (1:n), F_Broyden_new (1:n) ) ! gives error
! ##########
End Subroutine Broyden
Subroutine Funcv (n,x,f)
Implicit None
Integer , Intent (in) :: n
Real , Dimension (n), Intent (in) :: x
Real , Dimension (n), Intent (out) :: f
f (1) = - x (1)**2 - x (2)**2 - x (3)**2 + x (4)
f (2) = + x (1)**2 + x (2)**2 + x (3)**2 + x (4)**2 -1.
f (3) = x (1) - x (2)
f (4) = x (2) - x (3)
Write (*,*) 'f1 = ', f (1)
Write (*,*) 'f2 = ', f (2)
Write (*,*) 'f3 = ', f (3)
Write (*,*) 'f4 = ', f (4)
End Subroutine funcv |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Fri Dec 15, 2006 8:34 am Post subject: |
|
|
I will investigate this and get back to you as soon as I can. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Thu Dec 21, 2006 4:35 pm Post subject: |
|
|
Klaus
This problem appears to have already been fixed. |
|
Back to top |
|
|
KL Guest
|
Posted: Sat Jan 06, 2007 11:07 am Post subject: |
|
|
Paul, in what version has this problem been fixed?
Best regards, Klaus |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Sun Jan 07, 2007 9:35 am Post subject: |
|
|
Klaus
If I have run the test correctly it will be OK in version 5.0.
If it is not fixed for you, please let me know what operating system you are using. |
|
Back to top |
|
|
KL Guest
|
Posted: Wed Jan 17, 2007 12:20 pm Post subject: |
|
|
Paul, I have installed FTN95 Version 5.01 and the error is still there. I cannot see any difference to version 4.7. I am using Windows XP with Service Pack 1 and 2 installed. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|