This directory contains the utility routines for the PRISM codes.  The
code has been converted to MPI.  See the README file one directory up
for information on the standard way to compile this code.

All files have the following notice:
----------------------------------------------------------------------
   COPYRIGHT U.S. GOVERNMENT 
   
   This software is distributed without charge and comes with
   no warranty.

   Please feel free to send questions, comments, and problem reports
   to prism@super.org. 
----------------------------------------------------------------------

The following files are included in this directory:

Make_bimmer: Input for make.

README: This file.

prism_i_datatype_size: Returns the size in bytes of a PRISM datatype.

prism_i_ldim.c: Computes size of matrix on each node given 2D virtual
torus wrap data layout.

prism_i_ldwk.c: Computes size of storage needed on each node given 2D
virtual torus wrap data layout.

prism_m_d_alloc_matrix.c: Mallocs memory needed for double precision
matrices using pointer to pointer access scheme.

prism_v_bc.c: Implements a log time broadcast.  It was used by the
PRISM routines until MPI.  It is used for comparison and backup.

prism_v_copy.c: Copies the input buffer to an output buffer.  It is
used since some systems have a faster routine than doing it with
pointers.  (For example, assembly dcopy from the BLAS.)

prism_v_free_matrix.c:  Frees matrix created by prism_m_d_alloc_matrix.c.

prism_v_generror.c: Outputs error messages and cleans up after an
error occurs.

prism_v_init_var.c: Initializes a number of global variables for later
use.  This routine simply mimics a similar routine that existed before
the MPI conversion.  It is likely to become more sophisticated in the
future.

prism_v_layout.c: Creates data in matrices for testing.

prism_v_prt_m.c:  Prints out matrices, usually for debugging.

prism_v_skew.c: Implements a skew.  It was used by the PRISM routines
until MPI.  A skew is where you have a linear list of nodes and you
shift your data by a specified value up or down the list of nodes.  It
is used for comparison and backup.

prism_x_datatype.c: Accepts a PRISM datatype and returns the MPI datatype.


The routines have a large number of cpp options.  Whenever you change
options you should do a "make cleanobjs; make" to make sure that the new
cpp option(s) are compiled for all routines.  THIS IS NOT AUTOMATIC.
The general CPP options are listed in the directory above.  The CPP
options specific to this directory are:

-DPRISM_BC_READY: If you don't use -DPRISM_MPI_COLL then you get the
PRISM routine.  If you use the PRISM routine you can set this to use
ready type sends in the broadcast.  It switches at run time to a
standard send if the message is too small (defined in routine).  Used
in prism_v_bc.

-DPRISM_SKEW_READY: Does for skew what PRISM_BC_READY does for
broadcast.  Since the amount of data sent by each node can vary, not
all nodes will necessarily do ready sends.  Used by prism_v_skew.

-DPRISM_BLAS_DCOPY: If set, use the BLAS routine dcopy to do copy of
full double precision words.  Otherwise, pointer arithmetic is used.
The BLAS routine is faster on some machines but requires the BLAS.
This is used in prism_v_skew when the skew distance is 0.  Used by
prism_v_copy.
