Silverfrost Forums

Welcome to our forums

Is this error or comment ?

9 Aug 2012 7:16 #10577

Get two errors in someone's code i try to use

1663)         REAL(8) a(np,np),alud(np,np),b(n),x(n)
*** Invalid KIND specifier
COMMENT - Specifying the kind of the type REAL with a constant is non-portable 
    - 'SELECTED_REAL_KIND(6,37)' would be better
1665)         REAL(8) r(np),sdp
*** Invalid KIND specifier
    2 ERRORS, 1 COMMENT  [<IMPROVE8> FTN95/Win32 v6.30.0]


Is Real(8) error or comment here ?

The subroutine starts like this

	SUBROUTINE improve8(a,alud,n,np,indx,b,x)
c
c- iterative improvment, computing residu
c
	INTEGER n,np,indx(n) 
	REAL(8) a(np,np),alud(np,np),b(n),x(n)
	INTEGER i,j
	REAL(8) r(np),sdp 
9 Aug 2012 11:50 #10579

*** denotes an error. Then you get an additional comment.

KIND = 8 may be OK if you use /alt_kinds on the command line.

10 Aug 2012 9:08 #10586

Thanks, will try this. I can suggest to the code authors to change that if this is not portable. Which way would be the best?

10 Aug 2012 2:48 #10588

For portability use SELECTED_REAL_KIND.

11 Aug 2012 4:49 #10590

Do other common 'slang' shorter forms exist but not as short as one above in my example? SELECTED_REAL_KIND is damn long

11 Aug 2012 5:01 #10591

Dan,

What about REAL*8 I don't know of a compiler that will get that wrong.

John

Please login to reply.