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

Intel fortran complier error #8284.

Shaun_B_
Beginner
2,079 Views

I am trying to compile lsode(livermore solver for ordinary differential equation), I have the error:

lsode.f(1529): error #8284: A scalar actual argument must be passed to a scalar dummy argument unless the actual argument is of type character or is an element of an array that is neither assumed shape nor pointer.   [MSG]

lsode.f(1533): error #8284: A scalar actual argument must be passed to a scalar dummy argument unless the actual argument is of type character or is an element of an array that is neither assumed shape nor pointer. [MSG]

lsode.f(1535): error #8284: A scalar actual argument must be passed to a scalar dummy argument unless the actual argument is of type character or is an element of an array that is neither assumed shape nor pointer. [MSG]

 Here are the codes(in lsode.f):

80 call xerrwv(30hintdy-- k (=i1) illegal ,
1 30, 51, 0, 1, k, 0, 0, 0.0d0, 0.0d0)
iflag = -1
return
90 call xerrwv(30hintdy-- t (=r1) illegal ,
1 30, 52, 0, 0, 0, 0, 1, t, 0.0d0)
call xerrwv(
1 60h t not in interval tcur - hu (= r1) to tcur (=r2) ,
1 60, 52, 0, 0, 0, 0, 2, tp, tn)
iflag = -2
return

Is there any solution to this error.

Thanks,

Shaun

0 Kudos
7 Replies
Steven_L_Intel1
Employee
2,079 Views

Hollerith constants!  Fun! We really shouldn't be giving this error for passing Hollerith constants to an array, as that is how it was done "back in the day". Funny that this hadn't come up before.

I don't suppose I could convince you to rewrite the calls and the routine to use character arguments?

Here's the simple solution for now.  In your Visual Studio project, right click on the project, select Properties. Go to Fortran > Diagnostics.  Change "Check routine interfaces" to No and click OK.

I will report this to the developers.

0 Kudos
TimP
Honored Contributor III
2,079 Views

You could look up previous posts on this issue; the non-compliance of such legacy code can be ignored by disabling the /warn-interfaces option, or corrected by replacing the scalar arguments by arrays of size 1.

At the time this was written it was definitely non-portable but Fortran standard didn't require a warning on machines where it worked OK.

0 Kudos
Steven_L_Intel1
Employee
2,079 Views

It doesn't work in this case to "replace the scalar arguments by arrays of size 1", though in other cases that can be a fine approach.

The use of Hollerith here is exactly how one would have done this in F66. We should allow it.

0 Kudos
bmchenry
New Contributor II
2,079 Views

i would suggest that you put in the effort and change the code from the dark hollerith ages...simply enclose the formerly hollerith messages in simple quotes, makes for cleaner code (count them hollerith characters!)

80 call xerrwv('intdy-- k (=i1) illegal',30, 51, 0, 1, k, 0, 0, 0.0d0, 0.0d0)
90 call xerrwv('intdy-- t (=r1) illegal' ,30, 52, 0, 0, 0, 0, 1, t, 0.0d0)
etc

0 Kudos
andrew_4619
Honored Contributor III
2,079 Views

that would still complain about arguament types as in this case you are passing a 30 character string into a dim 30 array of default integers of whatever KIND those my be. And depenant on what the KIND (word size) was some manipulation of the array may then follow...

Not a pleasant job if there is lots of code.....

0 Kudos
mecej4
Honored Contributor III
2,079 Views

bmcherry wrote:
simply enclose the formerly hollerith messages in simple quotes, makes for cleaner code (count them hollerith characters!)

For any but the shortest source files, that kind of gruntwork should not be done by hand -- especially the counting of characters! Silverfrost/Salford Fortran has a /CONVERT option that takes reads source files with Hollerith strings as in the snippet above and prints out quoted strings.That converter does not pad lines on the right, so make sure that the text editor used does not truncate lines by removing terminal blanks! For example, the line "call xerrwv(30hintdy-- k (=i1) illegal ," does not contain the necessary 30 characters after "30h".

0 Kudos
Steven_L_Intel1
Employee
2,079 Views

I expect the inappropriate error message to be resolved in a release later this year.

0 Kudos
Reply