HTML version of Scripted Foils prepared 27 December 1996

Foil 6 Fortran90 Arrays and Memory Allocation

From CPS615-Introduction to F90 Features, Rationale for HPF and Problem Architecture Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 September 96. by Geoffrey C. Fox *
Secs 128.1
1 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) )
2 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
3 Arguments of a subroutine need NOT define array dimensions in subroutine as these as passed by calling program in data descriptor
4 Local arrays are created on stack and bounds maybe non constant and evaluated at procedure entry

Table Font Size


© 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 Fri Aug 15 1997