Installation on RedHat

From Flooxs
Jump to navigation Jump to search

FLOODS/FLOOPS Installation

Floops and Floods have been ported successfully to a number of different platforms (IBM RS6000, Dec Alpha, HP UX, Pentium Linux, Mac OSX). It was developed on SUN sparcstations, and we do most of our current development on Linux and Mac OSX. It should be possible to post to any of these platforms.

Release Directory Structure

The release 02 directory is now subdivided a little more cleanly than past releases. There are now several directories with different purposes.

Params
This contains the Parameter Data Base hierarchy.
TclLib
This contains libraries of tcl code that implement various supporting functions for data analysis, plotting, and diffusion physics. All of the alagator models are here.
Test
All of the test examples and files.
arch
Files that are machine dependent that are included in the main makefiles.
bin
Binaries that are constructed and called by floops/floods.
help
The html directory of instructions, examples, and commands. This is what is posted on the web as well.
lib
The place where object libraries are placed. Each machine architecture should have its own subdirectory here.
src
The main source code directory for the code.
support
Supporting source code from other sources. This includes the BLAS, linear algebra (matrix) solvers, and the user interface codes - blt, tcl, and tk.

Porting Instructions

  1. These instructions come step by step from a clean linux installation. Make a new directory (say flooxs) and cd into that directory. Unzip and and untar the file you downloaded. You should see the directories listed above created for you. Most of flooxs (and the porting instructions) make use of environment variable - FLXSHOME. This needs to be set before you can run the program. If you are in the directory you untarred flooxs into, you may type:
    setenv FLXSHOME `pwd`
    Is is a good idea to set the FLXSHOME directory on startup so that you won't forget it. You can add it to your .cshrc (if running csh) - just use an absolute path in place of `pwd`. Times for compilations ares from 2.5Ghz Pentium IV linux system. Your mileage will of course vary.
  2. We will first work on the support directory files.
  3. First, you need to make a decision about BLAS - Basic Linear Algebra System. Some machines may have preinstalled optimized version available. For example, on sun solaris systems there is a sunperf library that provides these functions. If a preinstalled version is available, you should use it and skip to the next step. If not, we have been using the atlas code. Many precompiled binaries versions of atlas are available at http://math-atlas.sourceforge.net/. Please see if your systems is among those available - it is awful lot easier to download a precompilied version. If one is availabe, replace the ATLAS directory in support with the one downloaded. If you need to compile, cd to the support atlas directory. Read the INSTALL.txt file and follow the directions. For many systems, atlas is preconfigured and easy to get to work. Compilation is time comsuming, though, and can last for some time. Have a cup of coffee, relax, and catch on your mail! It took 20 minutes.
  4. Next you need to determine if you need to make tcl/tk or if they are preinstalled. If preinstalled, skip to the next step. You may also download binaries for many platofrms - and of course this is easier than compiling. The tlc/tk home page is http://www.scriptics.com. Change into the support/tcl8.3.5 directory and read the README. Go into the unix directory and read that README. You can configure with:
    ./configure --prefix=$FLXSHOME
    Then type:
    make install
    to get the rest of tcl compiled. You can test the tclsh8.3 binary - you'll find it in the $FLXSHOME/bin directory after compiling. These steps then need to be repeated for tk. The tk8.3.5 installation is done with identical commands, and will place a wish8.3 in the bin directory for testing purposes. It took less time to compile these directories then it did to type the instructions to do so. Trouble can happen if you have a version installed - I have had the experience of having the tk installation use a global installed library from a slightly different version of the tcl compiled. It may be easier to use the installed version in this case. Note: I have had some trouble getting 8.3.5 to work on my apple OSX 10.2 system. 8.3.4 seems to work better.
  5. Now we need to work with blt. Blt provides a graph widget that is used for all of the plotting in floops/floods. Most people will not have this installed, but if you do, you may skip to the next step. Blt follows an installation procedure similar to tcl and tk. Cd into the blt2.4u directory and type:
    configure -prefix==$FLXSHOME
    and then:
    make; make install
    This will install the libraries and build a bltwish in the $FLXSHOME/blt directory. This takes only a few minutes to complete.
  6. Next we need to work on the matrix packages. The first (and most difficult) is the petsc package. Change into the support/petsc-2.1. The installation directions are in an html file. You need to set two environment variables to get started:
    setenv PETSC_DIR $FLXSHOME/support/petsc-2.1.3
    setenv PETSC_ARCH `$PETSC_DIR/bin/petscarch`

    You then need to edit the bmake/$PETSC_ARCH/packages file. I comment out the X library stuff - we don't use any of the plotting features of petsc. The MPI library needs to be set - you may have an installed version on your system. If not, follow their directions for uniprocessor implementations. You also need to set the location of the blas and lapack libraries (step 3). If you used atlas, this will work:
    BLASLAPACK_LIB = -L$FLXSHOME/support/ATLAS/lib/Linux_P4SSE1 -lff7blas -lcblas -llapack -latlas
    Linux_P4SSE1 is the name I was told to use in step 3 by the atlas configure script. This needs to be replaced with your architecture - your mileage will vary. If using ATLAS, you also need to change the bmake/$(PETSC_ARCH)/petscconf.h file. Add these two lines to that file:
    #define PETSC_MISSING_LAPACK_GEEV
    #define PETSC_MISSING_LAPACK_GESVD

    Having done all this, you should be ready to compile. Type:
    make BOPT=O_c all
    Since floops is in c , we need that version to link with later. Installation takes a while - expect about 15 to 20 minutes.
  7. Next up is the SUPERLU package in the support directory. This provides a fast direct lu solver. There is a make.linux file configured to use the ATLAS blas (see step 3) and to place the superlu.a library in the Superlu directory. Type make and it will compile. Compilation takes only a minute or so.
  8. The final matrix solver package is umfpack. Cd to the support/umfpack directory. Edit the Makefile to select the system of your choice and then edit that file. In the linux case, you'd select "include Make.linux" and edit the Make.linux file. You'll need to again indicate the location of the BLAS lib, and you do not need to compile a version for matlab. Compilations is pretty quick.
  9. That completes the support directory codes. On to FLOOPS/FLOODS! Change directories to the $FLXSHOME/arch directory and edit the system of your choice. In this case, that is the linux file. If you didn't have preinstalled versions, this file might work unchanged in your environment. Otherwise, you need to update locations for your specific versions of the support libraries.
  10. Change directories to $FLXSHOME/src directory. First, type:
    dependscript linux; make ARCH=linux seqs; make ARCH=linux depend;
    where the linux should be the system you are compiling for and it should match the name of the arch file edited in step 9. These steps configure the floops and floods source file to use the arch file specified. Before compiling the floods and floops source, you need to do one final configuration. You need to create a library subdirectory for this architecture. Use:
    mkdir $FLXSHOME/lib/linux
    where linux is replaced with the name of the architecture you have.
  11. Finally - type:
    make ARCH=linux
    in the src directory. This should do it. If you have compile errors or load errors, suspect the arch file that you created. Compilation takes about ten minutes on my system.

Author

Mark Law