. . . to Fortran 90 Cray makefile compiler macros
by Juli Rew
The SCD consultants highly recommend that you use makefiles for maintaining complex programs.
If you have been using a makefile under CF77, here are some tips for
converting the compiler macros to CF90 (F90) on the Crays.
F90 compiler flags
There are several compiler macros for Fortran 90 already set up by default.
They are dependent on the filename extension you use.
For example, if your
file is called program.f or program.F, the Crays will assume you have fixed-form program source and that you will want to use:
CF = f90
However, if your program is called program.f90 or program.F90, free-form source is assumed, and the default macro is:
CF90 = f90
We have found that if you use other macros (e.g., CFT = f90 or FC = f90),
the Crays erroneously try to find the CFT77 compiler, which is no longer
available on any Cray except paiute.ucar.edu.
Note: Under UNICOS 10.0 (coming soon), f90 will become the default Fortran compiler macro in make.
For more information
Again, the default macro used by the Crays depends on the source filename
Example 1 is a sample makefile showing typical macros, targets, and flags
for a makefile to be used on the Cray with CF90.
- For files ending in .f or .F, use the FFLAGS macro, for example:
FFLAGS = -O3
- For files ending .f90 or .F90, use the CF90FLAGS macro. For example:
CF90FLAGS = -O3
You can find general instructions for creating makefiles in Chapter 10 of the
NCAR UNICOS Guide, "Maintaining executable programs":
If you have questions about Fortran 90, you can also call the
consultants at 303-497-1278, or send e-mail to email@example.com.