How to get Fortran90 compiler
I have g77 working fine in Fedora 9 (Sulphur), but recently I have got some files which can be compiled using Fortran 90 compiler. My system has Fortran 95 compiler but unfortunately it is of no help, as I cannot compile files using it. For compiling I need to use f90 command.
So please, some one can suggest how I can get fortran 90 compiler. Thanks! |
According to the Wikipedia entry on Fortran, Fortran 95 was a minor upgrade to Fortran 90. It should be compatible. So, are you saying the Fortran 95 compiler you have is nonfunctional in general or that it just doesn't work on these particular files?
At the end of the Wikipedia entry there are links to the GNU Fortran project (95/2003) and to the g95 project. Both are open source, and perhaps you could try them. |
First of all thanks for the reply!
Quote:
Quote:
Thank you again! |
Any error messages? Are you a programmer who knows Fortran and could possibly fix incompatibilities in the code?
|
Quote:
I am not a technical programmer. |
Look at the gcc docs and there will almost certainly be, amongst the millions of unwanted and confusing switches, a switch that will compile your program in F90 mode.
|
Quote:
Code:
ls -l $(which f95) Anyway, you can try to install gcc-gfortran. Look for "fortran" in the search form of Add/Remove software or try the following if you prefer the command line package manager: Code:
yum install gcc-gfortran |
Quote:
Code:
f90 dpi.exe -o *.for Code:
ls -l $(which f95) Code:
lrwxrwxrwx 1 root root 8 2008-08-05 04:43 /usr/bin/f95 -> gfortran Quote:
Thanks! |
Yes, it is gfortran, which currently supports F77, F90 and F95 standard. The package gcc-fortran is already installed on your system, since it is that one which provides the gfortran executable in Fedora. However, the command line used to compile is wrong:
Code:
f90 dpi.exe -o *.for Code:
f90 -o dpi.exe *.for |
Quote:
But it seems that f90 is not a valid link to gfortran since this command does not works. So could you tell how can I make a valid link of f90 to gfortran? Thanks! |
Quote:
Cheers, Terry |
I agree with terry-duell. You don't need links to gfortran, unless for mnemonic aid. Use gfortran command directly. Anyway, the command to create a symbolic link is ln -s. Take a look at man ls for further details.
|
Thanks for the command help terry-duell! I did not use it, as I did not know about it.
Anyway, I used the command but with no success. It did not produce executable file instead gave list of complains with the declarations and dimensions in the codes. Now I am completely sure that there is no problem with that, as the codes can be compiled properly on other system with out any problem. Let me write the exact commands that I have been using on this other system to compile different files in a directory together. Code:
f90 -o tm.exe *.for Thanks! |
Quote:
Quote:
Quote:
|
Quote:
Maybe the source is non standard. What result do you get if you try to compile only one of the fortran source files? Try this ... 'gfortran fred.for -o fred' where fred.for is any one of your *.for source files, and let us know the result. If you still get error messages please provide some of these so we can get an idea of what is happening. If there are only complaints (warnings) that is not unusual. Cheers, Terry |
All times are GMT -5. The time now is 10:00 AM. |