Unclassifiable statement,, Unexpected data declaration statement

  • Thread starter travers
  • Start date
  • Tags
    Data
In summary, the code provided is written in Fortran and contains various errors, such as missing "precision" in some lines and missing parentheses in others. The variables names used are not easily understandable and the code is written with very little spacing, making it difficult to read.
  • #1
travers
2
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)
!**********************************
 
Technology news on Phys.org
  • #2
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.
 
  • #3
I delete precision, the errors also exist.
 
  • #4
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>
 
  • #5

! new added for petro_galerkin
!**********************************
type(vector_field), intent(inout) :: delta_u
type(scalar_field), intent(inout) :: delta_p
type(state_type), dimension(:) :: POD_state
type(petsc_csr_matrix), intent(inout) :: big_m
type(block_csr_matrix), intent(in) :: ct_m
type(vector_field), intent(in) :: mom_rhs
type(scalar_field), intent(in) :: ct_rhs
type(vector_field), pointer :: POD_u
type(scalar_field), pointer :: POD_p
inter :: POD_u_scalar ! new added for petro_galerkin
type(vector_field), dimension(:), allocatable :: u_tmp
type(vector_field) :: u_c
type(scalar_field) :: ct_tmp
type(scalar_field) :: comp1, comp2
type(pod_matrix_type) :: pod_matrix
type(pod_rhs_type) :: pod_rhs,pod_rhs_old
integer :: i, j, d1, d2, u_nodes, p_nodes, POD_num, timestep
real, dimension(:,:), allocatable :: pod_tmp
real, dimension(:), allocatable :: pod_coef
print*, "It seems that there are multiple errors in your code. The "unclassifiable" and "unexpected data declaration" statements indicate that there are syntax errors in your code. These errors may be due to a lack of understanding of the Fortran language or a mistake in typing the code. It would be helpful if you could provide more information about your code and the specific errors you are encountering. Additionally, I suggest seeking assistance from a more experienced Fortran programmer to help you identify and correct these errors. Good luck with your coding journey!"
 

What is an unclassifiable statement?

An unclassifiable statement is a statement that does not fit into any existing classification or category. It may be considered irrelevant or nonsensical in the context of a particular system or study.

What is an unexpected data declaration statement?

An unexpected data declaration statement is a statement that declares a data type or variable that is not anticipated or allowed in a particular program or code. It may result in errors or unexpected outcomes.

Why do unclassifiable statements and unexpected data declaration statements occur?

Unclassifiable statements and unexpected data declaration statements can occur due to human error, programming mistakes, or changes in the system or environment that were not accounted for in the code. They can also occur when dealing with complex or inconsistent data.

How can unclassifiable statements and unexpected data declaration statements be avoided?

To avoid unclassifiable statements and unexpected data declaration statements, it is important for programmers to thoroughly test their code and anticipate potential errors or issues. Proper coding practices and attention to detail can also help prevent these statements from occurring.

What should be done when encountering an unclassifiable statement or unexpected data declaration statement?

When encountering an unclassifiable statement or unexpected data declaration statement, it is important to carefully review the code and identify the source of the issue. This may involve debugging or adjusting the code to properly handle the unexpected statement.

Similar threads

  • Programming and Computer Science
Replies
4
Views
15K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
4
Views
12K
  • Programming and Computer Science
Replies
11
Views
14K
  • Programming and Computer Science
Replies
4
Views
11K
  • Atomic and Condensed Matter
Replies
3
Views
836
  • Programming and Computer Science
Replies
1
Views
11K
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
4
Views
3K
Back
Top