/****Copyright (c) 2002  Alexandros V. Gerbessiotis. 
 **** All rights reserved.                               
 ****Permission to use, copy, modify, and distribute this software,
 ****and to incorporate it, in whole or in part, into 
 ****other software,is hereby granted without fee, provided that
 ****  (1) the above copyright notice and this permission 
 ****      notice appear in all copies of the source code, and 
 ****      the above copyright notice appear in clearly visible 
 ****      form on all supporting documentation and distribution 
 ****      media, and
 ****     (2) any redistribution of the software, in original
 ****         or modified form, be without fee and subject to
 ****         these same conditions.
 ****   No guarantee, whatsoever, is offered that the code works as
 ****   advertised or is absent of any, even damaging,
 ****   side-effects. Use this code at your own personal risk.
 ****/
0. These are general instructions.

A. How to Compile.
 1. Edit ai.h and decide whether you plan to use LAM-MPI or BSPlib
    Then comment/uncomment the #ifdef #undef definitions for
    the two libraries
 2. Edit Makefile
    a. Make sure BT=efdm, gbt, or bt depending on the executable you
       wish to produce
    b. Set EXT  EXT=1 (default) or EXT=100 (this option 
       applies to BSPlib only)  
       You can ignore this step if you like (default is EXT=1)
    c. Comment out a ccp line in bspfin:  or mpifin.
       ccp is a script that i use to copy the executable 
       ${BT}${EXT}
       to the cluster machines.
 3. Compile by typing
    % make bspfin    # BSPlib
    or
    % make mpifin    # LAM-MPI

 4. run as follows
   % bsprun -noload -local -npes 16 BSPEXECUTABLE 512 32768 <DATAFILE
     512  :  Block size b
     32768:  Horizon size N (By default N=Nj)
     DATAFILE: data file for parameters; Syntax can be found
             in Seq/DATAFILE.rdm Name can be bdata gdata tdata
             efdata
             Three things to note.
             1. Parameter  N is set in the command line;
                the one in DATAFILE is overidden.
             2. Parameter  Nj is set in efdmmain.c Nj=N;
                the one in DATAFILE is overidden.
             3. Parameter  dx  if needed is set in *main.c; 
                the one in DATAFILE is overidden.
             
    or
   % mpirun -np 16 MPIEXECUTABLE 512 32768 <DATAFILE

   Step 4 assumes you have already established a cluster or you
   have access to a parallel system with BSPlib or LAM-MPI 
   installed.

   BSPEXECUTABLE is a bsp file such as bspgbt1 bspbt1 etc
   MPIEXECUTABLE is a LAM-MPI file such as mpigbt mpibt
   DATAFILE is a data file like data, mdata , gdata, efdata etc.

B. Sequential Code

   1. Directory Seq contain sequentail code for option
      price valuations with the explicit finite difference emthod.
   2. Go to Seq
   3. Type
      % make PREFall
      to compile
   4. Read PREFdata.rdm for execution instructions etc and
      syntax of PREFdata file.
      PREF is one of m, t, g, ef
