Planguage Field Guide


Planguage Programmers' Field Guide

This page provides a field guide to writing programs with the Planguages. Together with the usage page and the examples there, one can find most that is needed to develop, build and run parallel programs with the Planguage distribution. However, there are many fine points that one will inevitably want to sort out; the documentation set covers these in detail. Please check the usage page for details about the makefile system and examples.


The Source Code and Translation Process

The Planguage make system provides for executing a preprocessor on Pfortran code. The preprocessor directives are those for cpp with a # in column 1. The make system will automatically invoke a preprocessor for files with a .PF extension, for example,
pfsort.PF
The preprocessor produces
pfsort.pf
The pfc translator is invoked on the pf file to generate the Fortran file with a .f extension, for example
pfsort.f
This is compiled by the native compiler selected by the Planguage make system.

Built in Variables

In translating the pf source, the translator will introduce built in variables and scratch storage. The built in variables are
myProc local process logical identifier
nProc number of processes
nProc0 zero-based number of processes, i.e., nProc-1

Note that these variables are automatically declared and defined by the translator and inserted into the .f file. Do not declare or define these built in variables in the .PF and .pf files. These variable are intended to be read only in your code.

Earlier versions of the Planguages used different names for the three builtin variables described above. The following names are not longer used

thisnode replaced by myProc
numnode replaced by nProc

These default names can be changed on the Planguage translator line with the switches

-T name name replaces myProc
-N name name replaces nProc
-N0 name name replaces nProc0

Scratch Space

The tranlators use scratch space for buffering messages in generated message passing code. The default size of this buffer is 100,000 integers. One can increase the size of this buffer with the flag
-scratch number_of_integers

Please see the manuals for more information.

THIS SECTION UNDER DEVELOPMENT



page last updated January 20, 1999