Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compile problems

miranda__marcela
Beginner
695 Views

Hello group!

I was using an Intel Compile 2013 software with a university license to work on my projects. The same project does not compile in recent compilers, but at this point i am using a student version. The details of fortran languages ​​are correct, my teacher checked the code.

In old compiler the code works correctly but i need use a new version of the compiler.

For exemple: (errors)

 #6404: This name does not have a type, and must have an explicit type.   [MCONL2]        

#6401: The attributes of this name conflict with those made accessible by a USE statement.   [MCONL2]       

 #6445: A dummy argument is required in this context.   [MCONL2]       

 #6405: The same named entity from different modules and/or program units cannot be referenced.   [MCONL2]        

Can someone help me?

Thanks

0 Kudos
5 Replies
andrew_4619
Honored Contributor III
695 Views

the old compiler is just not reporting errors in the fortran code maybe because of which checking options are enabled. You need to fix the Fortran.

#6404: This name does not have a type, and must have an explicit type.   [MCONL2]

You are using a variable called MCONL2 that has no type defined, you need a type.  e.g INTEGER :: MCONL2

#6401: The attributes of this name conflict with those made accessible by a USE statement.   [MCONL2]       

Here you have USE mymodulename in your program/subroutine so variables defined in mymodulename are brought into your program/subroutine where you must already have some definition of the same variable. This is a conflict which must be fixed.

It is hard to generalise the explanation as there are many permutations, if you cannot fix this it yourself (always a good idea if you want to learn) it would be better to post some examples of the code that gives these errors.

 

 

 

0 Kudos
miranda__marcela
Beginner
695 Views

But is correctly, the code was revised. 

Example:

 subroutine AAA(tycem,fck28,rh,vs,temper,t0,t,cr,phi0)
    use mtime
    implicit none
!            
    ! Parameters
    integer(2),intent(in)   ::  tycem   
    real(8),intent(in)      ::  fck28  
    real(8),intent(in)      ::  rh      
    real(8),intent(in)      ::  vs  
    real(8),intent(in)      ::  temper 
    real(8),intent(in)      ::  t0      
    real(8),intent(in)      ::  t       
    real(8),intent(out)     ::  cr  

...

Error:
Erro        error #6404: This name does not have a type, and must have an explicit type.   [TYCEM]        
Erro        error #6404: This name does not have a type, and must have an explicit type.   [FCK28]        
Erro        error #6404: This name does not have a type, and must have an explicit type.              
Erro        error #6404: This name does not have a type, and must have an explicit type.   [TEMPER]        
Erro        error #6404: This name does not have a type, and must have an explicit type.   [CR]       
Erro        error #6404: This name does not have a type, and must have an explicit type.   [VS]   
Erro        error #6404: This name does not have a type, and must have an explicit type.   [T0]       
Erro        error #6404: This name does not have a type, and must have an explicit type.   [RH]     

...

All variables are declared with the correct type in the USE routine (mtime).

0 Kudos
gib
New Contributor II
695 Views

This is a bit confusing.  It looks as if those variables are declared both in subroutine AAA, and in module mtime that AAA USEs.  You are calling AAA with a list of arguments that are declared in module mtime.  Is this really what you want to do?  Where is AAA called from, and how are the variables declared there?  It might help if you showed the code that calls AAA, and also the code for module mtime.

0 Kudos
Steve_Lionel
Honored Contributor III
695 Views

Please attach the complete source. There's something important you're not showing us. 

0 Kudos
jimdempseyatthecove
Honored Contributor III
695 Views

>>All variables are declared with the correct type in the USE routine (mtime).

The variables EITHER exist in the module mtime .OR. are referenced by dummy arguments declared in AAA. (not both)

Your statement above, appears to indicate you are assuming USE ... is equivalent to INCLUDE, which is not the case.

Jim Dempsey

0 Kudos
Reply