Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Error #6410

Mehdi_R_
Beginner
431 Views

Hello,

In one of my subroutines, I need to use a function called Bisect (i.e., bisection method for root findings). I got this error. Would you please take a look at the link below and let me know how I can fix this error? Thanks so much,

Mehdi

Error    1     error #6410: This name has not been declared as an array or a function.   [BISECT] 

 

 

 

0 Kudos
3 Replies
Steve_Lionel
Black Belt Retired Employee
431 Views

You have lots of problems here - you added IMPLICIT NONE but many variables are not declared.

For this specific issue, BISECT is declared in module Parm as "Real". Then in function Bisect in Bisect_sub,f90, you have "Use parm", which pulls in the declaration of BISECT. This duplicate definition is not allowed in the language (which is why you also get):

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

It seems to me that someone (you?) is trying to update some old F77-style code to more modern Fortran, moving declarations into modules. If you do this you have to make sure that variables and routines are not multiply declared. For routines, it is often best to put them in modules rather than keep them as external routines that use a common module.

 

mecej4
Black Belt
431 Views

The identifier Bisect is used with two different meanings: (i) as a variable that contains a REAL value, and (ii) the name of a function subprogram that takes a number of arguments and returns a REAL value. If you mix these up, bad things happen.

In the old days, we would submit submit a card deck for an overnight run on a mainframe, expecting to receive output the next morning in the form of line printer fanfolds. Once in a while, we would receive instead a torn piece of a card with "Program Executed Data" scribbled on the back, causing us embarrassment that lasted for several hours, at least.

Mehdi_R_
Beginner
431 Views

Thanks so much.

Let me work on it and will be back to you.

Mehdi

Reply