Information on Software and Computers at IPT


Intel fortran

Fortran compiler.

How to start
Example 1:

!file 1, test1.f90:
      program test
      integer a, b, sum
      a=10
      b=53
      sum= a*b
      write(*,*) sum
      end

To compile into the executable file prog:

ifort -o prog test1.f90

Example 2:

!file 1, test.f90:
      program test
      integer a, b, sum
      a=10
      b=53
      sum= mult( a, b )
      write(*,*) sum
      end
!file 2, mult.f90:
      function mult( a, b )
      integer a, b
      mult= a*b
      end

To compile both together into the executable file prog:

ifort -o prog test.f90 mult.f90

First compile mult.f90 into an object file, and then compile test.f90 and link mult.o into the executable prog:

ifort -c -o mult.o mult.f90
ifort -o prog test.f90 mult.o


How to get options
Example:

man ifort

Fortran debugger
Manual

Links
Intel Fortran get help.
Intel Fortran home page.
Intel Fortran Compiler Reference
Intel Fortran Documentation

Contact Persons
Erlend Våtevik, (735) 949 47, 918 97 304, erlend.vatevik@ntnu.no, room L304
Knut Backe, (735) 949 40, knut.reitan.backe@ntnu.no, room L438 (backstairs)