
######################################################################

mpi-serial

   Ray Loy (rloy@mcs.anl.gov)

######################################################################


This library provides a one-processor version of MPI.  Most common MPI
calls, including all that are necessary for MCT, are supported.  This
includes sends and receives (which cannot be simply stubbed out).  See
below for a complete list.


---------------
Configuration
---------------

During the MCT configure, specify the option:

   --enable-mpiserial


This will cause the main MCT 'make' to compile mpi-serial and use it.

IMPORTANT:

By default, it is assumed that Fortran programs linked with mpi-serial
(e.g. MCT) will be using REAL variables of size 4 bytes, and DOUBLE
PRECISION variables of size 8 bytes.  If this is not the case
(e.g. due to hardware sizes or Fortran compiler options), you must
specify a value for FORT_SIZE, e.g.:

   --enable-mpiserial FORT_SIZE=real8double8


The built-in choices for FORT_SIZE are:

   real4double8       (default)
   real8double8       (use when only REALs are auto-promoted)
   real8double16      (use when REALs and DOUBLEs are auto-promoted)


How to configure for other Fortran data sizes:
----------------------------------------------

The setting for FORT_SIZE is actually just a name used to choose a
pre-made mpif.h file, mpif.$(FORT_SIZE).h, whose contents set the
sizes of Fortran data types.  If you need a different set of sizes,
you can copy one of these files and edit it to reflect the desired
sizes.  E.g. Copy mpif.real4double8.h to mpif.mysize.h and edit these
lines:

        PARAMETER (MPI_REAL=4)                 ! 4 is number of bytes
        
        PARAMETER (MPI_DOUBLE_PRECISION=8)     ! 8 is number of bytes

then configure MCT using:

   --enable-mpiserial FORT_SIZE=mysize



At runtime (within MPI_Init), there is a consistancy check of Fortran
data type sizes.  If any sizes conflict with the config, there will be
an error message.


Advanced: The sizes of other types can be set in the same manner.
However, note that the size of a Fortran "INTEGER" must be the same as
C type specified for MPI_Status_int in mpi.h.  Consult the author for
further advice.



--------------------------------
Manual make targets
--------------------------------

Note: Normally this is handled by the main MCT 'make'.
      See "Configuration" above.


'make'  - compile the mpi-serial library

'make examples'  - compile mpi-serial and its example programs

'make clean'  - get rid of all objects and executables



----------------------------------
List of MPI calls supported
----------------------------------

    general ops
      mpi_init
      mpi_finalize
      mpi_abort
      mpi_error_string
      mpi_initialized

    comm and group ops
      mpi_comm_free
      mpi_comm_size
      mpi_comm_rank
      mpi_comm_dup
      mpi_comm_create
      mpi_comm_split
      mpi_comm_group
      mpi_group_incl
      mpi_group_free

    send/receive ops
      mpi_irecv
      mpi_recv
      mpi_test
      mpi_wait
      mpi_waitany
      mpi_waitall
      mpi_isend
      mpi_send

    collective operations
      mpi_barrier
      mpi_bcast
      mpi_gather
      mpi_gatherv
      mpi_allgather
      mpi_scatterv
      mpi_reduce
      mpi_allreduce



-----
EOF
