This README covers the installation of Intrelab, the
Intrepid/Matlab interface, along with the installation
of an interface to some Trilinos solvers, through ML.

 1) Get a recent version of Trilinos (10.x or newer).

 2) Get a recent version of Matlab (2010 or newer).
    NOTE:  If you wish to run automated unit testing,
    you will need Matlab R2013a or newer.  The tests
    can be executed individually using an older version,
    however, the unit test harness features won't be
    available.

 3) Build Trilinos with Intrepid and solvers (ML, etc.)
    in shared library mode.

    - for release mode use configure options
      -D CMAKE_BUILD_TYPE:STRING=RELEASE \
      -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
      -D Trilinos_ENABLE_Amesos:BOOL=ON \
      -D Trilinos_ENABLE_AztecOO:BOOL=ON \
      -D Trilinos_ENABLE_Epetra:BOOL=ON \
      -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
      -D Trilinos_ENABLE_Ifpack:BOOL=ON \
      -D Trilinos_ENABLE_ML:BOOL=ON \
      -D Trilinos_ENABLE_Teuchos:BOOL=ON \
      -D Trilinos_ENABLE_Intrepid:BOOL=ON \
      -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
      -D Trilinos_ENABLE_TESTS:BOOL=OFF \
      -D BUILD_SHARED_LIBS:BOOL=ON \
      -D TPL_ENABLE_BinUtils=OFF \
      -D CMAKE_INSTALL_PREFIX:PATH=/YOUR_INSTALL_PATH_HERE \

    - for debug mode use configure options
      -D CMAKE_BUILD_TYPE:STRING=DEBUG \
      -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
      -D Trilinos_ENABLE_Amesos:BOOL=ON \
      -D Trilinos_ENABLE_AztecOO:BOOL=ON \
      -D Trilinos_ENABLE_Epetra:BOOL=ON \
      -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
      -D Trilinos_ENABLE_Ifpack:BOOL=ON \
      -D Trilinos_ENABLE_ML:BOOL=ON \
      -D Trilinos_ENABLE_Teuchos:BOOL=ON \
      -D Trilinos_ENABLE_Intrepid:BOOL=ON \
      -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
      -D Trilinos_ENABLE_TESTS:BOOL=OFF \
      -D BUILD_SHARED_LIBS:BOOL=ON \
      -D TPL_ENABLE_BinUtils=OFF \
      -D CMAKE_INSTALL_PREFIX:PATH=/YOUR_INSTALL_PATH_HERE \

    Also see Trilinos configure scripts contained in
      scripts/cmake.intrepid+ML.shared.release
    and
      scripts/cmake.intrepid+ML.shared.debug

 3) Copy the Makefile in scripts/ to the directory above (intrelab).
    Modify the Makefile according to the instructions contained in it.

 4) Run

    make -j12 install

 5) Copy the Matlab startup script scripts/Ridzal_run_matlab2013.sh to
    the directory above (intrelab).  Call it my_run_matlab.sh and make
    sure that you have execution privileges (chmod u+x).  Modify it to
    suit your needs.

    REQUIRED:
    Point the variable MATLABPATH to the Intrelab installation path
    that you defined in the Makefile, as well as the intrelab/mesh
    directory.  Examples are in scripts/Ridzal_run_matlab2013.sh.

    REQUIRED:
    Point the variable BLAS_VERSION to the BLAS library used to build
    Trilinos (Intrepid/ML).

    OPTIONAL/AS NEEDED/NOTES:
    The modifications will depend on your platform, your version
    of Matlab, etc.  Some trial and error may be needed.  The main goal is to
    make Matlab aware of the library paths and the versions of BLAS (or LAPACK)
    used by Trilinos.  If Matlab's default BLAS and LAPACK (MKL) are mixed with
    the versions used by Trilinos, there could be problems.  Alternatively, you
    can try compiling Trilinos with Matlab's BLAS and LAPACK libraries.  Other
    libraries may need to be pointed to, such as libgfortran, libgcc_s, etc.,
    but newer versions of Matlab may not require them.  It is best to start
    with paths to BLAS (and possibly LAPACK), and let Matlab tell you which
    libraries are missing, if any.

 6) Start Matlab using the script my_run_matlab.sh.

 7) If you have Matlab R2013a or later, cd to the test/ directory and type
  
    >> runtests(pwd, 'Recursive', true)

    Skip steps 8, 9, and 10.

 8) If your Matlab is older than R2013a, to test the install of Intrelab
    discretizations, cd to the test/basic directory and run the Matlab function
    m2i_test (check output).

 9) If your Matlab is older than R2013a, for the testing of Intrepid and ML
    solver capabilities, cd to the test/basic directory and run the Matlab
    function m2ml_test (check output).

10) If your Matlab is older than R2013a, cd to the test/poisson_fem directory
    and run the Matlab function test_conv.  Also, run the driver script.

11) Feel free to contact Denis Ridzal (dridzal@sandia.gov) for help with
    any of the above.
