[cig-commits] r11224 - short/3D/PyLith/trunk/doc/install
brad at geodynamics.org
brad at geodynamics.org
Thu Feb 21 10:05:51 PST 2008
Author: brad
Date: 2008-02-21 10:05:50 -0800 (Thu, 21 Feb 2008)
New Revision: 11224
Added:
short/3D/PyLith/trunk/doc/install/README
Modified:
short/3D/PyLith/trunk/doc/install/Linux_Fedora8-AMD64_Aagaard.txt
short/3D/PyLith/trunk/doc/install/MacBookPro_Aagaard.txt
Log:
Worked on installation instructions for linux.
Modified: short/3D/PyLith/trunk/doc/install/Linux_Fedora8-AMD64_Aagaard.txt
===================================================================
--- short/3D/PyLith/trunk/doc/install/Linux_Fedora8-AMD64_Aagaard.txt 2008-02-21 06:23:51 UTC (rev 11223)
+++ short/3D/PyLith/trunk/doc/install/Linux_Fedora8-AMD64_Aagaard.txt 2008-02-21 18:05:50 UTC (rev 11224)
@@ -1,45 +1,269 @@
-Packages
+I place applications that are rarely updated in /tools/common. This
+directory is in a seperate /tools partition from system and user
+files; this is why I don't use /usr/local. For CIG source code, I
+separate the source code, build directories, and installed code. The
+source code sits in $HOME/src/cig, I build the packages under
+$HOME/scratch/build/cig, and install the packages to $HOME/tools/cig.
- cppunit
- cppunit-devel
- proj
- proj-devel
- proj-nad
- numpy
- Pyrex
- netcdf
- netcdf-devel
+I use the bash shell and place all software package environment
+variables in a .bash.tools file that is read by the .bashrc file.
+
+On an x86_64 system it is important to keep files associated with a
+32-bit architecture separate from those associated with a 64-bit
+architecture. Some architecture independent files are put in
+$PREFIX/lib with 64-bit architecture files in $PREFIX/lib64. In most
+cases when a library with versions for both architectures is
+available, the linker will use the one compatible with the requested
+architecture (the default is usually the 64-bit architecture).
+
+To make things easier, I create environment variables TOOLS_DIR,
+CIG_DIR, and TOOLS_FORMAT. The TOOLS_FORMAT variable makes it easier
+to maintain multiple copies of packages built with different options
+(e.g., different compilers and different levels of optimization).
+
+ export $TOOLS_DIR=/tools/common
+ export $CIG_DIR=$HOME/tools/cig
+ export TOOLS_FORMAT=gcc-4.1.2_64
+
+ export CIG_DIR=${HOME}/tools/cig/${TOOLS_FORMAT}
+ export CIG_INCDIR=${CIG_DIR}/include
+ export CIG_LIBDIR=${CIG_DIR}/lib
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CIG_LIBDIR}
+ export PYTHONPATH=${PYTHONPATH}:${CIG_DIR}/lib64/python${PYTHON_VERSION}/site-packages:${CIG_DIR}/lib/python${PYTHON_VERSION}/site-packages
+ PATH=${CIG_DIR}/bin:$PATH
+
+ export NETCDF_INCDIR=/usr/include/netcdf-3
+ export NETCDF_LIBDIR=/usr/lib64/netcdf-3
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NETCDF_LIBDIR}
+
+
+1. When installing Fedora, include the development tools (gcc,
+gfortran, etc). in the installation.
+
+2. Install additional packages using yum (you need to be root).
+
+ yum install NAMES_OF_PACKAGES
+
+ Recommended packages:
+
+ cppunit
+ cppunit-devel
+ proj
+ proj-devel
+ proj-nad
+ numpy
+ Pyrex
+ netcdf
+ netcdf-devel
-ACML
+3. Install the AMD Core Math Library (ACML).
-MPICH2
+ http://developer.amd.com/tools/acml/Pages/default.aspx
-ParMetis
+ Notes: (i) You need to register to download.
+ (ii) Make sure you download the version appropriate for your
+ compiler (e.g., acml-4-0-1-gfortran-64bit.tgz for gcc).
-PETSc
+ a. Expand the tarball and run the installation script.
+ I install to ${TOOLS_DIR}/acml-4.0.1
-pythia
+ b. Set environment variables.
-nemesis
+ ACML_DIR=${TOOLS_DIR}/acml-4.0.1/gfortran64
+ export ACML_INCDIR=${ACML_DIR}/include
+ export ACML_LIBDIR=${ACML_DIR}/lib
+ export ACML_LIBS="-lacml_mv -lacml -lgfortran -lm"
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ACML_LIBDIR}
-pyrexembed
+4. Install MPICH2
+
+ a. Untar the source and then run configure, build, and install.
-spatialdata
+ export CC=gcc
+ export CXX=g++
+ export F77=gfortran
+ export CFLAGS=-fPIC
+ export CXXFLAGS=-fpic
+ export F77FLAGS=-fpic
-pylith
+ ./configure --with-arch=LINUX --disable-f90 --enable-sharedlibs=gcc --enable-cxx --prefix=${TOOLS_DIR}/mpich2-1.0.6p1/${TOOLS_FORMAT} --enable-g=none --enable-romio --with-device=ch3:nemesis --enable-fast
+ make
+ make install
+ b. Set environment variables.
+ export RSHCOMMAND=ssh
+ export MPI_DIR=$TOOLS_DIR/mpich2-1.0.6p1/${TOOLS_FORMAT}
+ PATH=$MPI_DIR/bin:$PATH
+ export MANPATH=$MPI_DIR/man:$MANPATH
+ export MPI_INCDIR=$MPI_DIR/include
+ export MPI_LIBDIR=$MPI_DIR/lib
+ export LD_LIBRARY_PATH=${MPI_LIBDIR}:${LD_LIBRARY_PATH}
-Mayavi2
+5. Install ParMetis (http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview)
- Packages
+ a. Untar the source and edit the Makefile.
+ b. Set the CC, COPTIONS, INCDIR, LD, and LIBDIR variables.
+
+ CC = gcc
+ COPTIONS = -fPIC
+ INCDIR = -I${MPI_INCDIR}
+ LD = gcc
+ LIBDIR = -L${MLI_LIBDIR} -lmpich -lpthread -lrt
+
+ c. Create shared libraries by hand.
+
+ cd ${TOOLS_DIR}/parmetis-3.1/${TOOLS_FORMAT}/lib
+ mkdir tmp
+ cd tmp
+ ar -x ../libmetis.a
+ gcc -o ../libmetis.so -shared *.o
+ rm *.o
+ ar -x ../libparmetis.a
+ gcc -o ../libparmetis.so -shared *.o
+ rm *.o
+ cd ..
+ rmdir tmp
+
+ d. Set environment variables.
+
+ PARMETIS_DIR=$TOOLS_DIR/parmetis-3.1/${TOOLS_FORMAT}
+ export PARMETIS_INCDIR=$PARMETIS_DIR/include
+ export PARMETIS_LIBDIR=$PARMETIS_DIR/lib
+ export PARMETIS_LIBS="-lparmetis -lmetis"
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PARMETIS_LIBDIR}
+
+6. Install FIAT (http://www.fenics.org/wiki/FIAT)
+
+ a. Install FIAT.
+
+ python setup.py install --prefix=$TOOLS_DIR/fiat-0.3.1/${TOOLS_FORMAT}
+
+ b. Set environment variables.
+
+ FIAT_DIR=${TOOLS_DIR}/fiat-0.3.1/${TOOLS_FORMAT}
+ PYTHONPATH=${PYTHONPATH}:${FIAT_DIR}/lib/python${PYTHON_VERSION}/site-packages
+
+7. Install the development version of PETSc
+ (http://www-unix.mcs.anl.gov/petsc/petsc-as/)
+
+ a. Clone the source repository.
+
+ hg clone http://petsc.cs.iit.edu/petsc/petsc-dev
+ cd petsc-dev/config
+ hg clone http://petsc.cs.iit.edu/petsc/BuildSystem BuildSystem
+
+ b. Set PETSC_ARCH and PETSC_DIR environment variables.
+
+ export PETSC_DIR=${TOOLS_DIR}/petsc-dev
+ export PETSC_ARCH=linux_${TOOLS_FORMAT}_debug
+
+ c. Configure PETSc, build, and test.
+
+ ARCH_FLAGS="--PETSC_ARCH=linux_${TOOLS_FORMAT}_debug --with-debugging=1"
+ LANG_FLAGS="--with-clanguage=c++"
+ BUILD_FLAGS="--with-mpi-compilers=0 --with-gnu-compilers=1 --with-shared=1 --with-dynamic=1 --with-64-bit-points=1 --with-large-file-io=1 --CC=gcc --CXX=g++ --FC=gfortran --F77=gfortran"
+ MPI_FLAGS="--with-mpi-dir=/tools/common/mpich2-1.0.6p1/${TOOLS_FORMAT} --with-mpi-shared=0"
+ OPTIONS="--with-lgrind=0 --download-tetgen"
+ PART_FLAGS="--with-chaco=1 --download-chaco=1 --with-parmetis=1 --with-parmetis-dir=/tools/common/parmetis-3.1/${TOOLS_FORMAT}"
+ SIEVE_FLAGS="--with-sieve=1 --with-boost=1 --download-boost=1"
+ config/configure.py ${ARCH_FLAGS} ${LANG_FLAGS} ${BUILD_FLAGS} --with-blas-lapack-lib="-L${TOOLS_DIR}/acml-4.0.1/${ACML_SUBDIR}/lib -lacml -lacml_mv" ${MPI_FLAGS} ${OPTIONS} ${PART_FLAGS} ${SIEVE_FLAGS} ${EXTRA_FLAGS}
+ make
+ make test
+
+8. Install CIG's version of pyrexembed.
+
+ a. Download the source code from the SVN repository.
+
+ svn co http://geodynamics.org/svn/cig/cs/pyrexembed/trunk pyrexembed
+
+ b. Install the software.
+
+ python setup.py install --prefix=${CIG_DIR}
+
+9. Install pythia.
+
+ a. Download the source code from the SVN repository.
+
+ svn co svn list http://geodynamics.org/svn/cig/cs/pythia/trunk pythia
+
+ b. Install the software.
+
+ python setup.py install --prefix=${CIG_DIR}
+
+ c. Set environment variables.
+
+ export PYTHIA_INCDIR=${CIG_INCDIR}/pythia-0.8
+
+10. Install nemesis.
+
+ a. Download the source code from the SVN repository.
+
+ svn co svn list http://geodynamics.org/svn/cig/cs/nemesis/trunk nemesis
+
+ b. Create the configure script.
+
+ autoreconf -if
+
+ c. Run configure, build, and install.
+
+ ./configure --prefix=${CIG_DIR} CPPFLAGS="-I${CIG_INCDIR} -I${MPI_INCDIR}" LDFLAGS="-L${CIG_LIBDIR} -L${MPI_LIBDIR}" LIBS="-lpthread -lrt" CC=gcc CXX=g++ FC=gfortran F77=gfortran
+
+ make
+ make install
+
+11. Install spatialdata.
+
+ a. Download the source code from the SVN repository.
+
+ svn co svn list http://geodynamics.org/svn/cig/cs/spatialdata-0.1/trunk spatialdata
+
+ b. Create the configure script.
+
+ autoreconf -if
+
+ c. Run configure, build, install, and the unit tests.
+
+ ./configure --enable-testing --enable-pythia --prefix=${CIG_DIR} CPPFLAGS="-I${CIG_INCDIR}" LDFLAGS="-L${CIG_LIBDIR} " LIBS="" CC=gcc CXX=g++ FC=gfortran F77=gfortran
+ make
+ make install
+ make check
+
+12. Install PyLith.
+
+ a. Download the source code from the SVN repository.
+
+ svn co svn list http://geodynamics.org/svn/cig/short/3D/PyLith/trunk pylith
+
+ b. Create the configure script.
+
+ autoreconf -if
+
+ c. Run configure, build, install, and the unit tests.
+
+ ./configure --enable-testing --enable-cubit --enable-tetgen --prefix=${CIG_DIR} CPPFLAGS="-I${CIG_INCDIR} -I${NETCDF_INCDIR}" LDFLAGS="-L${CIG_LIBDIR} -L${NETCDF_LIBDIR}" LIBS="" CC=gcc CXX=g++ FC=gfortran F77=gfortran CFLAGS="-g -O" CXXFLAGS="-g -O"
+ make
+ make install
+ make check
+
+======================================================================
+OPTIONAL: Install Mayavi2 for visualization.
+======================================================================
+
+1. Install the following packages:
+
scipy
python-matplotlib
python-imaging
python-setuptools
- python-setuptools-python
+ python-setuptools-devel
+ vtk
+ vtk-devel
vtk-python
- Eggs (source)
+2. Install Mayavi2 using eggs.
-
+ unset PYTHONPATH
+ export PYTHONPATH=${TOOLS_DIR}/mayavi2/${TOOLS_FORMAT}/lib/python${PYTHON_VERSION}/site-packages
+ mkdir -p $PYTHONPATH
+ easy_install -d $PYTHONPATH -f http://code.enthought.com/enstaller/eggs/source enthought.mayavi
Modified: short/3D/PyLith/trunk/doc/install/MacBookPro_Aagaard.txt
===================================================================
--- short/3D/PyLith/trunk/doc/install/MacBookPro_Aagaard.txt 2008-02-21 06:23:51 UTC (rev 11223)
+++ short/3D/PyLith/trunk/doc/install/MacBookPro_Aagaard.txt 2008-02-21 18:05:50 UTC (rev 11224)
@@ -12,9 +12,9 @@
to maintain multiple copies of packages built with different options
(e.g., different compilers and different levels of optimization).
- export $TOOLS_DIR=/sw/tools
- export $CIG_DIR=$HOME/tools/cig
+ export TOOLS_DIR=/sw/tools
export TOOLS_FORMAT=gcc-4.0
+ export CIG_DIR=$HOME/tools/cig/${TOOLS_FORMAT}
export CIG_INCDIR=${CIG_DIR}/include
export CIG_LIBDIR=${CIG_DIR}/lib
@@ -101,8 +101,22 @@
LD = gcc
LIBDIR = -L${MLI_LIBDIR} -lmpich -lpmpich
- c. Set environment variables.
+ c. Create shared libraries by hand.
+ cd ${TOOLS_DIR}/parmetis-3.1/${TOOLS_FORMAT}/lib
+ mkdir tmp
+ cd tmp
+ ar -x ../libmetis.a
+ gcc -o ../libmetis.so ADD_FLAGS_HERE *.o
+ rm *.o
+ ar -x ../libparmetis.a
+ gcc -o ../libparmetis.so ADD_FLAGS_HERE *.o
+ rm *.o
+ cd ..
+ rmdir tmp
+
+ d. Set environment variables.
+
PARMETIS_DIR=$TOOLS_DIR/parmetis-3.1/${TOOLS_FORMAT}
export PARMETIS_INCDIR=$PARMETIS_DIR/include
export PARMETIS_LIBDIR=$PARMETIS_DIR/lib
Added: short/3D/PyLith/trunk/doc/install/README
===================================================================
--- short/3D/PyLith/trunk/doc/install/README (rev 0)
+++ short/3D/PyLith/trunk/doc/install/README 2008-02-21 18:05:50 UTC (rev 11224)
@@ -0,0 +1,47 @@
+======================================================================
+OVERVIEW
+======================================================================
+
+This directory contains detailed instructions for building PyLith from
+source on several different platforms. You can compile all of the
+software packages from source, but, in most cases, it is much easier
+to make use of package managers to install low-level
+dependencies. Additionally, some hardware vendors supply optimized
+math libraries (BLAS/LAPACK) that will provide better performance than
+generic implementations.
+
+The degree of difficulty of the installation is closely related to how
+many binary packages are available for your platform. Most Linux
+distributions provide package managers that make installing a
+consistent suite of packages very easy. On Darwin systems, the package
+managers do a poor job of maintaining compatibility across
+packages. For example, some Fink packages use Apple gcc while others
+use Fink gcc (these two versions of gcc are not necessarily
+compatible).
+
+======================================================================
+INSTRUCTIONS FOR VARIOUS PLATFORMS
+======================================================================
+
+In cases where there are multiple instructions for a given platform,
+simply pick the procedure with which you are most comfortable.
+
+FILE PLATFORM
+MacBookPro_Aagaard.txt Intel Mac
+Linux_Fedora8-AMD64_Aagaard.txt x86_64 machine running Fedora 8
+Cluster_Rocks-4.3.txt x86_64 cluster running Rocks 4.3
+
+======================================================================
+BUILDING IN A SEPARATE DIRECTORY FROM THE SOURCE TREE
+======================================================================
+
+Software packages that conform to the GNU build system and use a
+configure script can be built in a different directory from the source
+tree. A notable exception to this is MPICH2, which in most cases must
+be built in the source tree. Building in a directory separate from the
+source tree makes it easy to create builds for different compilers,
+optimization levels, etc. To build in a separate directory, simply run
+the configure script from the directory you wish to use as the
+top-level build directory. Run "make", etc. in the build directory. In
+cases where you need to generate the configure script via autoreconf,
+run "autoreconf -if" in the top-level source directory.
More information about the cig-commits
mailing list