View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Thu Aug 09, 2012 8:16 am Post subject: Is this error or comment ? |
|
|
Get two errors in someone's code i try to use
Code: |
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
Code: | 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 |
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Thu Aug 09, 2012 12:50 pm Post subject: |
|
|
*** denotes an error. Then you get an additional comment.
KIND = 8 may be OK if you use /alt_kinds on the command line. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Fri Aug 10, 2012 10:08 am Post subject: |
|
|
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? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8211 Location: Salford, UK
|
Posted: Fri Aug 10, 2012 3:48 pm Post subject: |
|
|
For portability use SELECTED_REAL_KIND. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2923 Location: South Pole, Antarctica
|
Posted: Sat Aug 11, 2012 5:49 am Post subject: |
|
|
Do other common "slang" shorter forms exist but not as short as one above in my example? SELECTED_REAL_KIND is damn long |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Sat Aug 11, 2012 6:01 am Post subject: |
|
|
Dan,
What about REAL*8
I don't know of a compiler that will get that wrong.
John |
|
Back to top |
|
 |
|