[cig-commits] r18291 - short/3D/PyLith/pylith_installer/trunk
brad at geodynamics.org
brad at geodynamics.org
Tue Apr 26 10:56:45 PDT 2011
Author: brad
Date: 2011-04-26 10:56:44 -0700 (Tue, 26 Apr 2011)
New Revision: 18291
Added:
short/3D/PyLith/pylith_installer/trunk/AUTHORS
short/3D/PyLith/pylith_installer/trunk/CHANGES
short/3D/PyLith/pylith_installer/trunk/COPYING
short/3D/PyLith/pylith_installer/trunk/INSTALL
short/3D/PyLith/pylith_installer/trunk/NEWS
short/3D/PyLith/pylith_installer/trunk/README
Removed:
short/3D/PyLith/pylith_installer/trunk/notes.txt
Modified:
short/3D/PyLith/pylith_installer/trunk/Makefile.am
short/3D/PyLith/pylith_installer/trunk/TODO
short/3D/PyLith/pylith_installer/trunk/configure.ac
Log:
Worked on documentation.
Added: short/3D/PyLith/pylith_installer/trunk/AUTHORS
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/AUTHORS (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/AUTHORS 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,3 @@
+Author of PyLith Installer.
+
+Brad T. Aagaard, U.S. Geological Survey, USA
Added: short/3D/PyLith/pylith_installer/trunk/CHANGES
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/CHANGES (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/CHANGES 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,3 @@
+See
+http://www.geodynamics.org/wsvn/cig/short/3D/PyLith/pylith_installer/?op=log&rev=0&sc=0&isdir=1
+for the complete log of changes made to PyLith Installer.
Added: short/3D/PyLith/pylith_installer/trunk/COPYING
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/COPYING (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/COPYING 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,20 @@
+Copyright (c) 2010-2011 University of California, Davis
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Added: short/3D/PyLith/pylith_installer/trunk/INSTALL
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/INSTALL (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/INSTALL 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,309 @@
+Installation instructions are also available in the PyLith manual
+available on the CIG website
+
+ http://www.geodynamics.org/cig/software/pylith/
+
+
+======================================================================
+OVERVIEW
+======================================================================
+
+This installer builds the current PyLith release and its dependencies
+from source.
+
+PyLith depends on several other libraries, some of which depend on
+other libraries. As a result, building PyLith from source can be
+tricky and is fraught with potential pitfalls. This installer attempts
+to eliminate these obstacles by providing a utility that builds all of
+the dependencies in the proper order with the required options in
+addition to PyLith itself.
+
+The installer will download the source code for PyLith and all of the
+dependencies during the install process, so you do not need to do this
+yourself. Additionally, the installer provides the option of checking
+out the PyLith and PETSc source code from the Subversion and Mercurial
+repositories (requires subversion and mercurial be installed); only
+use this option if you want the bleeding edge versions and are willing
+to rebuild frequently.
+
+
+======================================================================
+System Requirements
+======================================================================
+
+PyLith Installer should work on any UN*X system. It requires the
+following language tools:
+
+ * A C compiler.
+ * Tar archiving utility
+ * wget or curl networking downloaders.
+
+If you are using a modern UN*X system, there is a good chance that the
+above tools are already installed.
+
+
+======================================================================
+RUNNING THE INSTALLER
+======================================================================
+
+The installer has two basic components: a configure script and a
+Makefile. The configure script is used to select which dependencies to
+install, verify that any dependencies not selected are available, and
+create a shell script containing the appropriate environment variables
+to build and use PyLith. The Makefile is used to download all of the
+source code, build it in the proper order, and install it to the
+desired location. The following sections describe the default
+configuration and various common perturbations.
+
+As part of the installation process, the installer will, by default,
+run some tests to make sure specific dependencies (PETSc and
+spatialdata) as well as PyLith were installed properly.
+
+We *STRONGLY* recommend that you run the configure script in a
+different directory from the PyLith Installer source code. We
+recommend creating a build directory (for example, $HOME/build/pylith)
+where you build any software with a subdirectory for PyLith.
+
+These instructions are written assuming that you have downloaded the
+installer source code to $HOME/Downloads and want to use the following
+directories:
+
+ * $HOME/src/pylith - directory where the installer source code is
+ unpacked
+
+ * $HOME/build/pylith - directory where PyLith and its dependencies
+ are built
+
+ * $HOME/pylith - directory to which PyLith is installed
+
+If you choose to use different directories, then you will need to
+adjust the commands listed in the instructions to account for this
+change.
+
+The installer attempts to keep track of packages that it has installed
+by creating files with the syntax installed_PACKAGE where PACKAGE is
+mpi, netcdf, etc. This permits you to stop the build process at any
+time and return at a later time and pick up from where you left
+off. You can trigger a package to be rebuilt by removing the
+corresponding PACKAGE-build directory and the installed_PACKAGE file
+before running make.
+
+
+----------------------------------------------------------------------
+STEP 1 - Download and unpack the installer
+----------------------------------------------------------------------
+
+Download the installer.
+
+ http://www.geodynamics.org/cig/software/pylith/pylith-installer-1.0.0.tgz
+
+Untar the source code for the installer:
+
+ mkdir -p $HOME/src/pylith
+ cd $HOME/src/pylith
+ mv $HOME/Downloads/pylith-installer-1.0.0.tgz
+ tar -zxf pylith-installer-1.0.0.tgz
+
+
+----------------------------------------------------------------------
+STEP 2 - Run configure
+----------------------------------------------------------------------
+
+On multi-core and multi-processor systems (not clusters but systems
+with more than one core and/or processor), the build process can be
+sped up by using multiple threads when running "make". Use the
+configure argument --with-make-threads=NTHREADS where NTHREADS is the
+number of threads to use (1, 2, 4, 8, etc). The default is to use only
+one thread. In the examples below, we set the number of threads to 2.
+
+The examples below is not an exhaustive list of configure settings,
+rather it is a list of common combinations. You can enable/disable
+building each package to select the proper set of dependencies that
+need to be built.
+
+Run configure with --help to see all of the command line arguments.
+
+ $HOME/src/pylith/pylith-installer-1.0.0/configure --help
+
+-------
+DEFAULT
+-------
+
+ The default installation assumes you have
+ * C/C++ compiler
+ * Python 2.4 or later
+ * MPI
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+---------------------
+DESKTOP-LINUX-MINIMAL
+---------------------
+
+ In this case we assume most of the dependencies have been installed
+ via a package manager.
+
+ We assume you have
+ * C/C++/Fortran compilers
+ * Python 2.4 or later
+ * MPI
+ * NetCDF 3.6.2 or 4.1.1
+ * HDF5 1.8.5 or later
+ * Proj4
+ * Numpy
+ * cppunit
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --disable-cppunit \
+ --disable-numpy \
+ --disable-proj4 \
+ --disable-netcdf \
+ --disable-hdf5 \
+ --with-fortran \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+---------------------
+DESKTOP-LINUX-OPENMPI
+---------------------
+
+ In this case we assume MPI does not exist on your system and you
+ want to use the OpenMPI implementation.
+
+ We assume you have
+ * C/C++/Fortran compilers
+ * Python 2.4 or later
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --enable-mpi=openmpi \
+ --with-fortran \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+--------------
+DESKTOP-DARWIN
+--------------
+
+ Apple does not include a Fortran compiler with XCode. Although it is
+ possible to sometimes install a binary version of the compiler or
+ use a Darwin package manager, such as Fink or MacPorts, these have
+ their own sets of problems (e.g., incompatibilities, additional
+ dependencies, etc). A more robust solution is to build the gfortran
+ compiler. We also build openmpi in this case because we want a
+ Fortran compiler setup for MPI, and we use curl to download files
+ because it is included in OS X but wget is not.
+
+ We assume you have
+ * C/C++ compilers
+ * Python 2.4 or later
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --enable-gcc=fortran \
+ --enable-mpi=openmpi \
+ --with-fortran \
+ --with-fetch=curl \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+-------
+CLUSTER
+-------
+
+ We assume the cluster has been configured with compilers and MPI
+ appropriate for the hardware. We assume that Python has not been
+ installed or was not built with the selected compiler suite. So we
+ assume you have
+ * C/C++/Fortran compilers
+ * MPI
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --enable-python \
+ --with-fortran \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+---------
+DEVELOPER
+---------
+
+ **WARNING** Recommended for expert users only!
+
+ In this case we checkout the PETSc, spatialdata, and PyLith source
+ code from the corresponding repositories using the current PyLith
+ stable tree. To use another the development trunk, use
+ --with-pylith-svn=trunk; to specify another branch or tree use
+ --with-pylith-svn=BRANCH where BRANCH is the name of the branch
+ (e.g., branches/v1.5-stable) in the SVN repository.
+
+ We assume you have
+ * C/C++ compiler
+ * Python 2.4 or later
+ * MPI
+
+ mkdir -p $HOME/build/pylith
+ $HOME/src/pylith/pylith-installer-1.0.0/configure \
+ --with-pylith-svn=stable \
+ --with-make-threads=2 \
+ --prefix=$HOME/pylith
+
+
+----------------------------------------------------------------------
+STEP 3 - Setup your environment
+----------------------------------------------------------------------
+
+Setup your environment variables (as indicated in the output of the
+configure script).
+
+ source setup.sh
+
+
+----------------------------------------------------------------------
+STEP 4 - Build the software
+----------------------------------------------------------------------
+
+Build all of the required dependencies and then PyLith. You do not
+need to run "make install", because the installer includes this step
+in the make process.
+
+ make
+
+NOTE
+
+ Depending on the speed and memory of your machine and the number of
+ dependencies and which ones need to be built, the build process can
+ take anywhere from about ten minutes to several hours. As discussed
+ above you can interrupt the build process and continue at a later
+ time from where you left off.
+
+ If you get error messages while running make with multiple threads,
+ then try running make again as not all packages fully support
+ parallel builds. You can also go to the build directory of tha
+ package and run "make" before running make in $HOME/build/pylith
+ again to resume the build process. For example,
+
+ cd netcdf-build
+ make
+
+
+----------------------------------------------------------------------
+STEP 5 - Verify the installation
+----------------------------------------------------------------------
+
+Run your favorite PyLith example or test problem to insure that PyLith
+was installed properly.
+
+Add the line
+
+ . $HOME/build/pylith/setup.sh
+
+to your .bashrc (or other appropriate file) or manually add the
+environment variables from setup.sh to your .bashrc (or other
+appropriate file) so that the environment is setup properly
+automatically every time you open a shell.
Modified: short/3D/PyLith/pylith_installer/trunk/Makefile.am
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/Makefile.am 2011-04-25 23:02:30 UTC (rev 18290)
+++ short/3D/PyLith/pylith_installer/trunk/Makefile.am 2011-04-26 17:56:44 UTC (rev 18291)
@@ -62,6 +62,15 @@
SUBDIRS = \
bin
+EXTRA_DIST = \
+ AUTHORS \
+ CHANGES \
+ COPYING \
+ INSTALL \
+ NEWS \
+ README
+
+
noinst_tmp = \
installed_compilers \
installed_python \
@@ -78,6 +87,7 @@
installed_petsc \
installed_pylith
+
noinst_builddirs = \
gcc-build \
python-build \
@@ -92,6 +102,7 @@
spatialdata-build \
pylith-build
+
noinst_srcdirs = \
gcc-$(GCC_VER) \
Python-$(PYTHON_VER) \
@@ -115,8 +126,10 @@
env_flags = CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS)
if WITH_FORTRAN
+env_compilers = CC=$(CC) CXX=$(CXX) FC=$(FC)
env_mpicompilers = CC=mpicc CXX=mpicxx FC=mpif90
else
+env_compilers = CC=$(CC) CXX=$(CXX)
env_mpicompilers = CC=mpicc CXX=mpicxx
endif
@@ -249,15 +262,23 @@
# ----------------------------------------------------------------------
# mpich
# ----------------------------------------------------------------------
+if WITH_FORTRAN
+mpich_options = --enable-fc
+else
+mpich_options = --disable-fc
+endif
mpich: installed_compilers
$(FETCH_SCRIPT) "$(downloader)" mpich2-$(MPICH2_VER).tar.gz http://geodynamics.org/~buildbot/deps
$(TAR) -zxf mpich2-$(MPICH2_VER).tar.gz
$(MKDIR_P) mpich-build
cd mpich-build && \
- ../mpich2-$(MPICH2_VER)/configure --with-pm=gforker \
- --enable-shared --enable-sharedlibs=gcc \
+ ../mpich2-$(MPICH2_VER)/configure \
+ --with-pm=gforker \
+ --enable-shared \
+ --enable-sharedlibs=$(mpich_sharedarch) \
--disable-static --disable-mpe \
- --prefix=$(prefix) $(env_flags) ; \
+ --prefix=$(prefix) \
+ $(env_flags) $(env_compilers) $(mpich_options) ; \
make -j $(make_threads) && \
make install && \
touch ../installed_mpi
Added: short/3D/PyLith/pylith_installer/trunk/NEWS
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/NEWS (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/NEWS 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,3 @@
+Please report bugs at <http://geodynamics.org/roundup>.
+
+Send questions to cig-short at geodynamics.org.
Added: short/3D/PyLith/pylith_installer/trunk/README
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/README (rev 0)
+++ short/3D/PyLith/pylith_installer/trunk/README 2011-04-26 17:56:44 UTC (rev 18291)
@@ -0,0 +1,20 @@
+We are pleased to announce release of PyLith Installer version 1.0.0.
+
+Please submit bug reports via the World Wide Web at:
+ http://geodynamics.org/roundup
+
+Please send all questions by electronic mail to:
+ cig-short at geodynamics.org
+
+PyLith Installer is free software. See the file COPYING for copying
+conditions.
+
+PyLith Installer is a utility for building PyLith and its dependencies
+from source on Unix flavored operating systems.
+
+You can download the source code from
+
+ http://geodynamics.org/cig/software/packages/short/pylith
+
+Instructions are in the bundled INSTALL file, as well as in the PyLith
+User Manual on the web page listed above.
Modified: short/3D/PyLith/pylith_installer/trunk/TODO
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/TODO 2011-04-25 23:02:30 UTC (rev 18290)
+++ short/3D/PyLith/pylith_installer/trunk/TODO 2011-04-26 17:56:44 UTC (rev 18291)
@@ -1,14 +1,4 @@
configure
+
add ability to use cmake for building PETSc
-Makefile
-
- mpich
- test
- shared arch for darwin
-
- petsc
- build from repository
-
- pylith
- build from repository
Modified: short/3D/PyLith/pylith_installer/trunk/configure.ac
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/configure.ac 2011-04-25 23:02:30 UTC (rev 18290)
+++ short/3D/PyLith/pylith_installer/trunk/configure.ac 2011-04-26 17:56:44 UTC (rev 18291)
@@ -56,6 +56,14 @@
AM_CONDITIONAL([INSTALL_MPI], [test "$install_mpi" != no])
AM_CONDITIONAL([INSTALL_OPENMPI], [test "$install_mpi" = openmpi])
AM_CONDITIONAL([INSTALL_MPICH], [test "$install_mpi" = mpich])
+if test "$install_mpi" = mpich ; then
+ mpich_sharedarch=gcc
+ case $host_os in
+ darwin*)
+ mpich_sharedarch=osx-gcc ;;
+ esac
+fi
+AC_SUBST(mpich_sharedarch)
# CPPUNIT
AC_ARG_ENABLE([cppunit],
@@ -507,7 +515,7 @@
echo " proj4: $install_proj4"
echo " netcdf: $install_netcdf"
echo " hdf5: $install_hdf5"
-echo " petsc: $install_petsc"
+echo " petsc: $install_petsc, options: $petsc_options"
echo " spatialdata: $install_spatialdata"
echo " nemesis: $install_nemesis"
echo " fiat: $install_fiat"
Deleted: short/3D/PyLith/pylith_installer/trunk/notes.txt
===================================================================
--- short/3D/PyLith/pylith_installer/trunk/notes.txt 2011-04-25 23:02:30 UTC (rev 18290)
+++ short/3D/PyLith/pylith_installer/trunk/notes.txt 2011-04-26 17:56:44 UTC (rev 18291)
@@ -1,81 +0,0 @@
---enable-gcc
- python
- mpi==[openmpi,mpich]
- cppunit
- swig
- numpy
- proj
- netcdf
- hdf5
- petsc
- spatialdata
- nemesis
- fiat
-
---enable-testing
- swig - spatialdata, pylith
- netcdf - pylith
- SCECVMH - spatialdata
- hdf5 - petsc, pylith
- svn (requires swig) - nemesis, spatialdata, pylith
-
---petsc-options=[]
-
-
-CONFIGURE
-
-1. if not install gcc
- check for CC, CXX
-
-2. if not install python
- check for python
-
-3. if testing and not install cppunit
- check for cppunit
-
-4. if svn and not install swig
- check for swig
-
-5. if not install numpy
- check for numpy
-
-6. if not install proj
- check for proj
-
-7. if netcdf enabled and not install netcdf
- check for netcdf
-
-8. if hdf5 enabled and not install hdf5
- check for hdf5
-
-9. if not install petsc
- check for petsc
-
-10. if not install spatialdata
- check for spatialdata
-
-11. if not install nemesis
- check for nemesis
-
-12. if not install fiat
- check for fiat
-
-13. Check for wget or curl
-
-
-INSTALL
-
-gcc
-python
-mpi
-cppunit
-swig
-numpy
-proj
-netcdf
-hdf5
-petsc
-spatialdata
-nemesis
-fiat
-pylith
More information about the CIG-COMMITS
mailing list