           Installation Notes for NTCC module ESC

Prepared by C.Ludescher cludesche@pppl.gov  10/18/2000

================
REVISION HISTORY
================
      date         Description

  Oct 15, 2000  -- Created 

------------------------------------------------------------------------------

To compile this code, you'll need
    a C compiler
    GNU make

To compile the test programs, you'll also need
    a Fortran 90 compiler. On Intel/Linux, You can select the the 
    Fortran compiler using the FORTRAN_VARIANT environment variable.
    For instance:

    export FORTRAN_VARIANT="Portland"

    Check the share/Make.flags file for a list of supported compilers.


==========================
1. UNPACKING INSTRUCTIONS
==========================
Unpack the tar file with
    gunzip esc.tar.gz
    tar xvf esc.tar
  or
    unzip esc.zip

============
2. CONTENTS
============
The package should include the following files:

   README_esc        --  description of ESC
   INSTALL_esc       --  this file
   Makefile          -- NOTE, "GNU make" must be used
                        (usually in /usr/gnu/bin or /usr/local/bin).
	                Main Makefile to envoke Makefile(s) in subdirectories.
-- in subdirectory share:
   Make.flags        -- Include file for Makefile, to setup Flags, etc.

in sub directory esc:
   README            --  copy of README_esc
   INSTALL           --  copy of INSTALL_esc
   Makefile          --  Makefile to build esc library and tests
   *.c               --  source for esc library
   *.f90             --  test programs
   *.mtv_ref         --  reference output
   *.3               --  man pages

================
3. DESTINATIONS:
================
Or where do the files go?
(this refers to building and testing; see FINAL INSTALLATION for end result) 


When you extract the tar file you get sub directories:
./esc             --  sources and Makefile
./share           --  include file Make.flags, Make.local.sample

The makefile will create more sub directories,

lib:      for the library, libxplasma.a
obj/esc:  for compiled objects and pre-processed sources
test:     for the test programs and the sample output files.

By default these directories are created in  
./<MACHINE>, which is determined by Make.flags.
e.g.: if you are running Linux, and the tar file resides in $HOME/foo,
      the directories would be in
      $HOME/foo/LINUX/...

You can overwrite the destination by defining OBJ, as an environment
variable (e.g. export OBJ=/dir1/dir2),
or with make (e.g. "make all OBJ=.").
If OBJ is defined, the destinations will be
$OBJ/lib and $OBJ/test.
If OBJ is defined as "." then, in the example above, the destination
would be $HOME/foo/lib.

The rationale behind <MACHINE> is to facilitate building for various platforms.

Note: If you define OBJ as option to gmake, you have to consistently do so;
      e.g: gmake clean OBJ=., gmake install OBJ=.


=========================
4. BUILDING INSTRUCTIONS
=========================

> gmake            -- to compile library and link all test programs

> gmake checklibs  -- tells you what the makefile will do
                      (without any action);
                      it sais which libraries it will make and
                      which ones it already found and where.
                      It also tells you how to rebuild an existing library.
> gmake clean      -- to remove objects
> gmake realclean  -- to remove objects and library


=============
5. TESTING
=============
directory $OBJ/test  -or-  <MACHINE>/test  will contain:

esc           :  Test driver
mesh.mtv_ref  :  Output reference
prof.mtv_ref  :    "       "

To run test:
-----------
   cd <MACHINE>/test
   ./esc

This produces mesh.mtv and prof.mtv.
Compare the output with the reference files mesh.mtv_ref and prof.mtv_ref.

================
6. INSTALLATION
================
Install the library and man pages with

    gmake install

This installs libesc.a in $PREFIX/lib and the man pages
get_c.3 and  Esc2Any_c.3 in $PREFIX/man/man3.
By default PREFIX=/usr/ntcc.

If you want things elsewhere, you can overwrite the default with
> gmake install LIBDIR=/xxx MANDIR=/yyy



----------------------------------------------------------------------------

For Documentation see:

ESC Home Page:
    http://w3.pppl.gov/NTCC/ESC

NTCC Home Page:
    http://w3.pppl.gov/NTCC


IF YOU HAVE ANY PROBLEMS, PLEASE CONTACT EITHER:

        Alex Pletzer, Princeton University
                pletzer@pppl.gov
        or
        Christiane Ludescher, Princeton University
                cludescher@pppl.gov
        or      
                ntcc_webmaster@pppl.gov










