CM FORTRAN PROGRAMMING GUIDE Version 2.1, January 1994 Copyright (c) 1994 Thinking Machines Corporation. About This Manual Objective This manual introduces the array-processing features of CM Fortran in a task-oriented way. It is a companion volume to the CM Fortran Language Reference Manual. Intended Audience This manual is intended for new users of CM Fortran. It focuses on the semantics of the language, with occasional notes on performance implica-tions and on using the CM Fortran libraries. More advanced users should consult the CM-5 CM Fortran Performance Guide and the CM Fortran Libraries Reference Manual for further information. See the CM User's Guide for CM-5 or CM-2 for an overall introduction to using CM software. Revision Information This manual supersedes the CM Fortran Programming Guide, Version 1.0, January 1991. Organization of This Manual Part I Getting Started (Chapters 1-3) A gentle introduction to CM Fortran array operations and to the programming models--global data parallel and local message passing--that are available on CM systems. Part II Programming in CM Fortran (Chapters 4-11) The major array-processing features that CM Fortran adds to Fortran 77, plus some very simple programs that illustrate their use. Part III Advanced Topics (Chapters 12-13) Two techniques for exploiting locality in CM systems: using directives to control data distribution in parallel memory, and using global/local programming to drop control to the individual nodes as needed. More About Part III For ease of programming in CM Fortran, the CM run-time system handles the two main tasks of parallelism transparently: it lays out CM array data in parallel memory and it coordinates and synchronizes the parallel processors. Advanced programmers might wish to take some control over either or both activities. This part describes the CM Fortran features you can use to control array layout and, on CM-5 systems with vector units, run copies of a CM Fortran or C subprogram asynchronously on the nodes. See the CM-5 CM Fortran Performance Guide for additional information on the performance considerations in using these features. Related Documents o Getting Started in CM Fortran. Introduces the CM Fortran language. It is a condensed version of this programming guide. o CM Fortran Language Reference Manual. Defines the CM Fortran language, specifying the complete syntax and semantics of every feature and compiler directive. o CM Fortran User's Guide. Describes the CM Fortran compiler command and switches, various program development tools, and some details of the implementation. o CM Fortran Libraries Reference Manual. Describes the CM Fortran utility library, the global/local library, and library cmf77, a set of interfaces to SunOS system calls. o The CM librariesscientific software, message passing, visualization, and low-level parallel I/Oare described in separate volumes. o CM-5 CM Fortran Performance Guide. Provides information for getting best performance from CM Fortran programs on the CM-5 (with emphasis on the global data parallel models). o CM Fortran Array Operations Quick Reference Guide. Lists the syntax for all array-processing features. o CM Fortran Release Notes. Summarizes the new features in the current release, describes any pitfalls in porting programs from previous releases, and lists current restrictions on using the software. ***************************************************************** The information in this document is subject to change without notice and should not be construed as a commitment by Think- ing Machines Corporation. Thinking Machines reserves the right to make changes to any product described herein. Although the information in this document has been reviewed and is believed to be reliable, Thinking Machines Corporation assumes no liability for errors in this document. Thinking Machines does not assume any liability arising from the application or use of any information or product described herein. ***************************************************************** Connection Machine (r) is a registered trademark of Thinking Machines Corporation. CM, CM-2, CM-200, CM-5, CM-5 Scale 3, and DataVault are trademarks of Thinking Machines Corporation. CMOST, CMAX, and Prism are trademarks of Thinking Machines Corporation. C* (r) is a registered trademark of Thinking Machines Corporation. Paris, *Lisp, and CM Fortran are trademarks of Thinking Machines Corporation. CMMD, CMSSL, and CMX11 are trademarks of Thinking Machines Corporation. CMview is a trademark of Thinking Machines Corporation. Scalable Computing (SC) is a trademark of Thinking Machines Corporation. Scalable Disk Array (SDA) is a trademark of Thinking Machines Corporation. Thinking Machines (r) is a registered trademark of Thinking Machines Corporation. SPARC and SPARCstation are trademarks of SPARC International, Inc. Sun, Sun-4, SunOS, Sun FORTRAN, and Sun Workstation are trademarks of Sun Microsystems, Inc. UNIX is a trademark of UNIX System Laboratories, Inc. The X Window System is a trademark of the Massachusetts Institute of Technology. Copyright (c) 1989-1994 by Thinking Machines Corporation. All rights reserved. This file contains documentation produced by Thinking Machines Corporation. Unauthorized duplication of this documentation is prohibited. Thinking Machines Corporation 245 First Street Cambridge, Massachusetts 02142-1264 (617) 234-1000