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 |
Well, first of all I am very sure that I don't know much about gfortran or the commands related to it, as I have never used it before. I have always been using g77.
Regarding complaints, as terry-duell wrote, they are warnings and not unusual. But at the end an executable file should be produced, which does not happen. These codes comprise of equations which I am using to calculate some results. They are not any technical codes as such. Regarding this other system, I have no idea what it is except that it is an Unix system and I connect to it through SSH client. But I tried to find which f90 compiler it has, using following command Code:
info f90 f95 - invokes the Compaq Fortran 95 (formerly DIGITAL Fortran 95) compiler f77 - invokes the Compaq Fortran 90 (formerly DIGITAL Fortran 90) compiler f77 -old_f77 - invokes the Compaq Fortran 77 (formerly DIGITAL Fortran 77)compiler" May be this could be of some help. |
Quote:
Quote:
We will be able to be of more help if you would provide some of the output from your attempts to use gfortran. At the moment the information you are providing is too sparse. Please conduct the little experiment I suggested and post the result here. Cheers, Terry |
Hello guys!
Past couple of weeks I was quite busy and could not keep track with your suggestions. Yesterday I tried Intel Fortran compiler and it solved the problem. Thank you so much for your help & suggestions! best regards, nelufarup |
All times are GMT -5. The time now is 01:03 AM. |