History for Compiling Fortran
changed:
-
Some notes on compiling a Fortran program for OpenMP under AIX.
**OpenMP** **library** **access**
The easiest way to make the OpenMP library declarations available to a subroutine or function is to place the following line at the start of the subroutine::
use omp_lib
Alternatively, if the subroutines are all contained within a module then this line is needed just once in main body of the module.
**Compile/build** **command**
The following command builds an OpenMP executable called 'fubar' from two source files 'fu.f90' and 'bar.f90' ::
xlf90_r -q64 -qsmp=omp -qsuffix=f=f90 fu.f90 bar.f90 -o fubar
The option '-q64' is to enable 64-bit mode, required if your program exceeds the memory limit in 32-bit mode.
The option '-qsuffix=f=f90' tells the compiler to accept files with the .f90 extension.