This directory contains both scripts and files used to generate a Fortran 90
Module (actually, two modules)

The Modules are organized as follows.  This follows the scheme that is used by
Michael Hennecke.  
!       Michael Hennecke
!       A Fortran 90 interface to MPI version 1.1
!       RZ Uni Karlsruhe, Internal Report 63/96
!
!         Main module MPI -- IBM AIX POE version
!
!         Preprocess by "cpp -P -DMPI__DEBUG" to include generic interfaces
!         for <choice> arguments, use "cpp -P -UMPI__DEBUG" for speed.
!
!         03-Oct-1996, hennecke@rz.uni-karlsruhe.de (v0.9c beta)
!
!       Permission is granted to copy and distribute this file
!       or modified versions of this file for no fee, provided the 
!       copyright notice and this permission notice are preserved 
!       on all copies.
!
!       (C) 1996  Michael Hennecke, RZ Universitaet Karlsruhe

However, I have not used Hennecke's code; rather, I have generated the
module source files directly from the source files for the MPI standard.
In addition, these files implement MPI-2.

Module:
     mpi_constants : contains mpif.h
     mpi_<type>_s,v,vs,sv,v2: contains interfaces for particular kinds of
                              choice parameters
     mpi1:           contains mpi1 functions
     mpi2:           contains mpi2 functions
     mpi:            contains everything

The file "exclude" indicates which routines should *not* be included.  This 
is necessary because at least one Fortran 90 system (SGI/IRIX) requires that
there be implementations for any routine used in a generic interface!

The "exclude" file contains those routines that are not currently supported by
MPICH.

These modules have two basic types of construction:

non-choice:
     module name
     interface
      declarations
     end interface
     end module name 

choice:
     module name
     private
     public :: routine
     interface routine
         module procedure routine_T
     end interface ! routine
     ...
     contains
     subroutine routine_T
	decl for routine
        external routine
        call routine( args )
     end subroutine routine_T
     ...
     
     end module name

The path to construct these is:

    ExtractRawBindings - Reads the standard documents and extracts the 
                         definitions into raw bindings, one line per routine
			 Produces 4 files, mpi1f.h, mpi1fv.h, mpi2f.h,
                         mpi2fv.h, containing the raw bindings

    CreateModuleSrc    - First creates raw bindings in vector, scalar, and
                         combinations (2 choice args, vector/scalar and
                         scalar/vector), followed by createing
                         mpi1__type_xx and mpi2__type_xx files
    BindingToModSrc    - Reads the output of ExtractRawBindings and generates
		         a Fortran 90 routine declaration
    BindingToChoice    - Reads the output of ExtractRawBindings and generates
			 the "public" header part
    CreateChoiceSrc    - Creates the mpi1__<type>_xx and mpi2__<type>_xx
                         files (where <type> is one of the available types)

KNOWN PROBLEMS

The Solaris f90 can't seem to handle a large module file.  It will complain
about conflicting specific instances of modules that are generic; deleting a
module *that does not contain that function* will cause the error to go away
(or change!).  The only fix seems to be to reduce the number of modules by
removing the less-used variations (e.g., logical2).

A complete binding for arrays requires a *separate* version for each number of
dimensions.  We've limited it to two dimensions for now.

Fortran 95 has deprecated character*(x), so we need to check for support for
character (len=x) and use that form instead.
