fortranubuntu-13.10

"ftn" command in ubuntu system


I am trying to run some benchmarks and most of them use the fortran compiler with "ftn" command. But none of the packages of fortran77 or fortran95 from gfortran and all, provides "ftn".

Can anyone tell me is there any package available for ubuntu 13.10 to get ftn. Or is it only for cray linux environment?


Solution

  • ftn is a wrapper command like cc or cxx. That is, it's a command that calls another command that calls a fortran compiler. Which compiler it calls (and with which options) depends on the system you're running it on. After a quick googling, it looks like a lot of systems have it aliased to either the portland or intel fortran compiler.

    You can make your own ftn by putting this in your .bashrc file in your home directory, and then running this command or restarting bash:

    alias ftn='gfortran'
    

    You could also add some common compiler options, like this:

    alias ftn='gfortran -O3'