Basic HTML version of Foils prepared 26 September 1996

Foil 20 Fortran90 Arrays and Memory Allocation

From HPCC Software Technologies Fall 96 -- Overview and HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 26 September 96. by Geoffrey C. Fox


ALLOCATABLE Arrays can be defined at runtime with variable sizing
  • REAL, ALLOCATABLE :: u(:,:) , f(:,:)
  • ALLOCATE ( u(0:nx,0:ny) , f(1:27,0:ny) )
One can define POINTER and TARGET attributes which can be used like REAL, DIMENSION etc.
  • => operator allows one to set a POINTER to "point to" a TARGET
Arguments of a subroutine need NOT define array dimensions in subroutine as these as passed by calling program in data descriptor
Local arrays are created on stack and bounds maybe non constant and evaluated at procedure entry



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Feb 22 1998