View previous topic :: View next topic |
Author |
Message |
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Tue Jan 08, 2008 3:52 pm Post subject: Porting f77 code to f90 |
|
|
Hello,
I have got a fortran 77 code in unix. I need it to be ported to fortran 90 in unix. Can any one help me with this.
Thank you,
Regards,
Ajith. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 Location: Salford, UK
|
Posted: Tue Jan 08, 2008 10:18 pm Post subject: |
|
|
FTN77 and FTN95 are not available for a Unix environment.
In order to use either of these compilers you will need change to Windows. |
|
Back to top |
|
|
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Wed Jan 09, 2008 12:20 pm Post subject: Error while compiling unix f90 code in xp salford compiler |
|
|
Hi,
I have a fortran code which is compatible in unix. I need it to be migrated to a XP based machine using salford compiler. I have created a new project and added all the source files using the add existing item. I need to add some libraries(with .a extension and .sl extension) also, so i have added it in the project using the add reference option. When i try to compile the code its giving the following errors.
Compiling file: yn.f90
C:\ELLA Application\trip\src\yn.F90(1) : error 441 - Illegal character combination, '-' followed by '-'
C:\ELLA Application\trip\src\yn.F90(2) : error 32 - Statement not recognised
C:\ELLA Application\trip\src\yn.F90(3) : fatal 399 - Unrecognised statement, did you forget to add /FIXED_FORMAT?
Please find below a sample program which i am trying to compile...
C***********************************************************C
C Modified by: xyz.
C Date: 13/01/2000
C Description: sample program
C************************************************************
C
FUNCTION YN(DUM,DUM2) YN 00010
LOGICAL*1 YN YN 00020
DATA IUY/1HY/,ILY/1Hy/,IUN/1HN/,ILN/1Hn/ YN 00030
READ(5,50) IANS YN 00060
YN=.FALSE. YN 00070
IF(IANS .EQ. ILY .OR. IANS .EQ. IUY) YN=.TRUE. YN 00080
50 FORMAT(A1) YN 00090
RETURN YN 00100
END YN 00110
Thank you,
Ajith |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8019 Location: Salford, UK
|
Posted: Wed Jan 09, 2008 1:52 pm Post subject: |
|
|
Your code is in "fixed" Fortran. You must either use the extension .for for your source files or use /FIXED on the FTN95 command line.
Libraries for a UNIX environment must be rebuilt. If you do not have the source code for the libraries (or equivalent Windows libraries) then it will not work. |
|
Back to top |
|
|
|