Using Fortran in MAPL/CMSC 460

Getting accounts

You need to get GLUE Account, or a WAM Account. You also need to get a Printing Account.

Logging in to your account

WAM
direct access
WAM Sun workstations are located in the labs in CSS 4352, EPSL library (room 2403), Parking Garage 2 (room 504), Worcester Hall (room 0111).
remote access
From any machine on campus or from at home you can use telnet or rlogin and connect to wam.umd.edu (this is slow as many people use these machines)
GLUE
direct access
GLUE workstations are located in the labs in AVW 1120 (Sun), AVW 1442 (Sun), AVW 1454 (DEC 3000 Alpha, DEC 5000 non-Alpha), EGR 0311 (Sun, DEC Alpha).
remote access
From any machine on campus or from at home you can use telnet or rlogin and connect to either engr.dialup.umd.edu (Sun machines) or engr-alpha.dialup.umd.edu (DEC Alpha machines)

Typing in your program

Use an editor like pico, vi, or emacs to type in and save your program. Save a Fortran 77 program under a name ending with ``.f'', save a Fortran 90 program under a name ending with ``.f90''.

Compiling your program

Fortran 77 program
type ``f77 program.f''
Fortran 77 program using subroutines from the textbook
First type ``tap math460'' (you only have to do this once). To compile type ``f77 program.f -L$M460 -lm460''. The Fortran code of the routines is in the directory /:/software/math460/src, example programs using the routines can be found in the directory /:/software/math460/examples
Fortran 90 program (only on GLUE DEC Alpha machines)
type ``f90 program.f90''
Fortran 90 program using subroutines from the textbook (original or Fortran 90 versions)
First type ``setenv T ~tvp/public_html/lib'' (you only have to do this once). To compile type ``f90 -I$T program.f90 $T/kmn90.a''.

If you use the Fortran 90 versions of the textbook routines you must insert ``use kmn90'' at the beginning of of your program (right after the program statement, before the implicit none statement).

The directory $T/src contains the file kmn90.f90 which contains and documents the calling interfaces, as well as the wrapper routines. The directory $T/examples contains example programs.

To use the latest version of the f90 compiler (which includes Fortran 95 features and fixes several bugs)
In the .aliases file in your home directory add the line
alias f90n f90_410 -L/usr/lib/cmplrs/fortrtl_374
and use ``f90n'' instead of ``f90'' the next time you log in.

Running your program

Type ``a.out''

Producing graphs from your program output

Write your program output to a file. Then use gnuplot to produce a postscript file from the data in the file. Then print out the postscript file. See the Gnuplot introduction and examples.
Tobias von Petersdorff , tvp@math.umd.edu
Last modified: Wed Apr 2 14:25:36 EST 1997