LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Fortran (f77) for linux? need compiler for SLES10 preferably free (https://www.linuxquestions.org/questions/programming-9/fortran-f77-for-linux-need-compiler-for-sles10-preferably-free-662475/)

ron7000 08-13-2008 09:16 AM

Fortran (f77) for linux? need compiler for SLES10 preferably free
 
what Fortran compilers are available for linux?
I am running Suse Linux Enterprise Server 10 sp1 on an intel Itanium2 system (ia-64).
That gives gfortran as a fortran compiler but it will not compile fortran code that will compile in f77.
Is there a way to get f77/f90/f95 for free?
If I have to pay for it, who's good?

matthewg42 08-13-2008 09:29 AM

http://gcc.gnu.org/fortran/

colucix 08-13-2008 09:40 AM

If you have an intel cpu, you can try the Intel Fortran Compiler for Linux (ifort). The non commercial license is free: read carefully the requirements to obtain this kind of license and see if you match them. Basically (quoting from the Intel site):
Quote:

Non-commercial means you are not getting compensated in any form for the products and services you develop using these Intel® Software Development Products.
...
Note that academic use of the products does not qualify for a non-commercial license.
You can also get the Intel C/C++ compiler. Start looking at the Intel site, here.

ron7000 08-13-2008 09:53 AM

i've looked at the gcc fortran link and maybe i'm dumb but how or where do I download it from?
That page has nothing useful :confused:

gnu says they dropped g77 under version 4 of the gcc and gfortran is fortran95.
I am looking for the old f77 compiler, I find links here and there but never anything that lets me download the compiler so I can build it.
If anyone can tell me how to get it, I would be very grateful.

I also have the intel compilers, and what a pita it is with licensing.
But for gnu stuff I sometimes want to build, it wants f77 not ifort.

matthewg42 08-13-2008 10:08 AM

SuSE should have the fortran compiler in the repositories. Just use YaST and search for it. You should always check your distribution's repositories before going anywhere else - it's much easier to manage software which your package manager knows about.

colucix 08-13-2008 10:22 AM

Quote:

Originally Posted by ron7000 (Post 3246024)
But for gnu stuff I sometimes want to build, it wants f77 not ifort.

The Intel fortran compiler is fully compatible with the Fortran 77 standard, so you can simply create a link to ifort somewhere in your path, e.g.
Code:

ln -s /opt/intel/fc/10.0.026/bin/ifort /usr/bin/f77
or assign the value "ifort" to the F77 environment variable, as required by some software installation procedures.

Following the suggestion by matthewg42, you can try to search "fortran" in Yast package management. You will find something like gcc42-fortran. Maybe this is what you're looking for.

jiml8 08-14-2008 11:52 AM

Surely fortran95 is backward compatible with fortran 77?

colucix 08-14-2008 12:21 PM

Quote:

Originally Posted by jiml8 (Post 3247569)
Surely fortran95 is backward compatible with fortran 77?

I compiled both Fortran90 and pure Fortran77 codes, using the Intel compiler (version 10.0) without any special option. The f77 program was a quite complex oceanographic model, and the compiler worked without a glance.


All times are GMT -5. The time now is 03:17 PM.