Skip to content

Techdocs

Sections
Personal tools
You are here: Home Open Access Labs How-To's Using Fortran on the Unix System
Document Actions

Using Fortran on the Unix System

Information on how to use Fortran in Unix.

Here is some basic information about running a Fortran job in Unix.

Logging In

Unix has a Fortran complier, F90.

  1. Log in to your Unix account using your labs id and password.
  2. Click Enter for the terminal type. Leave the field blank. Do not type anything in.

Basic Unix and Fortran Information

To list your files (and the directory command):ls
The Editor you want to use:pico
To start typing your program: pico filename.F90
To exit the editor:Ctrl X
To save:Ctrl Y
To look at the file you have typed:Cat filename
To compile the file:F90 -o newname filename.F90
Then press Enter
To execute:./newname
To print:./newname > newname.out
Then press Enter
To email (this will email to file and the executed file):Cat filename.F90 newname.out | mail email.address

Remember to space over to the seventh column to type your program.

  • Columns 1 - 5 are for line numbers.
  • Column 6: any symbol in this column will be read as a continuation of the line above it.

Words or symbols between the quotes (" ") will print as they are typed in the final program.

For More Help

If you need more assistance, please feel free to ask the CIS Support Staff in any Open Access Lab, or call Help Desk Central at (979) 845-8300. 

Search box