Introduction
------------

This directory contains a wrapper library for MPI that will accommodate
Fortran codes that use either all 4- or all 8-byte integers and 8-byte
reals.   While the wrappers can be compiled to handle either 4- or
8-byte integers, they may not be mixed:  every integer in all calls
must be either 4 or 8 bytes long.


Usage
-----

1. Change directory to the "default64" directory.  This should be a
   subdirectory wherever the message-passing-helpers package was installed
   (/usr/freeware/share by default).

2. Check to make sure all necessary files have been included with your
   distribution.  The files of main importance are:
	- Makefile
	- wrapper.c
	- this README file
   A sample test program has been provided as well:
	- hello.f

   Also be sure to read the COPYING file for licensing information.

3. Copy the files to a location for which you have write permission.
   For example,
	irix % mkdir /tmp/default64-test
	irix % cp wrapper.c Makefile README hello.f /tmp/default64-test
	irix % cd /tmp/default64-test

4. Build wrapper.o (the wrapper library) and run sample test
   programs by typing:
	irix % make
   From the sample 'make' output shown below, you should be able to
   see how the wrapper is compiled, loaded and used with Fortran programs:
	irix % make
	  cc  -c -64 -DABI64 -DSIZES_I8_R8 wrapper.c
	  f90 -64 -i8 -r8 -d16 hello.f wrapper.o -lmpi -o hello
	  mpirun -np 2 ./hello
	My rank is 0
	My rank is 1

   Note:  To change the sizes of either the INTEGER or REAL data,
   edit the Makefile.  For example, to create a wrapper library
   that supports 4-byte INTEGERs and 8-byte REALs, modify the 'SIZES'
   and 'sizes_opt' variables in the Makefile as follows:

	# Define sizes for integer & real data...
	# ---------------------------------------
	# 8-byte INTEGER, 8-byte REAL data:
	# SIZES=                SIZES_I8_R8
	# sizes_opt=    -i8 -r8 -d16
        #
	# 4-byte INTEGER, 8-byte REAL data:
	SIZES=          SIZES_I4_R8
	sizes_opt=      -i4 -r8 -d16

   To demonstrate,
	irix % make clean
	irix % make
        irix % cc  -c -64 -DABI64 -DSIZES_I4_R8 wrapper.c
        irix % f90 -64 -i4 -r8 -d16 hello.f wrapper.o -lmpi -o hello
        irix % mpirun -np 2 ./hello
	My rank is 0
	My rank is 1


   Similarly, to change the ABI (which dictates the size of
   pointers), you would also edit the Makefile.  For example, to
   create a wrapper library that supports n32-style pointers, modify
   the 'ABI' and 'abi_opt' variables in the Makefile as follows:

	# Define the ABI...
	# -----------------
	# 64-bit pointers:
	# ABI=            ABI64
	# abi_opt=        -64
        #
	# 32-bit pointers:
	ABI=           ABI32
	abi_opt=       -n32

   To demonstrate,
	irix % make clean
	irix % make
        irix % cc  -c -n32 -DABI32 -DSIZES_I4_R8 wrapper.c
        irix % f90 -n32 -i4 -r8 -d16 hello.f wrapper.o -lmpi -o hello
        irix % mpirun -np 2 ./hello
	My rank is 0
	My rank is 1


Feedback
--------

Please send feedback on any of the following issues with the current code:
        o Accuracy
        o Completeness
        o Readability
