
0.) Note
--------
This benchmark was adapted by PGI from the Genesis benchmark suite.
The original author information is as follows:

   ==================================================================
   ===                                                            ===
   ===           GENESIS Distributed Memory Benchmarks            ===
   ===                                                            ===
   ===                           PDE1                             ===
   ===                                                            ===
   ===   3-Dimensional Poisson Solver Using Red-Black Relaxation  ===
   ===                                                            ===
   ===               Versions:  Std F77, PARMACS, Subset HPF      ===
   ===                                                            ===
   ===     Original authors:        J. Klose, M. Lemke            ===
   ===     SOR version by:          Ivan Wolton                   ===
   ===     PARMACS macros  :        Clemens-August Thole          ===
   ===              PALLAS GmbH                                   ===
   ===              Hermulheimer Str. 10                          ===
   ===              5040 Bruhl, GERMANY                           ===
   ===     tel.:+49-2232-18960   e-mail:karls@pallas-gmbh.de      ===
   ===     Subset HPF      :        Vladimir Getov                ===
   ===                                                            ===
   ===          Last update: April 1994; Release: 2.3             ===
   ===                                                            ===
   ==================================================================


1. Description
--------------
The benchmark solves the Poisson-Equation on a 3-dimensional
grid by parallel red-black succesive over relaxation with Chebyshev
acceleration.

Many problems in the area of scientific computing are formulated in
terms of partial differential equations. Typical application areas are
Computational Fluid Dynamics, Meteorology, Climate Research, Oil
Reservoir simulation and others. The resulting PDEs are discretized
on some grid structure. The PDE is then represented by a large set of
(non)linear equations, each of which couples values at neighbouring grid
point with each other. For time-dependent problems, this set of
equations has to be determined (integration phase) and solved (solution
phase) at each time step.

This benchmark is an extreme example of the class of PDE solvers, as
due to the simplicity of the discretization of Poisson's equation the
number of floating point operations per gridpoint is quite small relative
to more complex PDEs. The ratio of computation to communication is
thus rather low.

The parallelization is performed by grid splitting. A part of the
computational grid is assigned to each processor. After each
computational step, values at the boundary of the subgrids are exchanged
with nearest neighbours.

2) Operating Instructions
-------------------------
The value of MMAX can be changed by editing the PARAMETER statement
in the file pde1.inc. The maximum value of MMAX which is consistent with 
the available processor memory should be chosen.
The memory required for array  storage is approximately
{ 2 * (2**MMAX + 2)**3 } * 8 bytes, which gives the following table:

	MMAX		Approx Memory required (Mbyte)
	  5			  0.6 
	  6			  4.6
	  7			 35.
	  8			274.

For the largest problem size the relative sizes of the grid in each
dimension is varied whilst keeping the overall problem size constant. 
This variation in the shape of the grid for the same problem size 
can increase performance by allowing more efficient vectorization.

To achieve a given accuracy in the timing measurements the number of
relaxations timed by the benchmark is specified by the input
parameter NITER. This should be chosen so that the benchmarked time
for NITER cycles on the smallest problem size is at least 100 times the
clock resolution .  (If the clock resolution is unknown this can be
determined using the TICK1 benchmark). For larger problem sizes, the
value of NITER is automatically reduced (subject to a minumum value of 5)
to maintain the overall benchmarked time constant for each problem size.

3) Compiling and Running
------------------------
This directory contains an HPF version of the PDE1 benchmark which 
can be compiled and run on the Intel Paragon, Meiko CS-2, 
SGI POWER CHALLENGE, or Solaris SPARC platforms using PGI's pghpf 
High Performance Fortran compiler.  It assumes the necessary object 
files for timing on a specific platform have been retrieved and 
installed as outlined in the README file in pub/HPF/examples at 
the ftp site ftp.pgroup.com.

Platform-specific dependencies are contained in the "run" csh
script file.  The following options are available to the
"run" script:

    -sgi      Use appropriate options to run on SGI systems
    -sun      Use appropriate options to run on Sun Systems
    -pgn      Use appropriate options to run on an Intel Paragon
    -cs2      Use appropriate options to run on a Meiko CS-2
    -np #     Run on # processors
    -size N   Run the NxN problem, N can be 64, 256, 512 or 1024
    -check    Check results
    -serial   Run a serial version using pghpf as an f90 compiler

For example, to build and run this test on an SGI system, simply
type:

     % run -sgi -check

For Solaris SPARC substitute "-sun", etc.  This will compile and
run the 64**3 PDE1 benchmark through 40 iterations and check results 
against known correct answers contained in the file 
./result.ref/result.out.  This benchmark is rather sensitive to
the number of processors on which the problem is run, so precision
errors are common.

To use compile-time options other than the defaults provided, just
list them explicitly on the "run" command line.  I.e.

     % run -sgi -check -O1

will compile and run the benchmark on an SGI system using opt level
1 rather than the provided default.

If you wish to get the best timings possible, drop the -check option.
By default, the executable will run on only 1 processor.  To run on
(for example) 4 processors without checking answers, simply invoke
the run script with the option "-np 4".

    % run -sgi -np 4

If you have the PGHPF_STAT environment variable set as outlined in the 
"pghpf User's Guide", you will see cpu time and wall time statistics 
printed upon completion of the program run.  Note that if you specify 
more processors than are physically available you will see a significant 
performance degradation.  If you are running on a shared-memory system, 
you probably want to use the -heapz runtime option as well.  This is 
the default on SGI and Solaris SPARC platforms using the run script.  
It must be included explicitly if you wish to use the makefile directly 
and bypass the run script.  Documentation on how to use the makefile 
directly is contained in the makefile itself.  See the "pghpf User's
Guide" for more information on -heapz and other runtime options and 
environment variables.

The benchmark can be run on 32**3, 64**3 or 128**3 problem sizes.  To 
run the 128**3 problem, simply invoke the run script with the option
"-size 128".
 
    % run -sgi -np 4 -size 128
 
Precomputed answers are supplied only for the 64**3 case.  It follows
that -check can be specified only if "-size 64" (or no size) is specified.
 
It should be easy to add the capability to compile and run on additional
platforms by making the obvious changes to the "run" csh script or by
modifying the makefile directly.

4) Suggested Problem Sizes
--------------------------
It is recommended that the benchmark is run with four standard problem
sizes, given by NN  = 6, 7, 8 and 9. 

The optimum SOR relaxation parameter for each problem size is calculated
within the program. The rate of convergence of the solution is
theoretically dependent only on the problem size, after a certain
number of iterations. The radius of convergence is printed in
the results file and can be used to check correct operation of the code.
A little more verification is needed on this feature but details
should be available shortly. Contact the benchmark distributor for
more information on this.

Note that it may not be possible to run the largest problem size on all
machines because of restrictions on the available memory.
The approximate total memory required for array storage is given by the 
following table:

 NN	Approx value of (2**NN+4)**3	Approx Memory required (Mbyte)
  6		  .32 * 10**6			   8
  7		  2.3 * 10**6			  56
  8		   18 * 10**6			 430
  9		  138 * 10**6			3300

To find the minimum node memory required to run each problem size, the total 
memory required should be divided by the number of processors on which the 
benchmark is run. 

The number of processors to be used will obviously depend on the
system available. The most important measurement is likely to be for
the largest power of two that will fit in to the machine. If time
permits the variation of performance with number of processors should be
investigated by reducing the number of processors by successive
factors of two or four.
