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

Error in compiling in MVS 2010

Sabin_M_
Beginner
774 Views

Hi Steve,

I am trying to compile Arc SWAT 2009 source codes and I find two messages; 

Firstly,

" remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'. "

In code, the line is like this 

 "1000 format ('BIGSUB',i4,1x,i8,1x,i4,e10.5,18e10.3,1x,e10.5,3e10.3)"

Secondly,

" error #6553: A function reference is invoking a subroutine subprogram.   [ICL] "   

the error refer to line this "   ii = icl(iida) "

Can you help me and elaborate the step to proceed. If you need any further information, i can provide you. 

Thank you in advance.

Kind regards,

Rock

0 Kudos
1 Solution
Lorri_M_Intel
Employee
774 Views

I'm not Steve, although people do confuse us sometimes since our cubicles are so close together ...

The line you showed had a call to "ICL" in a context that is expecting a function.

How is your routine ICL declared?   If it is declared as a subroutine, then it is illegal to call it as a function.   Subroutines do not return any value that could be stored into the "ii" variable on the left hand side of the expression.

I don't know anything about the source code that you're trying to compile, but if, in fact, ICL is a subroutine, it would never be returning anything into II, and so you can probably just remove the "II =" part of that statement with no loss of functionality.

For the remarks about your print format?  For now, if it were me, I would just ignore them until the rest of the program was working.  These remarks simply indicate that the edit instructions you used (the E10.5 ones) will not give you the optimal display.  In particular, these (E10.5) won't display anything to the left of the decimal point, because they're displaying more on the right of the decimal point.

This is why I'd ignore them for now, until the program was working; then you can tweak the output to make it as pretty as you want.

                      --Lorri

View solution in original post

0 Kudos
4 Replies
Lorri_M_Intel
Employee
775 Views

I'm not Steve, although people do confuse us sometimes since our cubicles are so close together ...

The line you showed had a call to "ICL" in a context that is expecting a function.

How is your routine ICL declared?   If it is declared as a subroutine, then it is illegal to call it as a function.   Subroutines do not return any value that could be stored into the "ii" variable on the left hand side of the expression.

I don't know anything about the source code that you're trying to compile, but if, in fact, ICL is a subroutine, it would never be returning anything into II, and so you can probably just remove the "II =" part of that statement with no loss of functionality.

For the remarks about your print format?  For now, if it were me, I would just ignore them until the rest of the program was working.  These remarks simply indicate that the edit instructions you used (the E10.5 ones) will not give you the optimal display.  In particular, these (E10.5) won't display anything to the left of the decimal point, because they're displaying more on the right of the decimal point.

This is why I'd ignore them for now, until the program was working; then you can tweak the output to make it as pretty as you want.

                      --Lorri

0 Kudos
TimP
Honored Contributor III
774 Views

As Lorri hinted, Fortran doesn't permit using the same procedure both as a subroutine and as a function, although some past compilers supported this, possibly by accident.  Presumably, the compiler sees this procedure first in a CALL (discarding any function value returned) and then as a function reference.  You would need to make the references consistent.  Prior to Fortran 90, it was usual practice to use subroutine calls without declaration.

0 Kudos
Steven_L_Intel1
Employee
774 Views

On Intel architecture, invoking a function as a subroutine (or vice-versa) can lead to incorrect results or run-time errors if the function returns a floating point value. As my doppleganger Lorri says, the language prohibits this and the Intel compiler now enforces it if it can see that the rule is violated.

0 Kudos
Sabin_M_
Beginner
774 Views

 

Thank you so much for the information Lorri Menard Tim Prince and Steve Lionel . I am beginner with this program. Now, I found I was also confuse with function and subroutines. Thanks Lorri Menard for explanation. It was really great help indeed.

Kind regards,

Rock 

 

0 Kudos
Reply