There is a bug in Compaq Fortran 90 on Linux. Use the following module in your Fortran 90 programs. It should fix the unalligned access problem.fort -fast -o test test.f90
module signals_fix public :: fix_signals contains subroutine fix_signals() integer :: signal, ret integer :: i do i = 1,17 ret = signal ( i, 0, 0 ) enddo end subroutine fix_signals end module signals_fix program foo use signals_fix call fix_signals() ! rest of program goes here. end program foo
Suppose that the name of your program is foo.f90. (Note the f90 extension.) Your program can be compiled by typing
If there are no errors, type foo to run the program.f90 -n32 -o foo foo.f90
Alternatively, you can run your program using the Fortran 90 compiler with the F extension by typing
If you have reduced your errors to a few, name your file foo.F, and compile your program by giving the command:f90 -n32 -freeform -o foo foo.F
The errors are in F.err.F -o foo foo.F
To compile a module only, for example common_module.F, type
You can edit your files with an editor such as emacs. A summary of some of the basic commands is available.F -c common_module.F
After you are have tested your program and removed all syntax errors, run your program with the Fortran 90 compiler. To optimize the compilation of your program, type
f90 -n32 -O2 -o foo foo.f90
Type the command name in the window and press Enter. (This use of Enter is a feature of MPW.)F foo.F F foo.mod foo.F find 100
The version of F on the Macintosh has a few bugs, but they are only a nuisance. If you input data from the keyboard, type enter instead of return. (The correct way should be return.)
Versions of F also are available for Linix (no cost), Unix workstations, and Windows 95. Information is also available at the Fortran store. A simple introduction to F with sample programs is available.
Please send comments and corrections to Harvey Gould, hgould@clarku.edu.
Updated 13 December 2001.