Unclassifiable statement,, Unexpected data declaration statement

  • Thread starter Thread starter travers
  • Start date Start date
  • Tags Tags
    Data
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 12K views
travers
Messages
2
Reaction score
0
I am new to fortran. when I define something, I got a lot of errors? can anyone help me ? thanks .

double :: leftsvd(istate,nsvd), svdval(nsvd)
1
Error: Unclassifiable statement at (1)
Reduced_Model_Runtime.F90:192.2:

double :: leftsvd_gi(ngi,nsvd),leftsvd_x_gi(ngi,nsvd),smean_gi(ngi)
1
Error: Unclassifiable statement at (1)
Reduced_Model_Runtime.F90:197.3:

double :: precision smean(istate),snapmatrix(istate,nrsnapshots
1
Error: Unclassifiable statement at (1)
Reduced_Model_Runtime.F90:214.15:

real :: XCOR
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:215.22:

REAL :: N(NLOC,NGI)
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:216.64:

REAL :: RES(NGI),GRADX(NGI),GRADT(NGI),DIFFGI(NGI),THETA(NGI)
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:225.48:

type(vector_field), intent(inout) :: delta_u
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:226.48:

type(scalar_field), intent(inout) :: delta_p
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:227.47:

type(state_type), dimension(:) :: POD_state
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:229.50:

type(petsc_csr_matrix), intent(inout) :: big_m
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:230.46:

type(block_csr_matrix), intent(in) :: ct_m
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:231.45:

type(vector_field), intent(in) :: mom_rhs
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:232.44:

type(scalar_field), intent(in) :: ct_rhs
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:234.40:

type(vector_field), pointer :: POD_u
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:235.40:

type(scalar_field), pointer :: POD_p
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:237.101:

inter :: POD_u_scalar ! new added for petro_galerkin
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:240.58:

type(vector_field), dimension(:), allocatable :: u_tmp
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:241.29:

type(vector_field) :: u_c
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:242.32:

type(scalar_field) :: ct_tmp
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:243.38:

type(scalar_field) :: comp1, comp2
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:245.39:

type(pod_matrix_type) :: pod_matrix
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:246.45:

type(pod_rhs_type) :: pod_rhs,pod_rhs_old
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:248.64:

integer :: i, j, d1, d2, u_nodes, p_nodes, POD_num, timestep
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:249.48:

real, dimension(:,:), allocatable :: pod_tmp
1
Error: Unexpected data declaration statement at (1)
Reduced_Model_Runtime.F90:251.47:

real, dimension(:), allocatable :: pod_coef
1
Error: Unexpected data declaration statement at (1)
Fatal Error: Error count reached limit of 25.
make: *** [Reduced_Model_Runtime.o] Error 1


My coding:

real tol,rk,rkd,t0
INTEGER NGI,NLOC,TOTELE,NONODS,NONODS_CTY,NITS,mxpoi
PARAMETER(NGI=2,NLOC=2,TOTELE=100,NONODS=NLOC*TOTELE)
PARAMETER(NONODS_CTY=TOTELE+1,NITS=5)
parameter ( mxpoi=nonods )
parameter ( tol=1.0e-6, rk=0.1, rkd = 0.0 )
integer ntimemax
parameter (ntimemax = 299)
integer istate
integer nvar
parameter (nvar=1)
parameter ( istate = mxpoi*nvar)
integer nrsnapshots
parameter (nrsnapshots = 100)
integer SnapNdT
! SnapNdT=ntimemax/(nrsnapshots-1)
parameter (SnapNdT=3)
integer iuseobs,iusemean
parameter (iuseobs=0, iusemean=1)
integer :: nsvd,nsnap,isvd,jsvd
parameter (nsvd = 10)
!double, precision :: leftsvd(istate,nsvd), svdval(nsvd)
!double, precision :: leftsvd_gi(ngi,nsvd),leftsvd_x_gi(ngi,nsvd),smean_gi(ngi)
double :: leftsvd(istate,nsvd), svdval(nsvd)
double :: leftsvd_gi(ngi,nsvd),leftsvd_x_gi(ngi,nsvd),smean_gi(ngi)


real :: P_STAR_pod,DIFFGI_pod(NGI)
!double :: precision smean(istate),snapmatrix(istate,nrsnapshots)
double :: precision smean(istate),snapmatrix(istate,nrsnapshots
real :: psi_podbase(nsvd,NONODS)
real :: AMAT_pod(nsvd,nsvd)
real :: KMAT_pod(nsvd,nsvd),KB_pod(nsvd)
real :: b_pod(nsvd)
real :: psi_pod(nsvd)
real :: psi_time(0:ntimemax,nonods),psi_time_pod(0:ntimemax,nonods)
integer iflagobs(0:ntimemax,mxpoi)
real :: varincr(nonods)
REAL :: AMAT_T(NONODS,NONODS),AMAT2(NONODS,NONODS)
real :: B_AMAT(nonods)
REAL :: COURANT
REAL :: DT
INTEGER :: NTIME
PARAMETER(DT=0.001,NTIME=300)
!REAL :: TOTELE
DX=1.0/TOTEL
real :: XCOR
REAL :: N(NLOC,NGI)
REAL :: RES(NGI),GRADX(NGI),GRADT(NGI),DIFFGI(NGI),THETA(NGI)
!**********************************
 
Physics news on Phys.org
In fortran the double precision real type is specified by the two words "double precision".

For example
Code:
double precision :: x,y,z

Somehow I find that really annoying, having two words to represent a single token, but anyway that's how it is.
 
I delete precision, the errors also exist.
 
travers said:
I delete precision, the errors also exist.
uart isn't saying that you should delete "precision" - he's saying that you need both words, as in double precision.

Code:
double :: leftsvd(istate,nsvd), svdval(nsvd)
double :: leftsvd_gi(ngi,nsvd),leftsvd_x_gi(ngi,nsvd),smean_ gi(ngi)
.
.
.
double :: precision smean(istate),snapmatrix(istate,nrsnapshots
Note that the line just above is missing a right parenthesis.
The first two lines are missing "precision".
The last line has :: between double and precision.

<rant>Your code is written as if it were to be read only by machines. Almost everything in there is packed very tightly, with almost zero spacing.

Many of the variable names are incomprehensible - I have no idea what they are supposed to represent. Maybe they are meaningful to you, but they aren't to me. Here are some examples: NGI,NLOC,TOTELE,NONODS,NONODS_CTY,NITS,mxpoi.
</rant>