johnhenry
johnhenry

Reputation: 1333

Fortran error #5082: Syntax error, found IDENTIFIER when expecting one of: <END-OF-STATEMENT> ;

I am "making" a code.

The compilation with make fails producing this error

mpif90 -mkl -O3 -no-prec-div -fpp -openmp -xHost -DMPI -DEFTCOSMOMC -module ReleaseEFTMPI -IReleaseEFTMPI/ -c equations_EFT.f90 -o ReleaseEFTMPI/equations_EFT.o
equations_EFT.f90(267): error #5082: Syntax error, found IDENTIFIER 'EFTCAMBINITIALCONDITIONS' when expecting one of: <END-OF-STATEMENT> ;
        module subroutine EFTCAMBInitialConditions( y, EV, tau )
--------------------------^
equations_EFT.f90(267): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( % [ . = =>
        module subroutine EFTCAMBInitialConditions( y, EV, tau )
----------------------------------------------------------------^
equations_EFT.f90(271): error #6786: This is an invalid statement; an END [MODULE] statement is required.
        end subroutine EFTCAMBInitialConditions
--------^
equations_EFT.f90(271): error #6758: This name is invalid; if a name is present, it must match the corresponding interface body name.   [EFTCAMBINITIALCONDITIONS]
        end subroutine EFTCAMBInitialConditions
-----------------------^
equations_EFT.f90(268): error #6457: This derived type name has not been declared.   [EVOLUTIONVARS]
            type(EvolutionVars) EV
-----------------^
equations_EFT.f90(269): error #6683: A kind type parameter must be a compile-time constant.   [DL]
            real(dl) :: y(EV%nvar)
-----------------^
equations_EFT.f90(269): error #6535: This variable or component must be of a derived or structure type   [EV]
            real(dl) :: y(EV%nvar)
--------------------------^
equations_EFT.f90(269): error #6460: This is not a field name that is defined in the encompassing structure.   [NVAR]
            real(dl) :: y(EV%nvar)
-----------------------------^
equations_EFT.f90(269): error #6223: A specification expression is invalid.   [NVAR]
            real(dl) :: y(EV%nvar)
-----------------------------^
equations_EFT.f90(270): error #6683: A kind type parameter must be a compile-time constant.   [DL]
            real(dl) :: tau
-----------------^
equations_EFT.f90(269): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association   [EV]
            real(dl) :: y(EV%nvar)
--------------------------^
compilation aborted for equations_EFT.f90 (code 1)

I attach the snippet from equations_EFT.f90

interface

        module subroutine EFTCAMBInitialConditions( y, EV, tau )
            type(EvolutionVars) EV
            real(dl) :: y(EV%nvar)
            real(dl) :: tau
        end subroutine EFTCAMBInitialConditions

    end interface

Is there something wrong in this snippet? It is strange because this is distributed software, but I have literally just followed the instruction to make the code.

Upvotes: 0

Views: 7467

Answers (1)

francescalus
francescalus

Reputation: 32366

The code of the question is an example of using submodules, a feature newly introduced into Fortran in the 2008 revision. To compile this code you will need a compiler which understands this concept.

The GNU and Intel compilers are examples of such, but you will need an appropriate version.

Upvotes: 1

Related Questions